Commit Graph

13 Commits

Author SHA1 Message Date
simonb
56f82c25d1 Don't use legacy VM types. 2021-03-29 02:13:37 +00:00
msaitoh
cccc3d1cb5 s/implicitely/implicitly/ 2020-09-29 03:02:18 +00:00
riastradh
d1579b2d70 Rename min/max -> uimin/uimax for better honesty.
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) < (b) ? (a) : (b))
	#define max(a, b)	((a) > (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!)
2018-09-03 16:29:22 +00:00
pgoyette
47cc427df8 More changes for creds, mutex, etc. 2016-12-13 22:54:24 +00:00
pgoyette
3be2222bbe Adapt code for our location of the nfs headers, and some updates for
differences in kernel options(4) handling
2016-12-13 22:17:33 +00:00
pgoyette
01ce88d0f3 More clean-up of #includes 2016-11-18 22:58:08 +00:00
pgoyette
f8afa79068 Add the initial module(9) infrastructure 2016-11-18 22:41:18 +00:00
pgoyette
2d39560c47 Resolve conflicts 2016-11-18 08:31:29 +00:00
pgoyette
e81f0ea2ca Update to FreeBSD revision 308975 ( approx 2016-11-18 07:30 UTC)
If I'm going to try to get this working, I should at least start with
the most recent code available.
2016-11-18 07:49:10 +00:00
snj
f0a7346d21 src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
2014-10-18 08:33:23 +00:00
christos
66873a203c kill sprintf. 2014-03-25 16:30:28 +00:00
wiz
d860f590d4 Fix typo ("then" instead of "than") 2013-12-09 09:35:16 +00:00
dholland
6ca3558714 Import FreeBSD's "newnfs" nfs client and server code. This contains
nfsv4 as well as new implementations of nfsv3 and nfsv2.

This import is from tonight's FreeBSD head and is unchanged from there
except for automated munging of rcsids, rearranging of paths, and an
autogenerated files.* file that might or might not be syntactically
valid. (I will check in the script that does this shortly.)

There is not the slightest chance this will configure yet, let alone
compile or run.
2013-09-30 07:18:57 +00:00