dragonfly.git
6 years agoRemove various 'r' commands and daemons.
Sascha Wildner [Sun, 31 Dec 2017 13:53:38 +0000 (14:53 +0100)]
Remove various 'r' commands and daemons.

rcp(1), rlogin(1), rlogind(1), rsh(1) and rshd(1). In the unlikely case
that someone still needs them, they can use the net/bsdrcmds port to
bring them back.

FreeBSD removed them in October 2017 and I took their work as a guideline.

6 years agolib/libc_rtld: Fix 'make install'.
zrj [Sun, 31 Dec 2017 07:56:17 +0000 (09:56 +0200)]
lib/libc_rtld: Fix 'make install'.

Do not install nls categories and uuid(3) manpages. These are handled by libc.

6 years agoskel: Quote default alias for pager
Eitan Adler [Sun, 31 Dec 2017 07:03:29 +0000 (23:03 -0800)]
skel: Quote default alias for pager

6 years agomt(1): Staticize.
Sascha Wildner [Sun, 31 Dec 2017 03:47:16 +0000 (04:47 +0100)]
mt(1): Staticize.

6 years agomkstr(1): Staticize.
Sascha Wildner [Sun, 31 Dec 2017 03:40:39 +0000 (04:40 +0100)]
mkstr(1): Staticize.

6 years agom4(1): Add some __printflike.
Sascha Wildner [Sun, 31 Dec 2017 03:30:52 +0000 (04:30 +0100)]
m4(1): Add some __printflike.

6 years agolocate(1): Staticize.
Sascha Wildner [Sun, 31 Dec 2017 03:11:16 +0000 (04:11 +0100)]
locate(1): Staticize.

6 years agolocaledef(1): Add some __printflike.
Sascha Wildner [Sun, 31 Dec 2017 03:00:29 +0000 (04:00 +0100)]
localedef(1): Add some __printflike.

6 years agolocale(1): Staticize and remove an unused variable.
Sascha Wildner [Sun, 31 Dec 2017 02:34:15 +0000 (03:34 +0100)]
locale(1): Staticize and remove an unused variable.

6 years agoleave(1): Staticize.
Sascha Wildner [Sun, 31 Dec 2017 02:30:05 +0000 (03:30 +0100)]
leave(1): Staticize.

6 years agogencat(1): Staticize and remove a wrong prototype.
Sascha Wildner [Sun, 31 Dec 2017 02:25:19 +0000 (03:25 +0100)]
gencat(1): Staticize and remove a wrong prototype.

6 years agolibc: Remove 'table' argument from call to collate_range_cmp() in __sccl().
zrj [Thu, 28 Dec 2017 12:30:07 +0000 (14:30 +0200)]
libc: Remove 'table' argument from call to collate_range_cmp() in __sccl().

This prevents segfaults when called with say incomplete locale.
Introduce a separate wide variant of __wcollate_range_cmp() and use proper
variant were needed. The __sccl() does not use wchar_t types.
Also use '\0' instead of plain 0.

Similar change was done in FreeBSD.

6 years agolibc/locale: Fix leading space issue in wcstof().
zrj [Thu, 28 Dec 2017 11:34:53 +0000 (13:34 +0200)]
libc/locale: Fix leading space issue in wcstof().

On failure correctly set endptr to report failure.
It was reported by libc++ testsuite.

Taken-from: FreeBSD

6 years agonewlocale(3): Add support for native complex locale.
zrj [Sat, 30 Dec 2017 18:32:25 +0000 (20:32 +0200)]
newlocale(3): Add support for native complex locale.

Now newlocale(LC_ALL_MASK, setlocale(LC_ALL, NULL), NULL) should work
as intended even with combinations like LC_CTYPE=lv_LT LC_TIME=lt_LT.

While there, add compat support in setlocale(3) and fix a wrong git am
in previous newlocale(3) commit.

6 years agobsd-family-tree: Update to latest
Eitan Adler [Fri, 29 Dec 2017 23:14:52 +0000 (15:14 -0800)]
bsd-family-tree: Update to latest

- add NetBSD 6.06, 7.1.1
- add HardenedBSD 10, 11
- correct 'NDB' to 'NBD'

Obtained-from:   FreeBSD

6 years agoshutdown(8): Fix building with -DDEBUG.
Sascha Wildner [Fri, 29 Dec 2017 19:24:10 +0000 (20:24 +0100)]
shutdown(8): Fix building with -DDEBUG.

6 years agocsplit(1): Staticize.
Sascha Wildner [Fri, 29 Dec 2017 19:20:51 +0000 (20:20 +0100)]
csplit(1): Staticize.

6 years agonewlocale(3): Add compat support for c++ runtime libs.
zrj [Fri, 29 Dec 2017 13:51:32 +0000 (15:51 +0200)]
newlocale(3): Add compat support for c++ runtime libs.

Implement simple 'private' env support that mimics the internal
__get_locale_env(). Not to be used in a context of C.

While there, fix off by one in array index (_LC_LAST vs XLC_LAST).

6 years agolibc/locale: Prevent bad builds on partial XLC_ enum changes.
zrj [Thu, 28 Dec 2017 11:05:18 +0000 (13:05 +0200)]
libc/locale: Prevent bad builds on partial XLC_ enum changes.

Add static asserts and document them.

Taken-from: FreeBSD

6 years agombtowc(3): Set EILSEQ on incomplete character case.
zrj [Thu, 28 Dec 2017 11:01:36 +0000 (13:01 +0200)]
mbtowc(3): Set EILSEQ on incomplete character case.

There are several cases where EILSEQ is already handled, yet not handled
in other cases. Make it consistent.

In-discussion-with: swildner
Taken-from: OpenBSD

6 years agolibc/locale: Misc cleanup.
zrj [Fri, 29 Dec 2017 13:37:16 +0000 (15:37 +0200)]
libc/locale: Misc cleanup.

Mostly whitespace, use NULL and fix typo.

6 years agocrunchgen(1)/crunchide(1): Staticize.
Sascha Wildner [Fri, 29 Dec 2017 12:08:30 +0000 (13:08 +0100)]
crunchgen(1)/crunchide(1): Staticize.

6 years agocompress(1): Staticize.
Sascha Wildner [Fri, 29 Dec 2017 11:51:09 +0000 (12:51 +0100)]
compress(1): Staticize.

6 years agochat(8): Staticize.
Sascha Wildner [Fri, 29 Dec 2017 11:44:09 +0000 (12:44 +0100)]
chat(8): Staticize.

6 years agocap_mkdb(1): Staticize and remove an unused variable.
Sascha Wildner [Fri, 29 Dec 2017 11:32:49 +0000 (12:32 +0100)]
cap_mkdb(1): Staticize and remove an unused variable.

6 years agoc99(1): Staticize.
Sascha Wildner [Fri, 29 Dec 2017 11:28:03 +0000 (12:28 +0100)]
c99(1): Staticize.

6 years agobtpin(1): Staticize.
Sascha Wildner [Fri, 29 Dec 2017 11:25:16 +0000 (12:25 +0100)]
btpin(1): Staticize.

6 years agobasename(1): Staticize.
Sascha Wildner [Fri, 29 Dec 2017 11:21:26 +0000 (12:21 +0100)]
basename(1): Staticize.

6 years agoAdd __attribute__((__noreturn__)) to various function prototypes in games/.
Sascha Wildner [Thu, 28 Dec 2017 21:57:41 +0000 (22:57 +0100)]
Add __attribute__((__noreturn__)) to various function prototypes in games/.

This general cleanup is useful in various ways. It helps the compiler
optimize better and it also helps later GCCs detect better when to give
-Wimplicit-fallthrough warnings and when not.

Found-with: -Wsuggest-attribute=noreturn

6 years agowump(6): Staticize.
Sascha Wildner [Thu, 28 Dec 2017 21:50:37 +0000 (22:50 +0100)]
wump(6): Staticize.

6 years agoworms(6): Staticize.
Sascha Wildner [Thu, 28 Dec 2017 21:42:34 +0000 (22:42 +0100)]
worms(6): Staticize.

6 years agoworm(6): Staticize and remove some "return" (crash() never returns).
Sascha Wildner [Thu, 28 Dec 2017 21:36:51 +0000 (22:36 +0100)]
worm(6): Staticize and remove some "return" (crash() never returns).

6 years agosail(6): pl_main() never returns, so don't pretend it does.
Sascha Wildner [Thu, 28 Dec 2017 20:53:47 +0000 (21:53 +0100)]
sail(6): pl_main() never returns, so don't pretend it does.

6 years agopig(6): Staticize.
Sascha Wildner [Thu, 28 Dec 2017 20:34:42 +0000 (21:34 +0100)]
pig(6): Staticize.

6 years agonumber(6): Staticize and remove a wrong prototype.
Sascha Wildner [Thu, 28 Dec 2017 20:24:57 +0000 (21:24 +0100)]
number(6): Staticize and remove a wrong prototype.

6 years agohangman(6): Move __dead2 to the prototype.
Sascha Wildner [Thu, 28 Dec 2017 20:09:26 +0000 (21:09 +0100)]
hangman(6): Move __dead2 to the prototype.

6 years agoarithmetic(6): Staticize.
Sascha Wildner [Thu, 28 Dec 2017 19:40:08 +0000 (20:40 +0100)]
arithmetic(6): Staticize.

6 years agoiso639: Add Montenegrin.
Sascha Wildner [Thu, 28 Dec 2017 09:54:35 +0000 (10:54 +0100)]
iso639: Add Montenegrin.

See http://www.loc.gov/standards/iso639-2/php/code_changes.php

6 years agoUpdate the pciconf(8) database.
Eitan Adler [Thu, 28 Dec 2017 08:19:34 +0000 (00:19 -0800)]
Update the pciconf(8) database.

2017-12-20 snapshot from https://pci-ids.ucw.cz/v2.2/pci.ids

6 years agolibc/nmalloc: Handle size_t overflows in malloc().
zrj [Wed, 27 Dec 2017 16:10:40 +0000 (18:10 +0200)]
libc/nmalloc: Handle size_t overflows in malloc().

Similar to e9586122ca8be1e743aa9cd2f9622dfe2f434ece.

6 years agokerne: Move vfs.pbuf_{kva,mem,raw}_count sysctls to vm node.
zrj [Wed, 27 Dec 2017 06:31:35 +0000 (08:31 +0200)]
kerne: Move vfs.pbuf_{kva,mem,raw}_count sysctls to vm node.

The vm.pbud_kva_count, vm.pbud_mem_count and vm.pbud_raw_count
matches other sysctls in sys/vm/.
No userland usage was detected in base and dports.

6 years agoFix several speelling errors
Eitan Adler [Wed, 27 Dec 2017 13:07:25 +0000 (05:07 -0800)]
Fix several speelling errors

Reviewed by: swildner, zrj

6 years agokernel: Remove 3 no longer used sysctls in vfs_bio.c
zrj [Wed, 27 Dec 2017 06:28:33 +0000 (08:28 +0200)]
kernel: Remove 3 no longer used sysctls in vfs_bio.c

6 years agopasswd.1/security.7: Some kerberos removal cleanup.
Sascha Wildner [Tue, 26 Dec 2017 13:04:58 +0000 (14:04 +0100)]
passwd.1/security.7: Some kerberos removal cleanup.

6 years agosocket: Use fast close if SO_LINGER and linger==0.
Sepherosa Ziehau [Tue, 26 Dec 2017 04:28:39 +0000 (12:28 +0800)]
socket: Use fast close if SO_LINGER and linger==0.

It is widely used to reset TCP connection by userland application.

6 years agoMakefile.inc1: Adjust an obsolete comment and fix trailing whitespace.
Sascha Wildner [Tue, 26 Dec 2017 12:15:19 +0000 (13:15 +0100)]
Makefile.inc1: Adjust an obsolete comment and fix trailing whitespace.

Submitted-by: zrj
6 years agols(1): Add -_ option to include nanotime in ls -l.
zrj [Tue, 26 Dec 2017 09:23:49 +0000 (11:23 +0200)]
ls(1): Add -_ option to include nanotime in ls -l.

Very useful when debugging Makefile races in rules with
vfs.timestamp_precision=1 set.
Yes, ls -l_ seems strage, but we are running out of letters and
FreeBSD already has the "-," flag in their ls(1).

6 years agols(1): Add -D option to set date-time format in ls -l.
zrj [Tue, 26 Dec 2017 09:22:04 +0000 (11:22 +0200)]
ls(1): Add -D option to set date-time format in ls -l.

Taken-from: FreeBSD

6 years agols(1): Sort flags by order in usage() and manpage.
zrj [Tue, 26 Dec 2017 09:18:49 +0000 (11:18 +0200)]
ls(1): Sort flags by order in usage() and manpage.

Add missing 'S' in SYNOPSIS.

While there, move out trailing space separator handling to caller.

6 years agols(1): Minor cleanup.
zrj [Mon, 25 Dec 2017 13:31:29 +0000 (15:31 +0200)]
ls(1): Minor cleanup.

No functional change.

6 years agolibc/stdtime: Use style(9) comments in strftime.c
zrj [Mon, 25 Dec 2017 12:47:52 +0000 (14:47 +0200)]
libc/stdtime: Use style(9) comments in strftime.c

6 years agoCleanup usr.sbin's Makefile a bit.
Sascha Wildner [Mon, 25 Dec 2017 10:35:58 +0000 (11:35 +0100)]
Cleanup usr.sbin's Makefile a bit.

6 years agoRemove obsolete comment from libexec's Makefile.
Sascha Wildner [Mon, 25 Dec 2017 01:48:05 +0000 (02:48 +0100)]
Remove obsolete comment from libexec's Makefile.

6 years agofstyp(8): Don't hardcode UFS1 magic.
zrj [Sun, 24 Dec 2017 18:54:51 +0000 (20:54 +0200)]
fstyp(8): Don't hardcode UFS1 magic.

Suggested-by: swildner
6 years agosplitpatch: massage to function under python3
Eitan Adler [Sun, 24 Dec 2017 18:34:06 +0000 (10:34 -0800)]
splitpatch: massage to function under python3

6 years ago.gitattributes: Use C language rules in git diff driver.
zrj [Sun, 24 Dec 2017 17:06:11 +0000 (19:06 +0200)]
.gitattributes: Use C language rules in git diff driver.

Solves a very annoying issue when goto labels are mistaken for function name.
Enable only on stuff we care: *.c and *.h. Remember, we had our fun with eof.

Approved-by: swildner
6 years agofstyp(8): Remove direct dep on sys/boot/ headers.
zrj [Sun, 24 Dec 2017 10:01:04 +0000 (12:01 +0200)]
fstyp(8): Remove direct dep on sys/boot/ headers.

Use the kernel headers with local additions to understand ufs2.

6 years agoboot: Remove unused loader.rc
zrj [Sat, 23 Dec 2017 18:14:44 +0000 (20:14 +0200)]
boot: Remove unused loader.rc

We use dloader.rc and certainly do not have a loader.4th.
The loader.rc is not put into Makefile_upgrade.inc because we have not
detected it on any of setups and ficl removal was done back in 2010 in
116b7e3c174090f2c3e2f98e4d71f482b50700db

6 years agoi386 removal, part 67/x: Remove last traces of I386_BUS_SPACE_* macros.
Sascha Wildner [Sun, 24 Dec 2017 12:47:27 +0000 (13:47 +0100)]
i386 removal, part 67/x: Remove last traces of I386_BUS_SPACE_* macros.

Discussed-with: sephe, zrj

6 years agokernel/sis: Fix some missed x86_64 porting.
Sascha Wildner [Sun, 24 Dec 2017 12:41:07 +0000 (13:41 +0100)]
kernel/sis: Fix some missed x86_64 porting.

Similar to what was done in FreeBSD.

6 years agoip: Set ip_porthash_trycount based on the # of netisrs.
Sepherosa Ziehau [Sun, 24 Dec 2017 05:04:15 +0000 (13:04 +0800)]
ip: Set ip_porthash_trycount based on the # of netisrs.

This helps on the machine w/ relative large # of netisrs.  It cuts
> 40% IPIs (160K/s -> 93K/s), and increases the connect rate a bit
(602K/s -> 618K/s).

6 years agofflush(3): Return success on a read-only stream.
zrj [Sat, 23 Dec 2017 08:29:47 +0000 (10:29 +0200)]
fflush(3): Return success on a read-only stream.

Loosen up the requirements for opened streams. It is needed to support c++
runtime lib after ext/basic_file_stdio.c s/this->sync()/fflush()/ change.
It likely needed for libc++ too.
Adjust the manpage for behaviour change and only set _w to 0 when stream is
not currently reading in fpurge(4) to avoid failures in fflush(4).

Taken-from: FreeBSD

6 years ago<sys/types.h>: Remove <machine/stdarg.h> and adjust some headers.
zrj [Mon, 18 Dec 2017 14:06:34 +0000 (15:06 +0100)]
<sys/types.h>: Remove <machine/stdarg.h> and adjust some headers.

Userland utilities should not use __va_* definitions and kernel already has
the <machine/stdarg.h> in <systm.h>.

Submitted-by: swildner
6 years agonet: Increase max stage packet count to 16.
Sepherosa Ziehau [Sat, 23 Dec 2017 00:03:42 +0000 (08:03 +0800)]
net: Increase max stage packet count to 16.

This increase IP forwarding rate by 200Kpps ~ 300Kpps.  Normal
forwarding reaches 11.3Mpps, while fastforwarding is at 14.2Mpps
now.

Setting this to 8 does not give as much improvement as setting
this to 16.  While setting this to 24 gives no observable
improvement compared with setting this to 16.

6 years agoi386 removal, part 66/x: Remove SND_PCM_64 as an explicit kernel option.
Sascha Wildner [Thu, 21 Dec 2017 21:10:09 +0000 (22:10 +0100)]
i386 removal, part 66/x: Remove SND_PCM_64 as an explicit kernel option.

It only made sense as an option on i386. On x86_64 (or better, if long
is 64 bits wide) it is the default, per sys/dev/sound/pcm/pcm.h.

6 years agomorse(6): Avoid -Wshadow warning with gcc47.
zrj [Thu, 21 Dec 2017 12:40:49 +0000 (14:40 +0200)]
morse(6): Avoid -Wshadow warning with gcc47.

morse.c:465:8: warning: declaration of 'isblank' shadows a global declaration [-Wshadow]
In file included from morse.c:43:0:
/usr/include/ctype.h:211:5: warning: shadowed declaration is here [-Wshadow]

6 years agomorse(6): Add decoding functionality for dot-dash code.
zrj [Thu, 21 Dec 2017 10:33:49 +0000 (12:33 +0200)]
morse(6): Add decoding functionality for dot-dash code.

Our -d was already taken so use -r option for "reverse" mode.

Usage examples through command line ("--" for safety) and pipe:
_# morse -r -- .... .- -.-. -.- .. -. --.
HACKING
_# cat <<EOF | morse -r
 .---
 -...
 ---
 -..
 --..
EOF
JBODZ

Also it woks as most inefficient way to capitalize words too:
_# morse -s meow | morse -r
MEOW

Pointed-by: tuxillo
Decoding-shamelessly-stolen-from: OpenBSD

6 years agokernel/de: Use I/O mapped access on x86_64 too.
Sascha Wildner [Thu, 21 Dec 2017 09:30:44 +0000 (10:30 +0100)]
kernel/de: Use I/O mapped access on x86_64 too.

Seems we missed this in our x86_64 porting.

Approved-by: sephe
Tested-on:   Hyper-V

6 years agoinpcb: Change how TCP local ephemeral port is selected.
Sepherosa Ziehau [Wed, 20 Dec 2017 05:28:35 +0000 (13:28 +0800)]
inpcb: Change how TCP local ephemeral port is selected.

The goal should be reducing the chance of connection forwarding.
However, ports in a given portinfo is too sparse to achieve this
goal.  With the help of randomized local port initial value, the
tentative local port can be incremented by 1 each time, so that
the chance of keeping the connection on the current cpu increases.

This change reduces IPI rate significantly (200K/s -> 160K/s), and
the connection establish rate is increased from 590Kconn/s to
600Kconn/s.

6 years ago<sys/disklabel32.h>: Add comment that it is used in sys/boot (i386 code).
Sascha Wildner [Wed, 20 Dec 2017 06:53:33 +0000 (07:53 +0100)]
<sys/disklabel32.h>: Add comment that it is used in sys/boot (i386 code).

6 years agolibkern/stack_protector: Add comment that it is used in dloader (i386 code).
Sascha Wildner [Wed, 20 Dec 2017 06:16:20 +0000 (07:16 +0100)]
libkern/stack_protector: Add comment that it is used in dloader (i386 code).

6 years agokernel: Remove some references to i386.
zrj [Tue, 19 Dec 2017 17:46:42 +0000 (19:46 +0200)]
kernel: Remove some references to i386.

While there, adjust some outdated paths in comments and some minor cleanup.

6 years agoi386 removal, part 65/x: Remove some leftovers in kernel.
zrj [Tue, 19 Dec 2017 17:45:11 +0000 (19:45 +0200)]
i386 removal, part 65/x: Remove some leftovers in kernel.

6 years agoi386 removal, part 64/x: Remove some leftovers in asr(4).
zrj [Tue, 19 Dec 2017 16:35:22 +0000 (18:35 +0200)]
i386 removal, part 64/x: Remove some leftovers in asr(4).

6 years agokernel/pc64: Mark cpu_type as hardcoded.
zrj [Tue, 19 Dec 2017 16:27:54 +0000 (18:27 +0200)]
kernel/pc64: Mark cpu_type as hardcoded.

We currently mark all x86_64 cpus as CPU_CLAWHAMMER.

6 years agoi386 removal, part 63/x: Remove some leftovers in segments.h
zrj [Tue, 19 Dec 2017 16:15:10 +0000 (18:15 +0200)]
i386 removal, part 63/x: Remove some leftovers in segments.h

Last users were removed in
8c2a9b77413a2154aa54084381f6703dd5446fa4

6 years agokernel/pc64: Adjust some references to already removed i386.
zrj [Tue, 19 Dec 2017 15:59:05 +0000 (17:59 +0200)]
kernel/pc64: Adjust some references to already removed i386.

While there, perform some whitespace fixes.
No functional change.

6 years agofsck_msdosfs(8): Use __printflike.
Sascha Wildner [Wed, 20 Dec 2017 04:59:44 +0000 (05:59 +0100)]
fsck_msdosfs(8): Use __printflike.

6 years agorouted(8): Clean up a bit.
Sascha Wildner [Wed, 20 Dec 2017 04:55:50 +0000 (05:55 +0100)]
routed(8): Clean up a bit.

* Use __printflike and __unused.

* Remove sccsid[] etc.

6 years agoAdd __attribute__((__noreturn__)) to various function prototypes in sbin/.
Sascha Wildner [Wed, 20 Dec 2017 03:33:04 +0000 (04:33 +0100)]
Add __attribute__((__noreturn__)) to various function prototypes in sbin/.

This general cleanup is useful in various ways. It helps the compiler
optimize better and it also helps later GCCs detect better when to give
-Wimplicit-fallthrough warnings and when not.

Found-with: -Wsuggest-attribute=noreturn

6 years agolibc/sysconf: Add _SC_LEVEL1_DCACHE_LINESIZE.
Sascha Wildner [Tue, 19 Dec 2017 18:51:17 +0000 (19:51 +0100)]
libc/sysconf: Add _SC_LEVEL1_DCACHE_LINESIZE.

nginx can make use of it (see http://hg.nginx.org/nginx/rev/057adb2a9d23).

Requested-by: sephe
6 years agokernel/pc64: Rename i386_protection_init().
zrj [Tue, 19 Dec 2017 15:26:44 +0000 (17:26 +0200)]
kernel/pc64: Rename i386_protection_init().

No functional change.

6 years agoapply(1): Add const attributes.
zrj [Tue, 19 Dec 2017 15:25:48 +0000 (17:25 +0200)]
apply(1): Add const attributes.

6 years agotcp: Stringent assertion for pru_connect.
Sepherosa Ziehau [Tue, 19 Dec 2017 05:00:51 +0000 (13:00 +0800)]
tcp: Stringent assertion for pru_connect.

6 years agogettytab: Add 3wire and std as terminal types/classes.
Eitan Adler [Tue, 19 Dec 2017 06:03:02 +0000 (22:03 -0800)]
gettytab: Add 3wire and std as terminal types/classes.

These are similar to
the existing terminal types/classes that have the baudrate suffix,
but differ in that no baudrate is set/defined.

Obtained-from: FreeBSD (r262955)

6 years agolibc/nmalloc: Handle size_t overflows in posix_memalign().
zrj [Sun, 17 Dec 2017 15:54:01 +0000 (17:54 +0200)]
libc/nmalloc: Handle size_t overflows in posix_memalign().

Some algorithms/programs try to heuristically deduce alignment rules.
Instead of confusing them with minimal allocations for size == (size_t)-7 and
friends at different alignment values, just return ENOMEM since POSIX does not
explictly specify how alignment overflows should behave. Programs should keep
track of pointers they try to allocate (including size == 0 case too).

6 years agolibc/nmalloc: Whistespace cleanup.
zrj [Sun, 17 Dec 2017 15:47:30 +0000 (17:47 +0200)]
libc/nmalloc: Whistespace cleanup.

No functional change.

6 years agokernel - Relax requirements for sysctl operations on longs
Matthew Dillon [Mon, 18 Dec 2017 05:45:34 +0000 (21:45 -0800)]
kernel - Relax requirements for sysctl operations on longs

* Relax the requirements for sysctl operations on longs.  Allow the
  case where userland is reading the sysctl variable as an integer
  instead of a long.

* Allows us to promote various vm.stats.vm_* fields that must now be
  longs in order to support > 8TB of ram as well as avoid internal
  calculation overflows.

* Fixes an issue where chrome issues this sysctl as an int:

  sysctlbyname("vm.stats.vm.v_page_count", &pages, &size, NULL, 0);

  And fails to check the return value / error code, resulting in
  a garbage value for 'pages' which chrome then uses to size the
  browser's memory restrains.  This in turn was causing chrome
  to give up multiple tabs thinking it had run out of memory when,
  in fact, there is plenty of memory available.

* Generally speaking, I've wanted to have this sort of backwards
  compatibility for a while now.  Userland shouldn't get errors
  accesing integral sysctl values simply because it uses an integer
  of a different size than the sysctl.

6 years agomd5(1): Add support for sha512.
zrj [Wed, 13 Dec 2017 07:39:00 +0000 (09:39 +0200)]
md5(1): Add support for sha512.

6 years agomd5(1): Minor cleanup.
zrj [Wed, 13 Dec 2017 07:04:08 +0000 (09:04 +0200)]
md5(1): Minor cleanup.

 * add static and const attributes;
 * use RUSAGE_SELF;
 * fix some whitespace errors.

No functional change.

6 years agoboot/efi: Remove our old efi include files.
Sascha Wildner [Sun, 17 Dec 2017 13:42:03 +0000 (14:42 +0100)]
boot/efi: Remove our old efi include files.

The remaining local header is eficonsctl.h which I will deal with later.

6 years agoboot/efi: Port most of our efi boot code to the EDK II headers.
Sascha Wildner [Sun, 17 Dec 2017 13:41:22 +0000 (14:41 +0100)]
boot/efi: Port most of our efi boot code to the EDK II headers.

6 years agoboot/efi: Bring in a bunch of additional TianoCore EDK II headers.
Sascha Wildner [Sun, 17 Dec 2017 13:40:41 +0000 (14:40 +0100)]
boot/efi: Bring in a bunch of additional TianoCore EDK II headers.

Taken from the MdePkg of the UDK2017 branch of the
git://github.com/tianocore/edk2 repository.
All I modified was killing CRs using 'tr -d "\015"'.

This is a work in progress.

6 years agoigb.4: Sort chip names.
Sepherosa Ziehau [Sun, 17 Dec 2017 03:36:49 +0000 (11:36 +0800)]
igb.4: Sort chip names.

6 years agoix.4: Sort chip names.
Sepherosa Ziehau [Sun, 17 Dec 2017 03:33:04 +0000 (11:33 +0800)]
ix.4: Sort chip names.

6 years agomount_udf(8): Staticize
Sascha Wildner [Sun, 17 Dec 2017 09:39:55 +0000 (10:39 +0100)]
mount_udf(8): Staticize

6 years agodumpfs(8): Staticize
Sascha Wildner [Sun, 17 Dec 2017 09:26:31 +0000 (10:26 +0100)]
dumpfs(8): Staticize

6 years agodmesg(8): Staticize
Sascha Wildner [Sun, 17 Dec 2017 09:11:02 +0000 (10:11 +0100)]
dmesg(8): Staticize

6 years agodevfsctl(8): syntax_error() never returns, so change it to 'void'.
Sascha Wildner [Sat, 16 Dec 2017 21:53:56 +0000 (22:53 +0100)]
devfsctl(8): syntax_error() never returns, so change it to 'void'.

While here, fix indent a bit and add a copyright to devfsctl.h.

6 years agoigb: Sync with Intel's igb 2.5.3
Sepherosa Ziehau [Sat, 2 Dec 2017 17:43:05 +0000 (01:43 +0800)]
igb: Sync with Intel's igb 2.5.3

- Enable RX packets dropping, if flow control is disabled.
- Clear bad data at chip initialization time.

Tested-by: Tim Darby <t timdarby net> (i211)
   Thomas Nikolajsen <thomas nikolajsen mail dk> (i210)