<feed xmlns='http://www.w3.org/2005/Atom'>
<title>netbsd/sys/miscfs/procfs/procfs_vnops.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) (requested by shm in ticket #1475):</title>
<updated>2022-06-17T15:25:21+00:00</updated>
<author>
<name>martin</name>
<email>martin@NetBSD.org</email>
</author>
<published>2022-06-17T15:25:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=0dcf2498f30ee6ecebd6791c10ece7ed13e0f3be'/>
<id>0dcf2498f30ee6ecebd6791c10ece7ed13e0f3be</id>
<content type='text'>
	sys/miscfs/procfs/procfs_vnops.c: revision 1.229

Add missing permission check</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	sys/miscfs/procfs/procfs_vnops.c: revision 1.229

Add missing permission check</pre>
</div>
</content>
</entry>
<entry>
<title>Pull up following revision(s) (requested by hannken in ticket #132):</title>
<updated>2019-09-01T11:02:27+00:00</updated>
<author>
<name>martin</name>
<email>martin@NetBSD.org</email>
</author>
<published>2019-09-01T11:02:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=ff6b8bbbceafc2a7880ebdf99ee9487bbdf8d148'/>
<id>ff6b8bbbceafc2a7880ebdf99ee9487bbdf8d148</id>
<content type='text'>
	sys/miscfs/kernfs/kernfs_vnops.c: revision 1.161
	sys/miscfs/procfs/procfs_vnops.c: revision 1.207
Add missing operation VOP_GETPAGES() returning EFAULT.
Without this operation posix_fadvise(..., POSIX_FADV_WILLNEED)
would leave the v_interlock held.
Observed by maxv@</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	sys/miscfs/kernfs/kernfs_vnops.c: revision 1.161
	sys/miscfs/procfs/procfs_vnops.c: revision 1.207
Add missing operation VOP_GETPAGES() returning EFAULT.
Without this operation posix_fadvise(..., POSIX_FADV_WILLNEED)
would leave the v_interlock held.
Observed by maxv@</pre>
</div>
</content>
</entry>
<entry>
<title>add a node for the process resource limits.</title>
<updated>2019-03-30T23:28:30+00:00</updated>
<author>
<name>christos</name>
<email>christos@NetBSD.org</email>
</author>
<published>2019-03-30T23:28:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=e5add5c4aa0f86d5b7dfa57ef8c1dae59494dbda'/>
<id>e5add5c4aa0f86d5b7dfa57ef8c1dae59494dbda</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>remove M_CANFAIL flag for malloc(9) - it was completely ignored, so had</title>
<updated>2018-10-14T17:37:40+00:00</updated>
<author>
<name>jdolecek</name>
<email>jdolecek@NetBSD.org</email>
</author>
<published>2018-10-14T17:37:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=1df1fda95b3fbbe5d2a49a1fcd1bfefbaeba6508'/>
<id>1df1fda95b3fbbe5d2a49a1fcd1bfefbaeba6508</id>
<content type='text'>
actually no effect</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
actually no effect</pre>
</div>
</content>
</entry>
<entry>
<title>Rename min/max -&gt; uimin/uimax for better honesty.</title>
<updated>2018-09-03T16:29:22+00:00</updated>
<author>
<name>riastradh</name>
<email>riastradh@NetBSD.org</email>
</author>
<published>2018-09-03T16:29:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=a8a5c538b6388ff28a5944a8f637db644ee9a623'/>
<id>a8a5c538b6388ff28a5944a8f637db644ee9a623</id>
<content type='text'>
These functions are defined on unsigned int.  The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER!  Some subsystems have

	#define min(a, b)	((a) &lt; (b) ? (a) : (b))
	#define max(a, b)	((a) &gt; (b) ? (a) : (b))

even though our standard name for that is MIN/MAX.  Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate.  But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all.  (Who knows, maybe in some cases integer
truncation is actually intended!)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These functions are defined on unsigned int.  The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER!  Some subsystems have

	#define min(a, b)	((a) &lt; (b) ? (a) : (b))
	#define max(a, b)	((a) &gt; (b) ? (a) : (b))

even though our standard name for that is MIN/MAX.  Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate.  But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all.  (Who knows, maybe in some cases integer
truncation is actually intended!)</pre>
</div>
</content>
</entry>
<entry>
<title>Lock the target cwdi and take an additional reference to the</title>
<updated>2018-04-07T13:42:42+00:00</updated>
<author>
<name>hannken</name>
<email>hannken@NetBSD.org</email>
</author>
<published>2018-04-07T13:42:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=fac3e23086de4eee2004ef7058f660248dad2e1b'/>
<id>fac3e23086de4eee2004ef7058f660248dad2e1b</id>
<content type='text'>
vnode we are interested in to prevent it from disappearing
before getcwd_common().

Should fix PR kern/53096 (netbsd-8 crash on heavy disk I/O)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
vnode we are interested in to prevent it from disappearing
before getcwd_common().

Should fix PR kern/53096 (netbsd-8 crash on heavy disk I/O)</pre>
</div>
</content>
</entry>
<entry>
<title>Add an environ node</title>
<updated>2017-12-31T03:02:23+00:00</updated>
<author>
<name>christos</name>
<email>christos@NetBSD.org</email>
</author>
<published>2017-12-31T03:02:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=d1134f4855448de47e56be72a961638cb8f4eaf2'/>
<id>d1134f4855448de47e56be72a961638cb8f4eaf2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow procfs_kqfilter, since we allow poll. "go" does it.</title>
<updated>2017-12-01T19:01:34+00:00</updated>
<author>
<name>christos</name>
<email>christos@NetBSD.org</email>
</author>
<published>2017-12-01T19:01:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=1f988dc0e9c935ec008df8db0ae465c7ccc13bb1'/>
<id>1f988dc0e9c935ec008df8db0ae465c7ccc13bb1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix locking, remove error(1) comments.</title>
<updated>2017-11-08T00:51:47+00:00</updated>
<author>
<name>christos</name>
<email>christos@NetBSD.org</email>
</author>
<published>2017-11-08T00:51:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=f8ea335f69e56008d0200c8d443a914958c705bb'/>
<id>f8ea335f69e56008d0200c8d443a914958c705bb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>use p-&gt;p_path, remove unused code.</title>
<updated>2017-11-08T00:42:12+00:00</updated>
<author>
<name>christos</name>
<email>christos@NetBSD.org</email>
</author>
<published>2017-11-08T00:42:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=36d30e41961e686daf4d317adcc5b3aa68a8f24a'/>
<id>36d30e41961e686daf4d317adcc5b3aa68a8f24a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
