<feed xmlns='http://www.w3.org/2005/Atom'>
<title>netbsd/sys/compat/linux32/common/linux32_exec_elf32.c, branch lockcount-9.3</title>
<subtitle>NetBSD fork for lockdoc analysis</subtitle>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/'/>
<entry>
<title>Pull up following revision(s), all via patch</title>
<updated>2022-08-03T11:11:31+00:00</updated>
<author>
<name>martin</name>
<email>martin@NetBSD.org</email>
</author>
<published>2022-08-03T11:11:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=c0cbb295300c06ff7945a8867c3b48a4e30dcb6c'/>
<id>c0cbb295300c06ff7945a8867c3b48a4e30dcb6c</id>
<content type='text'>
(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.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(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.</pre>
</div>
</content>
</entry>
<entry>
<title>The way the kernel tries to prevent a userland process from allocating page</title>
<updated>2016-08-06T15:13:13+00:00</updated>
<author>
<name>maxv</name>
<email>maxv@NetBSD.org</email>
</author>
<published>2016-08-06T15:13:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=e9652cc8f54db6dcd4c193f4e40483cb6584d55a'/>
<id>e9652cc8f54db6dcd4c193f4e40483cb6584d55a</id>
<content type='text'>
zero is hugely flawed. It is easy to demonstrate that one can trick UVM
into chosing a NULL hint after the user_va0_disable check from uvm_map.
Such a bypass allows kernel NULL pointer dereferences to be exploitable on
architectures with a shared userland&lt;-&gt;kernel VA, like amd64.

Fix this by increasing the limit of the vm space made available for
userland processes. This way, UVM will never chose a NULL hint, since it
would be outside of the vm space.

The user_va0_disable sysctl still controls this feature.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
zero is hugely flawed. It is easy to demonstrate that one can trick UVM
into chosing a NULL hint after the user_va0_disable check from uvm_map.
Such a bypass allows kernel NULL pointer dereferences to be exploitable on
architectures with a shared userland&lt;-&gt;kernel VA, like amd64.

Fix this by increasing the limit of the vm space made available for
userland processes. This way, UVM will never chose a NULL hint, since it
would be outside of the vm space.

The user_va0_disable sysctl still controls this feature.</pre>
</div>
</content>
</entry>
<entry>
<title>Zero-fill the ELF auxiliary vectors. Otherwise, on 64bit systems, the</title>
<updated>2015-03-20T20:36:27+00:00</updated>
<author>
<name>maxv</name>
<email>maxv@NetBSD.org</email>
</author>
<published>2015-03-20T20:36:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=18c81562cdc9217f390ea8e4ce104ac5c2e61331'/>
<id>18c81562cdc9217f390ea8e4ce104ac5c2e61331</id>
<content type='text'>
padding between a_v and a_type contains kernel garbage, therefore
exposed to userland.

Original report by uebayasi@</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
padding between a_v and a_type contains kernel garbage, therefore
exposed to userland.

Original report by uebayasi@</pre>
</div>
</content>
</entry>
<entry>
<title>Use Aux32Info not AuxInfo. Noticed by Maxime Villard.</title>
<updated>2014-02-23T16:07:40+00:00</updated>
<author>
<name>njoly</name>
<email>njoly@NetBSD.org</email>
</author>
<published>2014-02-23T16:07:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=c8cb53dd227b0c351bb047686f725eaedb0502df'/>
<id>c8cb53dd227b0c351bb047686f725eaedb0502df</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix wrong KASSERTs. Do not compare size vs. entries count.</title>
<updated>2014-02-23T11:09:42+00:00</updated>
<author>
<name>njoly</name>
<email>njoly@NetBSD.org</email>
</author>
<published>2014-02-23T11:09:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=568406cfcd6b8e03309719864eba46d5a1876ed6'/>
<id>568406cfcd6b8e03309719864eba46d5a1876ed6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Increase LINUX32_ELF_AUX_ENTRIES to avoid overrun in linux32/. Also,</title>
<updated>2014-02-21T07:53:53+00:00</updated>
<author>
<name>maxv</name>
<email>maxv@NetBSD.org</email>
</author>
<published>2014-02-21T07:53:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=d91ba50b1f2201f6aece5635388d036fdcd2b58b'/>
<id>d91ba50b1f2201f6aece5635388d036fdcd2b58b</id>
<content type='text'>
add comments and KASSERTs to make sure people don't forget to increase
XX_AUX_ENTRIES's when adding vectors.

Reported by martin@ (CV), with suggestions from chs@.

ok martin@ chs@</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
add comments and KASSERTs to make sure people don't forget to increase
XX_AUX_ENTRIES's when adding vectors.

Reported by martin@ (CV), with suggestions from chs@.

ok martin@ chs@</pre>
</div>
</content>
</entry>
<entry>
<title>account for the 16 bytes of AT_RANDOM data in the stack setup.  fixes PR 48518.</title>
<updated>2014-02-09T16:41:42+00:00</updated>
<author>
<name>chs</name>
<email>chs@NetBSD.org</email>
</author>
<published>2014-02-09T16:41:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=f7c329827e68f9be4bc09b6b496d27d94d316c55'/>
<id>f7c329827e68f9be4bc09b6b496d27d94d316c55</id>
<content type='text'>
use cprng_strong32() instead of random().  add AT_RANDOM support for linux32.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
use cprng_strong32() instead of random().  add AT_RANDOM support for linux32.</pre>
</div>
</content>
</entry>
<entry>
<title>Add a hook for freeing an ep_emul_arg.  Add a wrapper routine</title>
<updated>2012-02-03T20:11:53+00:00</updated>
<author>
<name>matt</name>
<email>matt@NetBSD.org</email>
</author>
<published>2012-02-03T20:11:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=5e19e17ce50c70ce8005138f4c0957b0ea071ce4'/>
<id>5e19e17ce50c70ce8005138f4c0957b0ea071ce4</id>
<content type='text'>
(exec_free_emul_arg) to call the hook and then clear the ep_emul_arg
and ep_emul_arg_free members in the exec_package.
Change users/accessors to use these routines.
Approved by releng.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(exec_free_emul_arg) to call the hook and then clear the ep_emul_arg
and ep_emul_arg_free members in the exec_package.
Change users/accessors to use these routines.
Approved by releng.</pre>
</div>
</content>
</entry>
<entry>
<title>always supply an auxiliary vector for linux ELF processes.</title>
<updated>2010-09-11T20:49:28+00:00</updated>
<author>
<name>chs</name>
<email>chs@NetBSD.org</email>
</author>
<published>2010-09-11T20:49:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=590b90699b95d6d966d45fec0bd6cb91432b239a'/>
<id>590b90699b95d6d966d45fec0bd6cb91432b239a</id>
<content type='text'>
static executables (such as newer versions of /sbin/ldconfig)
require this to work properly.  since static executables
also don't have a PT_PHDR entry, use the same heuristic as
linux does to provide a value for AT_PHDR in this case.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
static executables (such as newer versions of /sbin/ldconfig)
require this to work properly.  since static executables
also don't have a PT_PHDR entry, use the same heuristic as
linux does to provide a value for AT_PHDR in this case.</pre>
</div>
</content>
</entry>
<entry>
<title>many changes for COMPAT_LINUX:</title>
<updated>2010-07-07T01:30:32+00:00</updated>
<author>
<name>chs</name>
<email>chs@NetBSD.org</email>
</author>
<published>2010-07-07T01:30:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=33fa5ccbbf17bc2390e2d136c34926c6f93ac5d1'/>
<id>33fa5ccbbf17bc2390e2d136c34926c6f93ac5d1</id>
<content type='text'>
 - 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.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
 - 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.</pre>
</div>
</content>
</entry>
</feed>
