The NetBSD Project

CVS log for src/sys/compat/linux32/arch/amd64/linux32_machdep.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / compat / linux32 / arch / amd64

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.38.6.4: download - view: text, markup, annotated - select for diffs
Wed Jun 21 21:26:16 2023 UTC (17 months, 3 weeks ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE
Diff to: previous 1.38.6.3: preferred, colored; branchpoint 1.38: preferred, colored; next MAIN 1.39: preferred, colored
Changes since revision 1.38.6.3: +3 -2 lines
Pull up following revision(s) (requested by riastradh in ticket #1841):

	sys/compat/sunos32/sunos32_misc.c: revision 1.86
	sys/compat/ossaudio/ossaudio.c: revision 1.85
	sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.48

compat_sunos32: Memset zero before copyout.

Unclear if this can leak anything but let's be on the safe side.

compat_ossaudio: Zero-initialize idat before copyout.
Unclear if there are any paths to the copyout without initialization,
but let's play it safe to keep the auditing effort low.

linux32_rt_sendsig: Memset zero before copyout.
Not sure if there's any padding here, but it's a pretty big
structure, fairly likely, so let's be rather safe than sorry.

Revision 1.45.2.2: download - view: text, markup, annotated - select for diffs
Wed Jun 21 21:24:38 2023 UTC (17 months, 3 weeks ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-4-RELEASE
Diff to: previous 1.45.2.1: preferred, colored; branchpoint 1.45: preferred, colored; next MAIN 1.46: preferred, colored
Changes since revision 1.45.2.1: +3 -2 lines
Pull up following revision(s) (requested by riastradh in ticket #1650):

	sys/compat/sunos32/sunos32_misc.c: revision 1.86
	sys/compat/ossaudio/ossaudio.c: revision 1.85
	sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.48

compat_sunos32: Memset zero before copyout.

Unclear if this can leak anything but let's be on the safe side.

compat_ossaudio: Zero-initialize idat before copyout.
Unclear if there are any paths to the copyout without initialization,
but let's play it safe to keep the auditing effort low.

linux32_rt_sendsig: Memset zero before copyout.
Not sure if there's any padding here, but it's a pretty big
structure, fairly likely, so let's be rather safe than sorry.

Revision 1.47.4.1: download - view: text, markup, annotated - select for diffs
Wed Jun 21 21:22:53 2023 UTC (17 months, 3 weeks ago) by martin
Branches: netbsd-10
CVS tags: netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Diff to: previous 1.47: preferred, colored; next MAIN 1.48: preferred, colored
Changes since revision 1.47: +3 -2 lines
Pull up following revision(s) (requested by riastradh in ticket #204):

	sys/compat/sunos32/sunos32_misc.c: revision 1.86
	sys/compat/ossaudio/ossaudio.c: revision 1.85
	sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.48

compat_sunos32: Memset zero before copyout.

Unclear if this can leak anything but let's be on the safe side.

compat_ossaudio: Zero-initialize idat before copyout.
Unclear if there are any paths to the copyout without initialization,
but let's play it safe to keep the auditing effort low.

linux32_rt_sendsig: Memset zero before copyout.
Not sure if there's any padding here, but it's a pretty big
structure, fairly likely, so let's be rather safe than sorry.

Revision 1.38.6.3: download - view: text, markup, annotated - select for diffs
Wed Jun 21 21:04:03 2023 UTC (17 months, 3 weeks ago) by martin
Branches: netbsd-8
Diff to: previous 1.38.6.2: preferred, colored; branchpoint 1.38: preferred, colored
Changes since revision 1.38.6.2: +4 -2 lines
Pull up following revision(s) (requested by riastradh in ticket #1836):

	sys/compat/linux/arch/i386/linux_machdep.c: revision 1.168
	sys/compat/sunos/sunos_misc.c: revision 1.177
	sys/compat/netbsd32/netbsd32_compat_50.c: revision 1.52
	sys/compat/common/kern_resource_43.c: revision 1.23
	sys/compat/netbsd32/netbsd32_conv.h: revision 1.46
	sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.35
	sys/compat/common/vfs_syscalls_12.c: revision 1.38
	sys/compat/ultrix/ultrix_misc.c: revision 1.126
	sys/compat/common/kern_sig_43.c: revision 1.37
	sys/compat/linux/common/linux_mtio.c: revision 1.8
	sys/compat/freebsd/freebsd_misc.c: revision 1.34
	sys/compat/linux/common/linux_olduname.c: revision 1.67
	sys/compat/linux/arch/mips/linux_machdep.c: revision 1.44
	sys/compat/freebsd/freebsd_sched.c: revision 1.23
	sys/compat/ossaudio/ossaudio.c: revision 1.84
	sys/compat/sys/time_types.h: revision 1.6
	sys/compat/linux/arch/powerpc/linux_machdep.c: revision 1.51
	sys/compat/linux/common/linux_file.c: revision 1.119
	sys/compat/linux/arch/arm/linux_machdep.c: revision 1.34
	sys/compat/netbsd32/netbsd32_wait.c: revision 1.25
	sys/compat/linux32/common/linux32_time.c: revision 1.38
	sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.33
	sys/compat/linux/arch/alpha/linux_machdep.c: revision 1.52
	sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.46
	sys/compat/netbsd32/netbsd32_compat_12.c: revision 1.36
	sys/compat/ultrix/ultrix_ioctl.c: revision 1.39
	sys/compat/linux/common/linux_misc.c: revision 1.252
	sys/compat/linux/common/linux_hdio.c: revision 1.19
	sys/compat/sunos/sunos_ioctl.c: revision 1.71
	sys/compat/linux/common/linux_sched.c: revision 1.79
	sys/compat/common/kern_info_43.c: revision 1.40
	sys/compat/linux32/common/linux32_exec_elf32.c: revision 1.20
	sys/compat/linux/common/linux_socket.c: revision 1.153
	sys/compat/linux/arch/amd64/linux_machdep.c: revision 1.60
	sys/compat/common/vfs_syscalls_43.c: revision 1.68
	sys/compat/linux/arch/powerpc/linux_exec_powerpc.c: revision 1.25
	sys/compat/netbsd32/netbsd32_ptrace.c: revision 1.9
	sys/compat/common/kern_time_50.c: revision 1.37
	sys/compat/netbsd32/netbsd32_compat_20.c: revision 1.42
	sys/compat/linux/common/linux_cdrom.c: revision 1.28
	sys/compat/linux/arch/m68k/linux_machdep.c: revision 1.43
	sys/compat/common/kern_info_09.c: revision 1.22
	sys/compat/linux32/common/linux32_resource.c: revision 1.12
	sys/compat/linux/common/linux_oldolduname.c: revision 1.67
	sys/compat/netbsd32/netbsd32_nfssvc.c: revision 1.8
	sys/compat/linux32/common/linux32_signal.c: revision 1.21
	sys/compat/common/kern_sig_13.c: revision 1.22
	sys/compat/sunos32/sunos32_ioctl.c: revision 1.36
	sys/compat/netbsd32/netbsd32_compat_43.c: revision 1.62
	sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.23
	sys/compat/netbsd32/netbsd32_time.c: revision 1.56
	sys/compat/linux/common/linux_signal.c: revision 1.84
	sys/compat/netbsd32/netbsd32_signal.c: revision 1.52
	sys/compat/sunos32/sunos32_misc.c: revision 1.85
	sys/compat/linux/common/linux_time.c: revision 1.40
	sys/compat/linux/common/linux_fdio.c: revision 1.14
	sys/compat/common/vfs_syscalls_30.c: revision 1.43

sys/compat: Memset zero before copyout.

Just in case of uninitialized padding which would lead to kernel
stack disclosure.  If the compiler can prove the memset redundant
then it can optimize it away; otherwise better safe than sorry.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Tue Jun 20 15:22:15 2023 UTC (17 months, 3 weeks ago) by riastradh
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, HEAD
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +3 -2 lines
linux32_rt_sendsig: Memset zero before copyout.

Not sure if there's any padding here, but it's a pretty big
structure, fairly likely, so let's be rather safe than sorry.

XXX pullup-8
XXX pullup-9
XXX pullup-10

Revision 1.45.2.1: download - view: text, markup, annotated - select for diffs
Wed Aug 3 11:11:33 2022 UTC (2 years, 4 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-3-RELEASE
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +4 -2 lines
Pull up following revision(s), all via patch
(requested by riastradh in ticket #1487):

	sys/compat/linux/arch/i386/linux_machdep.c: revision 1.168
	sys/compat/sunos/sunos_misc.c: revision 1.177
	sys/compat/netbsd32/netbsd32_compat_50.c: revision 1.52
	sys/compat/common/kern_resource_43.c: revision 1.23
	sys/compat/netbsd32/netbsd32_conv.h: revision 1.46
	sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.35
	sys/compat/common/vfs_syscalls_12.c: revision 1.38
	sys/compat/ultrix/ultrix_misc.c: revision 1.126
	sys/compat/common/kern_sig_43.c: revision 1.37
	sys/compat/linux/common/linux_mtio.c: revision 1.8
	sys/compat/freebsd/freebsd_misc.c: revision 1.34
	sys/compat/freebsd/freebsd_machdep.c: revision 1.5
	sys/compat/linux/common/linux_olduname.c: revision 1.67
	sys/compat/linux/arch/mips/linux_machdep.c: revision 1.44
	sys/compat/freebsd/freebsd_sched.c: revision 1.23
	sys/compat/ossaudio/ossaudio.c: revision 1.84
	sys/compat/sys/time_types.h: revision 1.6
	sys/compat/linux/arch/powerpc/linux_machdep.c: revision 1.51
	sys/compat/common/ieee80211_20.c: revision 1.7
	sys/compat/linux/common/linux_file.c: revision 1.119
	sys/compat/linux/arch/arm/linux_machdep.c: revision 1.34
	sys/compat/netbsd32/netbsd32_wait.c: revision 1.25
	sys/compat/linux32/common/linux32_time.c: revision 1.38
	sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.33
	sys/compat/linux/arch/alpha/linux_machdep.c: revision 1.52
	sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.46
	sys/compat/netbsd32/netbsd32_compat_12.c: revision 1.36
	sys/compat/ultrix/ultrix_ioctl.c: revision 1.39
	sys/compat/linux/common/linux_misc.c: revision 1.252
	sys/compat/linux/common/linux_hdio.c: revision 1.19
	sys/compat/sunos/sunos_ioctl.c: revision 1.71
	sys/compat/linux/common/linux_sched.c: revision 1.79
	sys/compat/common/kern_info_43.c: revision 1.40
	sys/compat/linux32/common/linux32_exec_elf32.c: revision 1.20
	sys/compat/linux/common/linux_socket.c: revision 1.153
	sys/compat/linux/arch/amd64/linux_machdep.c: revision 1.60
	sys/compat/common/vfs_syscalls_43.c: revision 1.68
	sys/compat/linux/arch/powerpc/linux_exec_powerpc.c: revision 1.25
	sys/compat/netbsd32/netbsd32_ptrace.c: revision 1.9
	sys/compat/common/kern_time_50.c: revision 1.37
	sys/compat/netbsd32/netbsd32_compat_20.c: revision 1.42
	sys/compat/linux/common/linux_cdrom.c: revision 1.28
	sys/compat/linux/arch/m68k/linux_machdep.c: revision 1.43
	sys/compat/common/kern_info_09.c: revision 1.22
	sys/compat/linux32/common/linux32_resource.c: revision 1.12
	sys/compat/linux/common/linux_oldolduname.c: revision 1.67
	sys/compat/common/if_media_80.c: revision 1.4
	sys/compat/linux/arch/alpha/linux_osf1.c: revision 1.5
	sys/compat/netbsd32/netbsd32_nfssvc.c: revision 1.8
	sys/compat/linux32/common/linux32_signal.c: revision 1.21
	sys/compat/common/kern_sig_13.c: revision 1.22
	sys/compat/sunos32/sunos32_ioctl.c: revision 1.36
	sys/compat/netbsd32/netbsd32_compat_43.c: revision 1.62
	sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.23
	sys/compat/netbsd32/netbsd32_time.c: revision 1.56
	sys/compat/linux/common/linux_signal.c: revision 1.84
	sys/compat/netbsd32/netbsd32_signal.c: revision 1.52
	sys/compat/sunos32/sunos32_misc.c: revision 1.85
	sys/compat/linux/common/linux_time.c: revision 1.40
	sys/compat/linux/common/linux_fdio.c: revision 1.14
	sys/compat/common/vfs_syscalls_30.c: revision 1.43

sys/compat: Memset zero before copyout.

Just in case of uninitialized padding which would lead to kernel
stack disclosure.  If the compiler can prove the memset redundant
then it can optimize it away; otherwise better safe than sorry.

Revision 1.47: download - view: text, markup, annotated - select for diffs
Mon Nov 1 05:07:16 2021 UTC (3 years, 1 month ago) by thorpej
Branches: MAIN
CVS tags: netbsd-10-base, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Branch point for: netbsd-10
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +7 -7 lines
Use "stack_t" instead of "struct sigaltstack", as the former is the
newer standardized name.  NFC.

Revision 1.46: download - view: text, markup, annotated - select for diffs
Tue Sep 7 11:43:04 2021 UTC (3 years, 3 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +4 -2 lines
sys/compat: Memset zero before copyout.

Just in case of uninitialized padding which would lead to kernel
stack disclosure.  If the compiler can prove the memset redundant
then it can optimize it away; otherwise better safe than sorry.

Revision 1.43.4.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:07:00 2019 UTC (5 years, 6 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.43: preferred, colored; next MAIN 1.44: preferred, colored
Changes since revision 1.43: +9 -7 lines
Sync with HEAD

Revision 1.45: download - view: text, markup, annotated - select for diffs
Sun May 19 08:46:15 2019 UTC (5 years, 6 months ago) by maxv
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Branch point for: netbsd-9
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +3 -3 lines
Rename

	fpu_save_area_clear -> fpu_clear
	fpu_save_area_reset -> fpu_sigreset

Clearer, and reduces a future diff. No real functional change.

Revision 1.38.6.2: download - view: text, markup, annotated - select for diffs
Fri Apr 5 07:48:05 2019 UTC (5 years, 8 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1
Diff to: previous 1.38.6.1: preferred, colored; branchpoint 1.38: preferred, colored
Changes since revision 1.38.6.1: +8 -6 lines
Pull up following revision(s) (requested by maxv):

	sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.120
	sys/compat/linux/arch/amd64/linux_machdep.c: revision 1.57
	sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.44
	sys/arch/amd64/amd64/machdep.c: revision 1.328
	sys/arch/amd64/amd64/machdep.c: revision 1.329

Fix a tiny race in setregs and linux_setregs. Between the moment we set
pcb_flags to zero, and the moment cpu_segregs64_zero resets pcb_gs, we may
be preempted.

If this happens, and if the calling LWP was a 32bit thread, when switching
back to that LWP, the context switcher sees that PCB_COMPAT32 is not set in
pcb_flags and tries to perform a 64bit context switch; but pcb_gs contains
a 32bit GDT descriptor, and not a 64bit GS.base value. The wrmsr therefore
faults because the value is non-canonical, and this fault is fatal.

Rearrange the code so that the update of pcb_flags and pcb_gs/pcb_fs is non
interruptible. This fixes the problem, tested with a reproducer (which
therefore doesn't work anymore).

Likely fixes PR/53993.

Disable preemption when setting PCB_COMPAT32, to prevent a context switch
before cpu_fsgs_reload() finishes, otherwise we write garbage in the GDT.

On NetBSD-current it is harmless, however in NetBSD-8 it might cause
panics, because NetBSD-8 uses the old SegRegs model and under this model
we reload %fs and %gs during switches.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Sun Mar 24 15:58:32 2019 UTC (5 years, 8 months ago) by maxv
Branches: MAIN
CVS tags: isaki-audio2-base, isaki-audio2
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +8 -6 lines
Disable preemption when setting PCB_COMPAT32, to prevent a context switch
before cpu_fsgs_reload() finishes, otherwise we write garbage in the GDT.
On NetBSD-current it is harmless, however in NetBSD-8 it might cause
panics, because NetBSD-8 uses the old SegRegs model and under this model
we reload %fs and %gs during switches.

Revision 1.31.2.2: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:36:55 2017 UTC (7 years ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.31.2.1: preferred, colored; branchpoint 1.31: preferred, colored; next MAIN 1.32: preferred, colored
Changes since revision 1.31.2.1: +17 -12 lines
update from HEAD

Revision 1.43: download - view: text, markup, annotated - select for diffs
Sat Oct 21 07:24:26 2017 UTC (7 years, 1 month ago) by maxv
Branches: MAIN
CVS tags: tls-maxphys-base-20171202, phil-wifi-base, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat
Branch point for: phil-wifi
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +6 -2 lines
Include opt_user_ldt.h when needed.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Thu Oct 19 10:01:09 2017 UTC (7 years, 1 month ago) by maxv
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +8 -8 lines
Always mask the 16 bits of the segregs in the trapframe. We don't zero-
extend the uint64_t's when building it, so we're leaking 48 bits of kernel
stack to userland.

Having said that, it appears that I unintentionally fixed most of this
issue in locore.S::rev1.127 - by building the frame with interrupts
disabled, we are implicitly guaranteeing that the structure doesn't get
overwritten by the kernel. Which means, we are leaking to userland data
that comes from userland anyway.

(still other places with this issue, but I'll fix them differently)

Revision 1.41: download - view: text, markup, annotated - select for diffs
Sun Oct 15 12:49:53 2017 UTC (7 years, 1 month ago) by maxv
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +3 -3 lines
Use two separate functions: cpu_segregs32_zero and cpu_segregs64_zero. The
way segment registers work on amd64 will diverge between 32bit and 64bit
LWPs.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Sun Oct 15 11:36:15 2017 UTC (7 years, 1 month ago) by maxv
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +3 -3 lines
Make sure the 32bit LWPs don't have MDL_IRET set. That's not a problem
right now, but will be in the future.

Revision 1.38.6.1: download - view: text, markup, annotated - select for diffs
Sat Sep 9 17:01:23 2017 UTC (7 years, 3 months ago) by snj
Branches: netbsd-8
CVS tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +5 -4 lines
Pull up following revision(s) (requested by maxv in ticket #270):
	sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.39
Fix a ring0 escalation vulnerability in compat_linux32 where the
index of %cs is controlled by userland, making it easy to trigger
the page fault and get kernel privileges.

Revision 1.36.4.1: download - view: text, markup, annotated - select for diffs
Sat Sep 9 16:57:37 2017 UTC (7 years, 3 months ago) by snj
Branches: netbsd-7
CVS tags: netbsd-7-2-RELEASE
Diff to: previous 1.36: preferred, colored; next MAIN 1.37: preferred, colored
Changes since revision 1.36: +5 -4 lines
Pull up following revision(s) (requested by maxv in ticket #1507):
	sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.39
Fix a ring0 escalation vulnerability in compat_linux32 where the
index of %cs is controlled by userland, making it easy to trigger
the page fault and get kernel privileges.

Revision 1.36.14.1: download - view: text, markup, annotated - select for diffs
Sat Sep 9 16:57:36 2017 UTC (7 years, 3 months ago) by snj
Branches: netbsd-7-1
CVS tags: netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE
Diff to: previous 1.36: preferred, colored; next MAIN 1.37: preferred, colored
Changes since revision 1.36: +5 -4 lines
Pull up following revision(s) (requested by maxv in ticket #1507):
	sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.39
Fix a ring0 escalation vulnerability in compat_linux32 where the
index of %cs is controlled by userland, making it easy to trigger
the page fault and get kernel privileges.

Revision 1.36.8.1: download - view: text, markup, annotated - select for diffs
Sat Sep 9 16:57:34 2017 UTC (7 years, 3 months ago) by snj
Branches: netbsd-7-0
Diff to: previous 1.36: preferred, colored; next MAIN 1.37: preferred, colored
Changes since revision 1.36: +5 -4 lines
Pull up following revision(s) (requested by maxv in ticket #1507):
	sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.39
Fix a ring0 escalation vulnerability in compat_linux32 where the
index of %cs is controlled by userland, making it easy to trigger
the page fault and get kernel privileges.

Revision 1.29.10.1: download - view: text, markup, annotated - select for diffs
Sat Sep 9 16:53:36 2017 UTC (7 years, 3 months ago) by snj
Branches: netbsd-6
Diff to: previous 1.29: preferred, colored; next MAIN 1.30: preferred, colored
Changes since revision 1.29: +5 -4 lines
Pull up following revision(s) (requested by maxv in ticket #1502):
	sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.39
Fix a ring0 escalation vulnerability in compat_linux32 where the
index of %cs is controlled by userland, making it easy to trigger
the page fault and get kernel privileges.

Revision 1.29.16.1: download - view: text, markup, annotated - select for diffs
Sat Sep 9 16:53:34 2017 UTC (7 years, 3 months ago) by snj
Branches: netbsd-6-1
Diff to: previous 1.29: preferred, colored; next MAIN 1.30: preferred, colored
Changes since revision 1.29: +5 -4 lines
Pull up following revision(s) (requested by maxv in ticket #1502):
	sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.39
Fix a ring0 escalation vulnerability in compat_linux32 where the
index of %cs is controlled by userland, making it easy to trigger
the page fault and get kernel privileges.

Revision 1.29.14.1: download - view: text, markup, annotated - select for diffs
Sat Sep 9 16:53:33 2017 UTC (7 years, 3 months ago) by snj
Branches: netbsd-6-0
Diff to: previous 1.29: preferred, colored; next MAIN 1.30: preferred, colored
Changes since revision 1.29: +5 -4 lines
Pull up following revision(s) (requested by maxv in ticket #1502):
	sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.39
Fix a ring0 escalation vulnerability in compat_linux32 where the
index of %cs is controlled by userland, making it easy to trigger
the page fault and get kernel privileges.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Sat Sep 2 12:57:03 2017 UTC (7 years, 3 months ago) by maxv
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +5 -4 lines
Fix a subtle ring0 escalation vulnerability in amd64, and implement a
mitigation against similar bugs.

The operations on segment registers can generate a page fault if there is
an issue when touching the in-memory gdt. Theoretically, it is never
supposed to happen, since the gdt is mapped correctly. However, in the
kernel we allow the gdt to be resized, and to do that, we allocate the
maximum amount of va needed by it, but only kenter a few pages until we
need more. Moreover, to avoid reloading the gdt each time we grow it, the
'size' field of gdtr is set to the maximum value. All of this means that
if a mov or iretq is done with a segment register whose index hits a page
that has not been kentered, a page fault is sent.

Such a page fault, if received in kernel mode, does not trigger a swapgs
on amd64; in other words, the kernel would be re-entered with the userland
tls.

And there just happens to be a place in compat_linux32 where the index of
%cs is controlled by userland, making it easy to trigger the page fault
and get kernel privileges.

The mitigation simply consists in abandoning the gdt_grow mechanism and
allocating/kentering the maximum size right away, in such a way that no
page fault can be triggered because of segment registers.

Revision 1.36.6.2: download - view: text, markup, annotated - select for diffs
Mon Aug 28 17:51:59 2017 UTC (7 years, 3 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.36.6.1: preferred, colored; branchpoint 1.36: preferred, colored; next MAIN 1.37: preferred, colored
Changes since revision 1.36.6.1: +3 -3 lines
Sync with HEAD

Revision 1.37.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 21 16:53:42 2017 UTC (7 years, 7 months ago) by bouyer
Branches: bouyer-socketcan
Diff to: previous 1.37: preferred, colored; next MAIN 1.38: preferred, colored
Changes since revision 1.37: +3 -3 lines
Sync with HEAD

Revision 1.36.10.1: download - view: text, markup, annotated - select for diffs
Mon Mar 20 06:57:25 2017 UTC (7 years, 8 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.36: preferred, colored; next MAIN 1.37: preferred, colored
Changes since revision 1.36: +4 -4 lines
Sync with HEAD

Revision 1.38: download - view: text, markup, annotated - select for diffs
Sun Feb 5 08:52:11 2017 UTC (7 years, 10 months ago) by maxv
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-localcount-20170320, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: netbsd-8
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +3 -3 lines
Remove #if 0 on USER_LDT.

Revision 1.36.6.1: download - view: text, markup, annotated - select for diffs
Wed Oct 5 20:55:39 2016 UTC (8 years, 2 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +3 -3 lines
Sync with HEAD

Revision 1.37: download - view: text, markup, annotated - select for diffs
Fri Sep 2 07:51:05 2016 UTC (8 years, 3 months ago) by maxv
Branches: MAIN
CVS tags: pgoyette-localcount-20170107, pgoyette-localcount-20161104, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, localcount-20160914, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +3 -3 lines
Fix argument (does not compile anyway).

Revision 1.31.2.1: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:03:32 2014 UTC (10 years, 3 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +6 -10 lines
Rebase to HEAD as of a few days ago.

Revision 1.29.4.2: download - view: text, markup, annotated - select for diffs
Thu May 22 11:40:17 2014 UTC (10 years, 6 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.29.4.1: preferred, colored; branchpoint 1.29: preferred, colored; next MAIN 1.30: preferred, colored
Changes since revision 1.29.4.1: +6 -10 lines
sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.31.4.1: download - view: text, markup, annotated - select for diffs
Sun May 18 17:45:33 2014 UTC (10 years, 6 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.31: preferred, colored; next MAIN 1.32: preferred, colored
Changes since revision 1.31: +6 -10 lines
sync with head

Revision 1.36: download - view: text, markup, annotated - select for diffs
Wed Feb 19 21:45:01 2014 UTC (10 years, 9 months ago) by dsl
Branches: MAIN
CVS tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE
Branch point for: pgoyette-localcount, nick-nhusb, netbsd-7-1, netbsd-7-0, netbsd-7
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +4 -2 lines
Explicitly include x86/fpu.h instead of relying in x86/frame.h including it.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Sat Feb 15 10:11:15 2014 UTC (10 years, 9 months ago) by dsl
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +4 -10 lines
Remove all references to MDL_USEDFPU and deferred fpu initialisation.
The cost of zeroing the save area on exec is minimal.
This stops the FP registers of a random process being used the first
  time an lwp uses the fpu.
sendsig_siginfo() and get_mcontext() now unconditionally copy the FP
registers.
I'll remove the double-copy for signal handlers soon.
get_mcontext() might have been leaking kernel memory to userspace - and
  may still do so if i386_use_fxsave is false (short copies).

Revision 1.34: download - view: text, markup, annotated - select for diffs
Fri Feb 7 22:40:22 2014 UTC (10 years, 10 months ago) by dsl
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +5 -5 lines
Convert the amd64 build to use x86/cpu_extended_state.h so that the fpu
  definitions match those of i386.
Mostly just structure and field renames, in addition:
1) process_xmm_to_s87() and process_s87_to_xmm() moved into
   x86/convert_xmm_s87.c so they can be used by amd64's netbsd32 code.
2) The linux signal code simplified to use a structure copy for ths fxsave
   data - it matches the hardware definition and won't change.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Sun Dec 1 01:05:16 2013 UTC (11 years ago) by christos
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +4 -4 lines
revert fpu/pcu changes until we figure out what's wrong; they cause random
freezes

Revision 1.32: download - view: text, markup, annotated - select for diffs
Wed Oct 23 20:18:51 2013 UTC (11 years, 1 month ago) by drochner
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +6 -6 lines
Use the MI "pcu" framework for bookkeeping of npx/fpu states on x86.
This reduces the amount of MD code enormously, and makes it easier
to implement support for newer CPU features which require more fpu
state, or for fpu usage by the kernel.
For access to FPU state across CPUs, an xcall kthread is used now
rather than a dedicated IPI.
No user visible changes intended.

Revision 1.29.4.1: download - view: text, markup, annotated - select for diffs
Tue Oct 30 17:20:44 2012 UTC (12 years, 1 month ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +4 -11 lines
sync with head

Revision 1.31: download - view: text, markup, annotated - select for diffs
Sun Jul 15 15:17:56 2012 UTC (12 years, 4 months ago) by dsl
Branches: MAIN
CVS tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Branch point for: tls-maxphys, rmind-smpnet
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +3 -10 lines
Rename MDP_IRET to MDL_IRET since it is an lwp flag, not a proc one.
Add an MDL_COMPAT32 flag to the lwp's md_flags, set it for 32bit lwps
  and use it to force 'return to user' with iret (as is done when
  MDL_IRET is set).
Split the iret/sysret code paths much later.
Remove all the replicated code for 32bit system calls - which was only
  needed so that iret was always used.
frameasm.h for XEN contains '#define swapgs', while XEN probable never
  needs swapgs, this is likely to be confusing.
Add a SWAPGS which is a nop on XEN and swapgs otherwise.
(I've not yet checked all the swapgs in files that include frameasm.h)
Simple x86 programs still work.
Hijack 6.99.9 kernel bump (needed for compat32 modules)

Revision 1.30: download - view: text, markup, annotated - select for diffs
Sun Jul 8 20:14:12 2012 UTC (12 years, 5 months ago) by dsl
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +3 -3 lines
The MDP_USEDFPU (amd64 and sh3) and MDP_SSTEP (sh3) are lwp flags not
process ones, rename to MDL_xxx.

Revision 1.27.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 6 09:07:28 2011 UTC (13 years, 6 months ago) by jruoho
Branches: jruoho-x86intr
Diff to: previous 1.27: preferred, colored; next MAIN 1.28: preferred, colored
Changes since revision 1.27: +5 -5 lines
Sync with HEAD.

Revision 1.23.4.1: download - view: text, markup, annotated - select for diffs
Sat Mar 5 20:52:51 2011 UTC (13 years, 9 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.23: preferred, colored; next MAIN 1.24: preferred, colored
Changes since revision 1.23: +93 -63 lines
sync with head

Revision 1.27.4.2: download - view: text, markup, annotated - select for diffs
Sat Mar 5 15:10:14 2011 UTC (13 years, 9 months ago) by bouyer
Branches: bouyer-quota2
Diff to: previous 1.27.4.1: preferred, colored; branchpoint 1.27: preferred, colored; next MAIN 1.28: preferred, colored
Changes since revision 1.27.4.1: +3 -3 lines
Sync with HEAD

Revision 1.29: download - view: text, markup, annotated - select for diffs
Fri Mar 4 22:25:31 2011 UTC (13 years, 9 months ago) by joerg
Branches: MAIN
CVS tags: yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, rmind-uvmplock-nbase, rmind-uvmplock-base, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10, jmcneill-usbmp-base, jmcneill-usbmp, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase
Branch point for: yamt-pagecache, netbsd-6-1, netbsd-6-0, netbsd-6
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +3 -3 lines
Refactor ps_strings access. Based on PK_32, write either the normal
version or the 32bit compat layout in execve1. Introduce a new function
copyin_psstrings for reading it back from userland and converting it to
the native layout. Refactor procfs to share most of the code with the
kern.proc_args sysctl handler.

This material is based upon work partially supported by
The NetBSD Foundation under a contract with Joerg Sonnenberger.

Revision 1.27.4.1: download - view: text, markup, annotated - select for diffs
Tue Feb 8 16:19:46 2011 UTC (13 years, 10 months ago) by bouyer
Branches: bouyer-quota2
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +4 -4 lines
Sync with HEAD

Revision 1.28: download - view: text, markup, annotated - select for diffs
Mon Feb 7 03:54:45 2011 UTC (13 years, 10 months ago) by chs
Branches: MAIN
CVS tags: bouyer-quota2-base
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +4 -4 lines
move macros for validating fs/gs to segments.h and use them
in the linux32 code as well.

Revision 1.23.2.2: download - view: text, markup, annotated - select for diffs
Sat Nov 6 08:08:25 2010 UTC (14 years, 1 month ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.23.2.1: preferred, colored; branchpoint 1.23: preferred, colored; next MAIN 1.24: preferred, colored
Changes since revision 1.23.2.1: +18 -2 lines
Sync with HEAD.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Tue Nov 2 18:14:06 2010 UTC (14 years, 1 month ago) by chs
Branches: MAIN
CVS tags: uebayasi-xip-base4, matt-mips64-premerge-20101231, jruoho-x86intr-base
Branch point for: jruoho-x86intr, bouyer-quota2
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +18 -2 lines
implement the following syscalls for linux32:
  truncate64
  ftruncate64
  profil
  ioperm
  iopl
  setdomainname
  modify_ldt
  statfs64
  fstatfs64

note that iopl(), ioperm() and modify_ldt() just call
the respective 64-bit handlers, which don't do anything yet.

Revision 1.23.2.1: download - view: text, markup, annotated - select for diffs
Tue Aug 17 06:45:50 2010 UTC (14 years, 3 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +76 -62 lines
Sync with HEAD.

Revision 1.17.2.4: download - view: text, markup, annotated - select for diffs
Wed Aug 11 22:53:09 2010 UTC (14 years, 4 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.17.2.3: preferred, colored; branchpoint 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17.2.3: +76 -62 lines
sync with head.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Mon Jul 12 02:55:17 2010 UTC (14 years, 5 months ago) by christos
Branches: MAIN
CVS tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base3, uebayasi-xip-base2
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +6 -6 lines
fix debugging build.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Wed Jul 7 12:43:18 2010 UTC (14 years, 5 months ago) by jmmv
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +6 -2 lines
Add missing includes to bring the linux_semun type needed by
linux_syscallargs.h.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Wed Jul 7 01:30:35 2010 UTC (14 years, 5 months ago) by chs
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +72 -62 lines
many changes for COMPAT_LINUX:
 - update the linux syscall table for each platform.
 - support new-style (NPTL) linux pthreads on all platforms.
   clone() with CLONE_THREAD uses 1 process with many LWPs
   instead of separate processes.
 - move the contents of sys__lwp_setprivate() into a new
   lwp_setprivate() and use that everywhere.
 - update linux_release[] and linux32_release[] to "2.6.18".
 - adjust placement of emul fork/exec/exit hooks as needed
   and adjust other emul code to match.
 - convert all struct emul definitions to use named initializers.
 - change the pid allocator to allow multiple pids to refer to the same proc.
 - remove a few fields from struct proc that are no longer needed.
 - disable the non-functional "vdso" code in linux32/amd64,
   glibc works fine without it.
 - fix a race in the futex code where we could miss a wakeup after
   a requeue operation.
 - redo futex locking to be a little more efficient.

Revision 1.17.2.3: download - view: text, markup, annotated - select for diffs
Thu Mar 11 15:03:17 2010 UTC (14 years, 9 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.17.2.2: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.2.2: +14 -9 lines
sync with head

Revision 1.23: download - view: text, markup, annotated - select for diffs
Mon Nov 23 00:46:07 2009 UTC (15 years ago) by rmind
Branches: MAIN
CVS tags: yamt-nfs-mp-base9, uebayasi-xip-base1, uebayasi-xip-base, matt-premerge-20091211
Branch point for: uebayasi-xip, rmind-uvmplock
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +14 -9 lines
Use lwp_getpcb() in compat code, clean from struct user.

Revision 1.20.8.2: download - view: text, markup, annotated - select for diffs
Thu Jul 23 23:31:42 2009 UTC (15 years, 4 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.20.8.1: preferred, colored; branchpoint 1.20: preferred, colored; next MAIN 1.21: preferred, colored
Changes since revision 1.20.8.1: +4 -8 lines
Sync with HEAD.

Revision 1.17.2.2: download - view: text, markup, annotated - select for diffs
Sat Jun 20 07:20:17 2009 UTC (15 years, 5 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.17.2.1: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.2.1: +4 -8 lines
sync with head

Revision 1.22: download - view: text, markup, annotated - select for diffs
Fri May 29 14:19:13 2009 UTC (15 years, 6 months ago) by njoly
Branches: MAIN
CVS tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, jymxensuspend-base, jym-xensuspend-nbase
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +4 -8 lines
Add native to linux siginfo si_status translation, used on i386 and
amd64.

Revision 1.20.8.1: download - view: text, markup, annotated - select for diffs
Wed May 13 17:18:59 2009 UTC (15 years, 7 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +6 -11 lines
Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.

Revision 1.17.2.1: download - view: text, markup, annotated - select for diffs
Mon May 4 08:12:23 2009 UTC (15 years, 7 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +10 -15 lines
sync with head.

Revision 1.20.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 28 07:35:07 2009 UTC (15 years, 7 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.20: preferred, colored; next MAIN 1.21: preferred, colored
Changes since revision 1.20: +6 -11 lines
Sync with HEAD.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Sun Mar 15 15:56:50 2009 UTC (15 years, 9 months ago) by cegger
Branches: MAIN
CVS tags: yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jym-xensuspend-base
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +6 -11 lines
ansify function definitions

Revision 1.16.6.3: download - view: text, markup, annotated - select for diffs
Sat Jan 17 13:28:45 2009 UTC (15 years, 10 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.16.6.2: preferred, colored; branchpoint 1.16: preferred, colored; next MAIN 1.17: preferred, colored
Changes since revision 1.16.6.2: +2 -2 lines
Sync with HEAD.

Revision 1.17.8.1: download - view: text, markup, annotated - select for diffs
Sun Oct 19 22:16:14 2008 UTC (16 years, 1 month ago) by haad
Branches: haad-dm
Diff to: previous 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17: +6 -6 lines
Sync with HEAD.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Sun Oct 19 09:44:31 2008 UTC (16 years, 1 month ago) by njoly
Branches: MAIN
CVS tags: nick-hppapmap-base2, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, mjf-devfs2-base, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, jym-xensuspend
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +3 -3 lines
Add native to linux siginfo si_code translation, mostly for negative
values. Adjust amd64 and i386 accordingly, not sure about aother archs
i can't test.

Revision 1.17.4.4: download - view: text, markup, annotated - select for diffs
Fri Oct 10 22:29:46 2008 UTC (16 years, 2 months ago) by skrll
Branches: wrstuden-revivesa
Diff to: previous 1.17.4.3: preferred, colored; branchpoint 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17.4.3: +3 -3 lines
Sync with HEAD.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Thu Oct 9 23:03:45 2008 UTC (16 years, 2 months ago) by njoly
Branches: MAIN
CVS tags: wrstuden-revivesa-base-4
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +3 -3 lines
Fix linux32 siginfo si_signo value. Do not convert ksi_signo twice.

Revision 1.16.6.2: download - view: text, markup, annotated - select for diffs
Sun Sep 28 10:40:15 2008 UTC (16 years, 2 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.16.6.1: preferred, colored; branchpoint 1.16: preferred, colored
Changes since revision 1.16.6.1: +2 -2 lines
Sync with HEAD.

Revision 1.17.4.3: download - view: text, markup, annotated - select for diffs
Wed Sep 24 16:38:51 2008 UTC (16 years, 2 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.17.4.2: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.4.2: +4 -4 lines
Merge in changes between wrstuden-revivesa-base-2 and
wrstuden-revivesa-base-3.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Thu Sep 18 15:57:04 2008 UTC (16 years, 2 months ago) by christos
Branches: MAIN
CVS tags: wrstuden-revivesa-base-3
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +4 -4 lines
Define a PSL_CLEARSIG macro for the psl flags to be cleared on signal delivery
and use it everywhere.

Revision 1.16.6.1: download - view: text, markup, annotated - select for diffs
Mon Jun 2 13:23:04 2008 UTC (16 years, 6 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +8 -8 lines
Sync with HEAD.

Revision 1.16.8.1: download - view: text, markup, annotated - select for diffs
Sun May 18 12:33:23 2008 UTC (16 years, 6 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.16: preferred, colored; next MAIN 1.17: preferred, colored
Changes since revision 1.16: +8 -8 lines
sync with head.

Revision 1.17.4.2: download - view: text, markup, annotated - select for diffs
Wed May 14 01:35:08 2008 UTC (16 years, 7 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.17.4.1: preferred, colored; branchpoint 1.17: preferred, colored
Changes since revision 1.17.4.1: +2 -3 lines
Per discussion with ad, remove most of the #include <sys/sa.h> lines
as they were including sa.h just for the type(s) needed for syscallargs.h.

Instead, create a new file, sys/satypes.h, which contains just the
types needed for syscallargs.h. Yes, there's only one now, but that
may change and it's probably more likely to change if it'd be difficult
to handle. :-)

Per discussion with matt at n dot o, add an include of satypes.h to
sigtypes.h. Upcall handlers are kinda signal handlers, and signalling
is the header file that's already included for syscallargs.h that
closest matches SA.

This shaves about 3000 lines off of the diff of the branch relative
to the base. That also represents about 18% of the total before this
checkin.

I think this reduction is very good thing.

Revision 1.17.4.1: download - view: text, markup, annotated - select for diffs
Sat May 10 23:48:56 2008 UTC (16 years, 7 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +3 -2 lines
Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Thu Apr 24 18:39:23 2008 UTC (16 years, 7 months ago) by ad
Branches: MAIN
CVS tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, yamt-nfs-mp-base, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, hpcarm-cleanup-nbase
Branch point for: yamt-nfs-mp, wrstuden-revivesa, haad-dm
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +8 -8 lines
Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.

Revision 1.1.16.8: download - view: text, markup, annotated - select for diffs
Mon Jan 21 09:41:32 2008 UTC (16 years, 10 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.1.16.7: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.16.7: +9 -20 lines
sync with head

Revision 1.11.8.2: download - view: text, markup, annotated - select for diffs
Wed Jan 9 01:51:19 2008 UTC (16 years, 11 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.11.8.1: preferred, colored; branchpoint 1.11: preferred, colored; next MAIN 1.12: preferred, colored
Changes since revision 1.11.8.1: +20 -31 lines
sync with HEAD

Revision 1.15.4.1: download - view: text, markup, annotated - select for diffs
Wed Jan 2 21:52:46 2008 UTC (16 years, 11 months ago) by bouyer
Branches: bouyer-xeni386
CVS tags: bouyer-xeni386-merge1
Diff to: previous 1.15: preferred, colored; next MAIN 1.16: preferred, colored
Changes since revision 1.15: +8 -8 lines
Sync with HEAD

Revision 1.12.2.2: download - view: text, markup, annotated - select for diffs
Thu Dec 27 00:44:14 2007 UTC (16 years, 11 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.12.2.1: preferred, colored; branchpoint 1.12: preferred, colored; next MAIN 1.13: preferred, colored
Changes since revision 1.12.2.1: +9 -20 lines
Sync with HEAD.

Revision 1.13.2.2: download - view: text, markup, annotated - select for diffs
Wed Dec 26 21:39:02 2007 UTC (16 years, 11 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.13.2.1: preferred, colored; branchpoint 1.13: preferred, colored; next MAIN 1.14: preferred, colored
Changes since revision 1.13.2.1: +9 -20 lines
Sync with head.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Thu Dec 20 23:02:57 2007 UTC (16 years, 11 months ago) by dsl
Branches: MAIN
CVS tags: yamt-pf42-baseX, yamt-pf42-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, vmlocking2-base3, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, matt-armv6-base, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, bouyer-xeni386-nbase, bouyer-xeni386-base, ad-socklock-base1
Branch point for: yamt-pf42, mjf-devfs2
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +8 -8 lines
Convert all the system call entry points from:
    int foo(struct lwp *l, void *v, register_t *retval)
to:
    int foo(struct lwp *l, const struct foo_args *uap, register_t *retval)
Fixup compat code to not write into 'uap' and (in some cases) to actually
pass a correctly formatted 'uap' structure with the right name to the
next routine.
A few 'compat' routines that just call standard ones have been deleted.
All the 'compat' code compiles (along with the kernels required to test
build it).
98% done by automated scripts.

Revision 1.11.6.3: download - view: text, markup, annotated - select for diffs
Sun Dec 9 19:37:07 2007 UTC (17 years ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.11.6.2: preferred, colored; branchpoint 1.11: preferred, colored; next MAIN 1.12: preferred, colored
Changes since revision 1.11.6.2: +14 -25 lines
Sync with HEAD.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Sat Dec 8 18:36:10 2007 UTC (17 years ago) by dsl
Branches: MAIN
CVS tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +5 -16 lines
ANSIfy most of the function definitions in sys/compat (but not ndis).
All by the magic of sed ...

Revision 1.12.2.1: download - view: text, markup, annotated - select for diffs
Sat Dec 8 18:18:52 2007 UTC (17 years ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +13 -13 lines
Sync with HEAD.

Revision 1.13.2.1: download - view: text, markup, annotated - select for diffs
Sat Dec 8 17:56:52 2007 UTC (17 years ago) by ad
Branches: vmlocking2
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +11 -11 lines
Sync with head.

Revision 1.1.16.7: download - view: text, markup, annotated - select for diffs
Fri Dec 7 17:28:40 2007 UTC (17 years ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.1.16.6: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.16.6: +13 -13 lines
sync with head

Revision 1.14: download - view: text, markup, annotated - select for diffs
Tue Dec 4 18:40:18 2007 UTC (17 years ago) by dsl
Branches: MAIN
CVS tags: vmlocking2-base2, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +11 -11 lines
Remove all the __P

Revision 1.11.6.2: download - view: text, markup, annotated - select for diffs
Tue Nov 27 19:36:47 2007 UTC (17 years ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.11.6.1: preferred, colored; branchpoint 1.11: preferred, colored
Changes since revision 1.11.6.1: +4 -4 lines
Sync with HEAD. amd64 Xen support needs testing.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Sat Nov 24 23:52:56 2007 UTC (17 years ago) by christos
Branches: MAIN
CVS tags: vmlocking2-base1, vmlocking-nbase
Branch point for: vmlocking2
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +4 -4 lines
- move the save context before the signal reset (Arto Huusko)
- set the sigcontext cr2

Revision 1.11.8.1: download - view: text, markup, annotated - select for diffs
Tue Nov 6 23:25:04 2007 UTC (17 years, 1 month ago) by matt
Branches: matt-armv6
CVS tags: matt-armv6-prevmlocking
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +3 -3 lines
sync with HEAD

Revision 1.1.16.6: download - view: text, markup, annotated - select for diffs
Sat Oct 27 11:29:42 2007 UTC (17 years, 1 month ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.1.16.5: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.16.5: +3 -3 lines
sync with head.

Revision 1.11.6.1: download - view: text, markup, annotated - select for diffs
Fri Oct 26 15:44:01 2007 UTC (17 years, 1 month ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +3 -3 lines
Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.

Revision 1.11.12.1: download - view: text, markup, annotated - select for diffs
Thu Oct 25 22:37:01 2007 UTC (17 years, 1 month ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.11: preferred, colored; next MAIN 1.12: preferred, colored
Changes since revision 1.11: +3 -3 lines
Sync with HEAD.

Revision 1.8.2.3: download - view: text, markup, annotated - select for diffs
Tue Oct 23 20:17:00 2007 UTC (17 years, 1 month ago) by ad
Branches: vmlocking
Diff to: previous 1.8.2.2: preferred, colored; next MAIN 1.9: preferred, colored
Changes since revision 1.8.2.2: +3 -3 lines
Sync with head.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Fri Oct 19 12:16:39 2007 UTC (17 years, 1 month ago) by ad
Branches: MAIN
CVS tags: jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: mjf-devfs
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +3 -3 lines
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h

Revision 1.1.16.5: download - view: text, markup, annotated - select for diffs
Mon Sep 3 14:32:28 2007 UTC (17 years, 3 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.1.16.4: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.16.4: +17 -19 lines
sync with head.

Revision 1.8.4.1: download - view: text, markup, annotated - select for diffs
Wed Jul 11 20:04:21 2007 UTC (17 years, 5 months ago) by mjf
Branches: mjf-ufs-trans
Diff to: previous 1.8: preferred, colored; next MAIN 1.9: preferred, colored
Changes since revision 1.8: +14 -16 lines
Sync with head.

Revision 1.8.2.2: download - view: text, markup, annotated - select for diffs
Sun May 27 14:35:11 2007 UTC (17 years, 6 months ago) by ad
Branches: vmlocking
Diff to: previous 1.8.2.1: preferred, colored
Changes since revision 1.8.2.1: +3 -3 lines
Sync with head.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Mon May 21 15:35:48 2007 UTC (17 years, 6 months ago) by christos
Branches: MAIN
CVS tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking-base, nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: matt-armv6, jmcneill-pm, bouyer-xenamd64
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +3 -3 lines
rename si_sigval -> si_value to match POSIX RTS.

Revision 1.8.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 10 13:26:24 2007 UTC (17 years, 8 months ago) by ad
Branches: vmlocking
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +14 -16 lines
Sync with head.

Revision 1.8.6.2: download - view: text, markup, annotated - select for diffs
Thu Mar 29 19:27:38 2007 UTC (17 years, 8 months ago) by reinoud
Branches: reinoud-bufcleanup
Diff to: previous 1.8.6.1: preferred, colored; next MAIN 1.9: preferred, colored
Changes since revision 1.8.6.1: +4 -6 lines
Pullup to -current

Revision 1.5.2.3: download - view: text, markup, annotated - select for diffs
Sat Mar 24 14:55:10 2007 UTC (17 years, 8 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.5.2.2: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5.2.2: +14 -16 lines
sync with head.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Sun Mar 18 21:38:32 2007 UTC (17 years, 8 months ago) by dsl
Branches: MAIN
CVS tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +4 -6 lines
Change all the NETBSD32PTR64(SCARG(uap, xxx))) to SCARG_P32(uap, xxx).

Revision 1.8.6.1: download - view: text, markup, annotated - select for diffs
Sun Mar 18 00:06:35 2007 UTC (17 years, 8 months ago) by reinoud
Branches: reinoud-bufcleanup
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +12 -12 lines
First attempt to bring branch in sync with HEAD

Revision 1.9: download - view: text, markup, annotated - select for diffs
Fri Mar 16 22:21:40 2007 UTC (17 years, 9 months ago) by dsl
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +12 -12 lines
remove all the double (and triple) casts used to convert 32bit userspace
pointers to and from 64bit kernel pointers.  Instead use the defines
NETBSD32PTR64(p32) to read a 32bit pointer and (the new) NETBSD32PTR32(p32,p64)
to write a 32bit pointer throughout.
The 32bit pointer is now a struct to enforce the above.
amd64 (with linux emul) and sparc64 will both compile (when the arch stuff
goes in soon), and amd64 still runs some i386 binaries.

Revision 1.5.2.2: download - view: text, markup, annotated - select for diffs
Mon Mar 12 05:52:29 2007 UTC (17 years, 9 months ago) by rmind
Branches: yamt-idlelwp
Diff to: previous 1.5.2.1: preferred, colored
Changes since revision 1.5.2.1: +6 -6 lines
Sync with HEAD.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Mon Mar 5 14:24:18 2007 UTC (17 years, 9 months ago) by christos
Branches: MAIN
Branch point for: vmlocking, reinoud-bufcleanup, mjf-ufs-trans
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +6 -6 lines
fix caddr_t lossage

Revision 1.7: download - view: text, markup, annotated - select for diffs
Sun Mar 4 06:01:25 2007 UTC (17 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +6 -6 lines
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.5.2.1: download - view: text, markup, annotated - select for diffs
Tue Feb 27 16:53:37 2007 UTC (17 years, 9 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +3 -3 lines
- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.1.16.4: download - view: text, markup, annotated - select for diffs
Mon Feb 26 09:09:24 2007 UTC (17 years, 9 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.1.16.3: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.16.3: +25 -12 lines
sync with head.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sat Feb 17 22:31:41 2007 UTC (17 years, 9 months ago) by pavel
Branches: MAIN
CVS tags: ad-audiomp-base, ad-audiomp
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +3 -3 lines
Change the process/lwp flags seen by userland via sysctl back to the
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.

Restores source compatibility with pre-newlock2 tools like ps or top.

Reviewed by Andrew Doran.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Thu Feb 15 15:29:07 2007 UTC (17 years, 9 months ago) by ad
Branches: MAIN
Branch point for: yamt-idlelwp
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +13 -8 lines
Fix COMPAT_LINUX32.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Fri Feb 9 21:55:21 2007 UTC (17 years, 10 months ago) by ad
Branches: MAIN
CVS tags: post-newlock2-merge
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +16 -8 lines
Merge newlock2 to head.

Revision 1.1.20.3: download - view: text, markup, annotated - select for diffs
Tue Feb 6 18:59:08 2007 UTC (17 years, 10 months ago) by ad
Branches: newlock2
Diff to: previous 1.1.20.2: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.20.2: +16 -7 lines
More compat changes.

XXX compat_irix, compat_mach and compat_darwin need work.

Revision 1.1.20.2: download - view: text, markup, annotated - select for diffs
Tue Jan 30 13:51:34 2007 UTC (17 years, 10 months ago) by ad
Branches: newlock2
Diff to: previous 1.1.20.1: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.20.1: +2 -3 lines
Remove support for SA. Ok core@.

Revision 1.1.20.1: download - view: text, markup, annotated - select for diffs
Fri Jan 12 01:04:03 2007 UTC (17 years, 11 months ago) by ad
Branches: newlock2
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +4 -4 lines
Sync with head.

Revision 1.1.16.3: download - view: text, markup, annotated - select for diffs
Sat Dec 30 20:47:38 2006 UTC (17 years, 11 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.1.16.2: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.16.2: +4 -4 lines
sync with head.

Revision 1.1.24.1: download - view: text, markup, annotated - select for diffs
Sun Dec 10 07:16:48 2006 UTC (18 years ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1: +4 -4 lines
sync with head.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Wed Nov 22 13:56:09 2006 UTC (18 years ago) by christos
Branches: MAIN
CVS tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, newlock2-nbase, newlock2-base, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +3 -3 lines
adjust_limits takes p, not l again

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue Nov 21 14:32:27 2006 UTC (18 years ago) by christos
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +5 -5 lines
From Nicolas Joly:

> It seems that 32bits programs, running under compat_netbsd32, using
> setrlimit force all other programs to have their maximum data size
> fixed at 3GB, where native 64bits apps used 8GB previously.

I tracked this one to the `netbsd32_adjust_limits()' function (called
when creating a new process under compat_netbsd32), where data and
stack limits are set without checking for shared `p_limit' structure
(p_limit->p_refcnt > 1). This explain the side effect where processes
have their limits changed when a compat_netbsd32 (or compat_linux32)
program is run.

The fix is to use `dosetrlimit()' to ensure the needed copy-on-write
behaviour for shared structure.

Revision 1.1.22.2: download - view: text, markup, annotated - select for diffs
Sat Sep 9 02:45:52 2006 UTC (18 years, 3 months ago) by rpaulo
Branches: rpaulo-netinet-merge-pcb
Diff to: previous 1.1.22.1: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.22.1: +505 -0 lines
sync with head

Revision 1.1.16.2: download - view: text, markup, annotated - select for diffs
Wed Jun 21 14:59:27 2006 UTC (18 years, 5 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.1.16.1: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.16.1: +505 -0 lines
sync with head.

Revision 1.1.10.2: download - view: text, markup, annotated - select for diffs
Sat Apr 22 11:38:14 2006 UTC (18 years, 7 months ago) by simonb
Branches: simonb-timecounters
CVS tags: simonb-timcounters-final
Diff to: previous 1.1.10.1: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.10.1: +505 -0 lines
Sync with head.

Revision 1.1.2.2: download - view: text, markup, annotated - select for diffs
Sat Feb 18 15:38:59 2006 UTC (18 years, 9 months ago) by yamt
Branches: yamt-uio_vmspace
Diff to: previous 1.1.2.1: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.2.1: +505 -0 lines
sync with head.

Revision 1.1.22.1
Thu Feb 9 19:18:57 2006 UTC (18 years, 10 months ago) by rpaulo
Branches: rpaulo-netinet-merge-pcb
FILE REMOVED
Changes since revision 1.1: +0 -505 lines
file linux32_machdep.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:45:52 +0000

Revision 1.1.16.1
Thu Feb 9 19:18:57 2006 UTC (18 years, 10 months ago) by yamt
Branches: yamt-lazymbuf
FILE REMOVED
Changes since revision 1.1: +0 -505 lines
file linux32_machdep.c was added on branch yamt-lazymbuf on 2006-06-21 14:59:27 +0000

Revision 1.1.10.1
Thu Feb 9 19:18:57 2006 UTC (18 years, 10 months ago) by simonb
Branches: simonb-timecounters
FILE REMOVED
Changes since revision 1.1: +0 -505 lines
file linux32_machdep.c was added on branch simonb-timecounters on 2006-04-22 11:38:14 +0000

Revision 1.1.2.1
Thu Feb 9 19:18:57 2006 UTC (18 years, 10 months ago) by yamt
Branches: yamt-uio_vmspace
FILE REMOVED
Changes since revision 1.1: +0 -505 lines
file linux32_machdep.c was added on branch yamt-uio_vmspace on 2006-02-18 15:38:59 +0000

Revision 1.1: download - view: text, markup, annotated - select for diffs
Thu Feb 9 19:18:57 2006 UTC (18 years, 10 months ago) by manu
Branches: MAIN
CVS tags: yamt-uio_vmspace-base5, yamt-splraiseipl-base2, yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, yamt-pdpolicy-base6, yamt-pdpolicy-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, yamt-pdpolicy, simonb-timecounters-base, rpaulo-netinet-merge-pcb-base, peter-altq-base, peter-altq, gdamore-uart-base, gdamore-uart, elad-kernelauth-base, elad-kernelauth, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-uio_vmspace, yamt-splraiseipl, yamt-lazymbuf, simonb-timecounters, rpaulo-netinet-merge-pcb, newlock2
Add initial (but unfinished) COMPAT_LINUX32 for amd64. This is good enough so
that the i386 license manager part of amd64 version of Fluent works.

While I'm here, add SysV IPC to COMPAT_LINUX/amd64

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>