<feed xmlns='http://www.w3.org/2005/Atom'>
<title>netbsd/sys/modules/lua/lua.c, branch trunk</title>
<subtitle>NetBSD fork for lockdoc analysis</subtitle>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/'/>
<entry>
<title>For device modules that provide both auto-config and /dev/xxx</title>
<updated>2022-03-31T19:30:15+00:00</updated>
<author>
<name>pgoyette</name>
<email>pgoyette@NetBSD.org</email>
</author>
<published>2022-03-31T19:30:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=74849b7b725a6b694bebdbb34a7b9cc04de02a3a'/>
<id>74849b7b725a6b694bebdbb34a7b9cc04de02a3a</id>
<content type='text'>
interfaces, make sure that initialization and destruction
follow the proper sequence.  This is triggered by the recent
changes to the devsw stuff; per riastradh@ the required call
sequence is:

	devsw_attach()
	config_init_component() or config_cf*_attach()
	...
	config_fini_component() or config_cf*_detach()
	devsw_detach()

While here, add a few missing calls to some of the detach
routines.

Testing of these changes has been limited to:
	1. compile without build break
	2. no related test failures from atf
	3. modload/modunload work as well as
	   before.

No functional device testing done, since I don't have any
of these devices.  Let me know of any damage I might cause
here!

XXX Some of the modules affected by this commit are already
XXX broken;  see kern/56772.  This commit does not break
any additional modules (as far as I know).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
interfaces, make sure that initialization and destruction
follow the proper sequence.  This is triggered by the recent
changes to the devsw stuff; per riastradh@ the required call
sequence is:

	devsw_attach()
	config_init_component() or config_cf*_attach()
	...
	config_fini_component() or config_cf*_detach()
	devsw_detach()

While here, add a few missing calls to some of the detach
routines.

Testing of these changes has been limited to:
	1. compile without build break
	2. no related test failures from atf
	3. modload/modunload work as well as
	   before.

No functional device testing done, since I don't have any
of these devices.  Let me know of any damage I might cause
here!

XXX Some of the modules affected by this commit are already
XXX broken;  see kern/56772.  This commit does not break
any additional modules (as far as I know).</pre>
</div>
</content>
</entry>
<entry>
<title>Fix LIST operations, found by strictly-aligned CPUs, i.e., ARMv5 and IBM403:</title>
<updated>2021-08-08T22:26:32+00:00</updated>
<author>
<name>rin</name>
<email>rin@NetBSD.org</email>
</author>
<published>2021-08-08T22:26:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=ac361a949f5e7e663274d24c8689043a338bfd70'/>
<id>ac361a949f5e7e663274d24c8689043a338bfd70</id>
<content type='text'>
- Initialize LIST_HEAD.
- Use LIST_FOREACH_SAFE() where necessary.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Initialize LIST_HEAD.
- Use LIST_FOREACH_SAFE() where necessary.</pre>
</div>
</content>
</entry>
<entry>
<title>Make sure that buffers allocated by lua_alloc() are aligned to 8-byte</title>
<updated>2021-08-07T04:19:31+00:00</updated>
<author>
<name>rin</name>
<email>rin@NetBSD.org</email>
</author>
<published>2021-08-07T04:19:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=6831ca07b18e59371378ad5a38479d5c68fa924d'/>
<id>6831ca07b18e59371378ad5a38479d5c68fa924d</id>
<content type='text'>
boundaries as done by kmem_alloc(9).

Fix alignment faults on armv5te; GCC emits ldrd/strd instructions for
memory operands that are guaranteed to be aligned properly.

Drop unnecessary __packed attribute from alloc_header_t at the same time.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
boundaries as done by kmem_alloc(9).

Fix alignment faults on armv5te; GCC emits ldrd/strd instructions for
memory operands that are guaranteed to be aligned properly.

Drop unnecessary __packed attribute from alloc_header_t at the same time.</pre>
</div>
</content>
</entry>
<entry>
<title>Add containment for the cloning devices hack in vn_open.</title>
<updated>2021-06-29T22:40:53+00:00</updated>
<author>
<name>dholland</name>
<email>dholland@NetBSD.org</email>
</author>
<published>2021-06-29T22:40:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=c3e886adfa3ed5eaaf798d07ae03d6dee7b33895'/>
<id>c3e886adfa3ed5eaaf798d07ae03d6dee7b33895</id>
<content type='text'>
Cloning devices (and also things like /dev/stderr) work by allocating
a struct file, stuffing it in the file table (which is a layer
violation), stuffing the file descriptor number for it in a magic
field of struct lwp (which is gross), and then "failing" with one of
two magic errnos, EDUPFD or EMOVEFD.

Before this commit, all callers of vn_open in the kernel (there are
quite a few) were expected to check for these errors and handle the
situation. Needless to say, none of them except for open() itself did,
resulting in internal negative errnos being returned to userspace.

This hack is fairly deeply rooted and cannot be eliminated all at
once. This commit adds logic to handle the magic errnos inside
vn_open; now on success vn_open returns either a vnode or an integer
file descriptor, along with a flag that says whether the underlying
code requested EDUPFD or EMOVEFD. Callers not prepared to cope with
file descriptors can pass NULL for the extra return values, in which
case if a file descriptor would be produced vn_open fails with
EOPNOTSUPP.

Since I'm rearranging vn_open's signature anyway, stop exposing struct
nameidata. Instead, take three arguments: an optional vnode to use as
the starting point (like openat()), the path, and additional namei
flags to use, restricted to NOCHROOT and TRYEMULROOT. (Other namei
behavior, e.g. NOFOLLOW, can be requested via the open flags.)

This change requires a kernel bump. Ride the one an hour ago.
(That was supposed to be coordinated; did not intend to let an hour
slip by. My fault.)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Cloning devices (and also things like /dev/stderr) work by allocating
a struct file, stuffing it in the file table (which is a layer
violation), stuffing the file descriptor number for it in a magic
field of struct lwp (which is gross), and then "failing" with one of
two magic errnos, EDUPFD or EMOVEFD.

Before this commit, all callers of vn_open in the kernel (there are
quite a few) were expected to check for these errors and handle the
situation. Needless to say, none of them except for open() itself did,
resulting in internal negative errnos being returned to userspace.

This hack is fairly deeply rooted and cannot be eliminated all at
once. This commit adds logic to handle the magic errnos inside
vn_open; now on success vn_open returns either a vnode or an integer
file descriptor, along with a flag that says whether the underlying
code requested EDUPFD or EMOVEFD. Callers not prepared to cope with
file descriptors can pass NULL for the extra return values, in which
case if a file descriptor would be produced vn_open fails with
EOPNOTSUPP.

Since I'm rearranging vn_open's signature anyway, stop exposing struct
nameidata. Instead, take three arguments: an optional vnode to use as
the starting point (like openat()), the path, and additional namei
flags to use, restricted to NOCHROOT and TRYEMULROOT. (Other namei
behavior, e.g. NOFOLLOW, can be requested via the open flags.)

This change requires a kernel bump. Ride the one an hour ago.
(That was supposed to be coordinated; did not intend to let an hour
slip by. My fault.)</pre>
</div>
</content>
</entry>
<entry>
<title>Fix cargo cult ioctl implementation for LUAINFO: the name and desc fields</title>
<updated>2017-12-26T12:43:59+00:00</updated>
<author>
<name>martin</name>
<email>martin@NetBSD.org</email>
</author>
<published>2017-12-26T12:43:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=480528d4c5daa656eed554e84ca7b4259cf6225a'/>
<id>480528d4c5daa656eed554e84ca7b4259cf6225a</id>
<content type='text'>
are arrays, not pointers, so don't use copyoutstr on them, but instead
copyin/copyout the whole array of structures.
Fixes PR 52864 for me (on sparc64).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
are arrays, not pointers, so don't use copyoutstr on them, but instead
copyin/copyout the whole array of structures.
Fixes PR 52864 for me (on sparc64).</pre>
</div>
</content>
</entry>
<entry>
<title>always put the module on the stack</title>
<updated>2017-05-20T09:46:17+00:00</updated>
<author>
<name>mbalmer</name>
<email>mbalmer@NetBSD.org</email>
</author>
<published>2017-05-20T09:46:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=af24274436293bc25b401182a6805de754e8365b'/>
<id>af24274436293bc25b401182a6805de754e8365b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Only load a module if it is not already loaded in a state (much like userland</title>
<updated>2017-05-20T08:31:13+00:00</updated>
<author>
<name>mbalmer</name>
<email>mbalmer@NetBSD.org</email>
</author>
<published>2017-05-20T08:31:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=dd2fb1104b12c6fb46fbcb4f0a2c5478653c9a82'/>
<id>dd2fb1104b12c6fb46fbcb4f0a2c5478653c9a82</id>
<content type='text'>
Lua handles require).
Fixes PR kern/52226.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Lua handles require).
Fixes PR kern/52226.</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid possible null pointer dereferencing.</title>
<updated>2017-05-11T07:34:27+00:00</updated>
<author>
<name>mbalmer</name>
<email>mbalmer@NetBSD.org</email>
</author>
<published>2017-05-11T07:34:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=5d7ff4cda532a17ea6924f6dca9b647cd071c1d7'/>
<id>5d7ff4cda532a17ea6924f6dca9b647cd071c1d7</id>
<content type='text'>
Fixes PR kern/52225.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes PR kern/52225.</pre>
</div>
</content>
</entry>
<entry>
<title>Can't destroy pb until we're done using it.</title>
<updated>2017-04-16T17:45:12+00:00</updated>
<author>
<name>riastradh</name>
<email>riastradh@NetBSD.org</email>
</author>
<published>2017-04-16T17:45:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=8ada1c88b5f8a714394d67f03667e23406cba6e5'/>
<id>8ada1c88b5f8a714394d67f03667e23406cba6e5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Check pmf_device_register return value. NFC</title>
<updated>2017-01-20T12:25:07+00:00</updated>
<author>
<name>maya</name>
<email>maya@NetBSD.org</email>
</author>
<published>2017-01-20T12:25:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=85e09bc412b29793fc70dfdaf584fbf205f27a8b'/>
<id>85e09bc412b29793fc70dfdaf584fbf205f27a8b</id>
<content type='text'>
Appeases static analyzers.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Appeases static analyzers.</pre>
</div>
</content>
</entry>
</feed>
