Matthew Dillon [Wed, 6 Dec 2017 02:17:53 +0000 (18:17 -0800)]
kernel - Fix ranging test in memory probe, adjust memory test
* Fix a ranging test in the memory probe code. The 'incr' value can
potentially skip over blacked-out areas of memory and thus accidently
include them in the range.
* We no longer exhaustively test memory. Instead, just test the first
and last page for each range.
Matthew Dillon [Tue, 5 Dec 2017 23:29:00 +0000 (15:29 -0800)]
kernel - add 'i' command to ddb
* Add the 'i' command, which just issues a cpu_invltlb() on the
current cpu. Useful when testing MMU/PMAP issues.
Matthew Dillon [Tue, 5 Dec 2017 22:40:22 +0000 (14:40 -0800)]
efisetup - Correct bugs
* nvme0 was hardwired in one place, use ${drive}. This fixes
issues with efisetup not working on e.g. drives other than nvme0.
* Use -f in the newfs_hammer to avoid complaints about small
partition sizes.
François Tigeot [Tue, 5 Dec 2017 20:52:31 +0000 (21:52 +0100)]
drm/linux: Improve linux/pci.h
* Add pci_get_drvdata and pci_set_drvdata()
* Add pci_register_driver()
zrj [Tue, 5 Dec 2017 10:49:16 +0000 (12:49 +0200)]
fdc(4): Check return error from isa_dma_init().
Must have been a bad sector in
0bc821c68ba308f17d4f0a7bfd300c432d575a09
Reported-by: dcb <https://bugs.dragonflybsd.org/issues/3108>
Sascha Wildner [Tue, 5 Dec 2017 09:46:57 +0000 (10:46 +0100)]
kernel/ipfw3: Minimal K&R cleanup.
Sascha Wildner [Tue, 5 Dec 2017 09:45:11 +0000 (10:45 +0100)]
libcipher: Minimal K&R cleanup.
Sascha Wildner [Tue, 5 Dec 2017 09:43:43 +0000 (10:43 +0100)]
libcrypt: K&R cleanup.
Sascha Wildner [Tue, 5 Dec 2017 09:43:16 +0000 (10:43 +0100)]
libcrypt: Remove some __STDC__ checks.
Matthew Dillon [Tue, 5 Dec 2017 08:14:20 +0000 (00:14 -0800)]
rtld - Fix ifunc relocations
* ifunc relocations had a bug that caused an immediate seg-fault.
Apparently this type of relocation is not used very much, we've
never encountered it before. But the qemu port uses it.
* Fix the bug. Basically missing lockstate and the top level in
rtld was expected to hold the bind lock.
Sascha Wildner [Tue, 5 Dec 2017 08:05:52 +0000 (09:05 +0100)]
Remove some orphaned externs.
Matthew Dillon [Mon, 4 Dec 2017 23:43:13 +0000 (15:43 -0800)]
kernel - Correct vm_map_entry_reserve() call depth issue w/vkernel
* vm_map was making vaddr tests against VM_MAX_USER_ADDRESS to
determine when to call vm_map_entry_reserve(). This test works
fine on real hardware but will not work properly for a vkernel.
* Instead, just use td_nest_count to prevent excessive recursion,
or test against &kernel_map when necessary.
* Fixes SIGILL in vkernel due to stack overflow.
Reported-by: tuxillo
Matthew Dillon [Mon, 4 Dec 2017 20:26:47 +0000 (12:26 -0800)]
libc - Adjust comment
* Adjust comment for dmalloc.c
Matthew Dillon [Mon, 4 Dec 2017 20:25:27 +0000 (12:25 -0800)]
debug - Adjust kmapinfo
* Use formatnum() for kmapinfo's segment size output when
printing EMPTY segments. This makes the output more readable.
Matthew Dillon [Mon, 4 Dec 2017 07:50:07 +0000 (23:50 -0800)]
kernel - Expand physical memory support to 64TB
* Make NKPML4E truly programmable and change the default from 1
PDP page to 16 PDP pages. This increases KVM from 512G to
8TB, which should be enough to accomodate a maximal 64TB
configuration.
Note that e.g. 64TB of physical ram certainly requires more
than one kernel PDP page, since the vm_page_array alone
would require around 2TB, never mind everything else!
PDP entries in the PML4E (512 total @ 512GB per entry):
256 User space
112 (unused, avail for NKPML4E)
128 DMAP (64TB max physical memory)
16 KVM NKPML4E default (8TB) (recommend 64 max)
* Increase the DMAP from 64 PDP pages to 128 PDP pages, allowing
support for up to 64TB of physical memory.
* Changes the meaning of KPML4I from being 'the index of the only
PDP page in the PML4e' to 'the index of the first PDP page in
the PML4e'. There are NKPML4E PDP pages starting at index KPML4I.
* NKPDPE can now exceed 512. This is calculated to be the maximmum
number of PD pages needed for KVM, which is now (NKPML4E*NPDPEPG-1).
We now pre-allocate and populate only enough PD pages to accomodate
the page tables we are pre-installing. Those, in turn, are calculated
to be sufficient for bootstrapping mainly vm_page_array and a large
initial set of pv_entry structures.
* Remove nkpt, it was not being used any more.
Matthew Dillon [Mon, 4 Dec 2017 03:06:03 +0000 (19:06 -0800)]
kernel - Remove DISABLE_PSE option and related code
* Remove the DISABLE_PSE option and related code. Note that the pmap
code was already forcing DISABLE_PSE since we are 64-bit only and
the pmap code never supported PSE anyway.
zrj [Mon, 4 Dec 2017 10:02:16 +0000 (12:02 +0200)]
vmstat(8): Change few printf formats for -s.
Catch up with
b7ea2f3f550021bfaabd8ed8d50b54c157fb55bf
Sascha Wildner [Mon, 4 Dec 2017 08:25:32 +0000 (09:25 +0100)]
Fix mdoc issues in various manual pages.
Matthew Dillon [Mon, 4 Dec 2017 01:14:15 +0000 (17:14 -0800)]
kernel - Expand page count fields to 64 bits
* 32 bit page count fields limit us to 8TB of ram. Expand to allow
up to the DMAP limit (32TB). Do an initial pass on various page
count fields and change them from int's to long's or vm_pindex_t's.
* Fix a 32-bit overflow in the pv_entry initialization code.
pv_entry_max = shpgperproc * maxproc + vm_page_array_size;
2000 * 1046516 + pages_of_phys_memory;
maxproc is 1046516 @ 512GB. This calculation overflows its 32
bit signed variable somewhere between 256G and 512G of ram. This
can lead to a zinitna() allocation in pvzone that is much too
large.
Reported-by: zrj
Antonio Huete Jimenez [Mon, 4 Dec 2017 00:55:05 +0000 (16:55 -0800)]
test/vkernel - Add hammer2 support
- Fix fstab and loader.conf settings.
François Tigeot [Sun, 3 Dec 2017 10:31:41 +0000 (11:31 +0100)]
drm/linux: Implement sort()
François Tigeot [Sun, 3 Dec 2017 09:32:58 +0000 (10:32 +0100)]
drm/linux: Fix linux/dma-mapping.h compilation...
... with the drm/i915 codebase from Linux 4.8
* Move functions from .h to .c files in order to hide their implementations
* This avoids leaking DragonFly headers to Linux code or Linux headers
to DragonFly code with associated bad side-effects like type redefinitions
François Tigeot [Sun, 3 Dec 2017 07:15:04 +0000 (08:15 +0100)]
drm/linux: Add i2c_get_adapdata and i2c_set_adapdata()
François Tigeot [Sun, 3 Dec 2017 06:37:04 +0000 (07:37 +0100)]
drm/linux: Add system_unbound_wq
Sepherosa Ziehau [Sat, 2 Dec 2017 17:13:43 +0000 (01:13 +0800)]
syscons: Unbreak compile w/o splash
Matthew Dillon [Sat, 2 Dec 2017 19:06:30 +0000 (11:06 -0800)]
hammer2 - Fix indefinite dirty chains due to rename
* Do not call cache_setunresolved() on tnch before calling
cache_rename(). Doing so prevents cache_rename() from properly
setting VREF_FINALIZE on the vnode. Since the deleted inode is
no longer in the chain hierarchy the related chains can remain
dirty indefinitely (until the vnode is reused or the filesystem
is unmounted).
* This fixes inmem dirty chain accounting and 'chnmem' stalls.
Matthew Dillon [Sat, 2 Dec 2017 19:05:58 +0000 (11:05 -0800)]
hammer2 - optimize hammer2_pfs_memory_wakeup()
* Optimize hammer2_pfs_memory_wakeup() to use fetchadd instead of
cmpset, reducing contention.
Matthew Dillon [Sat, 2 Dec 2017 09:02:59 +0000 (01:02 -0800)]
hammer2 - Fix rename race
* Fix a rename race in hammer2 which can result in unwanted namecache
overloading. When this occurs, a rename operation can wind up
deleting the same inode more than once.
* This fixes a "hammer2_chain_getparent: no parent" panic in H2.
Reported-by: kerma
zrj [Sat, 2 Dec 2017 17:44:42 +0000 (19:44 +0200)]
top(1): Avoid segfaults on systems with more cores.
Fixes segfaults on 110 cpu core setup for top -M usage.
zrj [Sat, 2 Dec 2017 17:41:04 +0000 (19:41 +0200)]
systat(1): Print VNODE PAGER.
Looks a bit better.
zrj [Sat, 2 Dec 2017 17:40:08 +0000 (19:40 +0200)]
hammer2(8): Document cleanup command.
While there, do some misc whitespace cleanup.
zrj [Sat, 2 Dec 2017 17:38:46 +0000 (19:38 +0200)]
kernel/vfs: Avoid diagnostic line breaks.
Sascha Wildner [Sat, 2 Dec 2017 11:49:45 +0000 (12:49 +0100)]
<sys/systm.h>: Remove bcopyb() prototype.
It was a i386 specific function which was removed in
f4c88b0b86f1810.
Reported-by: zrj
Sascha Wildner [Sat, 2 Dec 2017 08:55:05 +0000 (09:55 +0100)]
pthread_join.3: Document pthread_timedjoin_np() (taken from FreeBSD).
Sascha Wildner [Sat, 2 Dec 2017 07:57:03 +0000 (08:57 +0100)]
pthread_mutex_*.3: Add {get,set}prioceiling to SEE ALSO.
Eitan Adler [Sat, 2 Dec 2017 06:24:18 +0000 (22:24 -0800)]
pf.os: Add OpenBSD:6.1
Obtained From: OpenBSD
Matthew Dillon [Sat, 2 Dec 2017 02:56:06 +0000 (18:56 -0800)]
kernel - Increase syscons history buffer size
* Increase syscons history from 4 screens to 10 screens
(4*rows to 10*rows).
Matthew Dillon [Sat, 2 Dec 2017 02:52:27 +0000 (18:52 -0800)]
kernel - Fix CAM unit allocation race
* Fix an issue where multiple targets can sometimes allocate the
same unit when probed asynchronously. The search and insertion
functions were being independently locked.
Eitan Adler [Fri, 1 Dec 2017 21:29:50 +0000 (13:29 -0800)]
Revert "Remove advertising clause from pr(1)"
This reverts commit
4586ab4e1609825eb2d4503c92578933c3479239.
See https://www.mail-archive.com/svn-src-all@freebsd.org/msg153666.html
Imre Vadász [Sat, 25 Nov 2017 17:25:54 +0000 (18:25 +0100)]
syscons - Partly implement FBIO_BLANK ioctl, for display powersaving.
* Only implement the parts relevant for display powersaving when a KMS
graphics driver is loaded. Adjust the existing V_DISPLAY_* constant
definitions to match the corresponding definitions in FreeBSD.
Eitan Adler [Thu, 30 Nov 2017 08:02:23 +0000 (00:02 -0800)]
Minor fixes to pr(1)
Obtained-from: FreeBSD
Eitan Adler [Thu, 30 Nov 2017 07:45:12 +0000 (23:45 -0800)]
Add 'const' where appropriate in pr(1)
Eitan Adler [Thu, 30 Nov 2017 07:35:33 +0000 (23:35 -0800)]
Remove advertising clause from pr(1)
Permitted by https://www.freebsd.org/copyright/license.html
Renumber 4->3 to be consistent with other files
Eitan Adler [Thu, 30 Nov 2017 06:59:17 +0000 (22:59 -0800)]
Add static to variables in pr(1)
Sascha Wildner [Thu, 30 Nov 2017 07:26:00 +0000 (08:26 +0100)]
libpthread: Document some more functions.
Specifically:
pthread_condattr_getclock() (Taken-from: FreeBSD)
pthread_condattr_getpshared() (Taken-from: FreeBSD)
pthread_condattr_setclock() (Taken-from: FreeBSD)
pthread_condattr_setpshared() (Taken-from: FreeBSD)
pthread_mutex_getprioceiling() (Taken-from: NetBSD)
pthread_mutex_setprioceiling() (Taken-from: NetBSD)
pthread_mutexattr_getpshared()
pthread_mutexattr_setpshared()
Sascha Wildner [Thu, 30 Nov 2017 07:12:32 +0000 (08:12 +0100)]
libpthread: Add pthread_mutex_timedlock() reference to some manual pages.
Sascha Wildner [Thu, 30 Nov 2017 06:55:18 +0000 (07:55 +0100)]
libpthread: Sort a few things in the Makefile.
zrj [Wed, 29 Nov 2017 15:58:14 +0000 (17:58 +0200)]
games: Make benefits for the glorious curses lib.
Consolidate all private ncurses handling in top level Makefile.inc in games/.
Will simplify upcoming base ncurses library update.
While there, perfom the same for private crypto lib even if it a single case.
zrj [Wed, 29 Nov 2017 15:36:41 +0000 (17:36 +0200)]
fortune(6): Pre-emptive CENSORSHIP.
First let's get it straight. It is censorship and let's not sugar coat it.
The FO has fallen, N is falling and naturally we are next.
I'm only doing this to prevent certain discussions taking place on the mailing
lists or irc over the holidays and to explictly show irony of all this ${thing}.
It is SAD to see that various projects went from technical to being PC infested.
So much for being the flagmans of OSS developments & examples to other projects.
(slow ironic clapping insert here)
Such slabnij individuals with "hurt feelings" always are causing developers to
get distracted from their hacking on source or making hardware work properly.
Also, these actions opens up the door wider for "other" topics into discussions.
I'm not going to mention the name of certain evil* person so that this would not
get "flagged". Absurdity is already way beyond any reasonable levels. Clearly
there are some perpetually offended snoflakes, who have nothing better to do
other than look for ways to get offended or to trigger other people in real life
and over the internet. Why not just choose one? If someone wants to let some
accumulated steam off, there are places over the internet where one can have a
constructive conversation about certain topics. If you can not handle the raw,
unredacted, straight opinions, you must be new there, please kindly go back to
reddit safe spaces. Just do *not* bring those talks over into the projects!
It is very likely that not everybody feels the same or even cares.
This is literally "Look what you made me do!", so here we go.
I'm going to consider cookies removal *only* and *only* if some things are
declared illegal by the country/state law with a reference to look it up where
it clearly states what is illegal to quote (including if that applies to the
translated text variants). No "probably" stuff. Either it's illegal or it's not.
If you are not sure, you should consult with your country/state lawyers first.
By going trough MSM and lists it is clear that some find offensive *not* the
quotes by itself but the mere mention of certain letter combinations. Since I do
not share identical ideology as most westerners (I was born in 19 88, USSR, and
with collapse of Soviet union and 19 91 events my fundation is a different myth)
I'm expanding "grep ${pattern} datfiles/fortune" to include Stalin for lulz too.
Many Lithuanians and Ukrainians find "admirating" that historic figure offensive
too, mainly because of "free" trips to Siberia, brothers and sisters separated
from parents, etc. Still it is not for me to judge the history nor rewrite it.
For now I'm keeping all Communism/Capitalism cookies just as a satire. But I'm
moving the qoute by Adolfo Guzman too, cause "sorry it matched the patternTM".
Doing this solves the following issues:
* does not single out any specific individual (just a pattern right?);
* clearly expresses irony and shows how some are so biased and have no
understanding that their actions have consequences.
If for some reason you still find something offensive, check out "man 6 fortune"
for "-o" flag. Of course, if (for some reason) you do not want the potentially
"offensive" aphorisms on your disk, you can opt out:
* echo 'INSTALL_OFFENSIVE_FORTUNES=NO\!\!\!\!' >> /etc/make.conf
* standard buildworld/installworld
* make upgrade
and problem solved.
If still find things like fortune(6), hangman(6), pig(6) or maybe even tetris(6)
"offensive", set NO_GAMES=YES and get rid of all games distrib (I don't judge).
Since we are source based distribution (and no, BSD does *not* stand for Binary
Software Distribution) we provide installation images just for convenience. We
do not support binary base upgrades, only the standard source tree build ones.
To be clear, I had some of these fortune cookies added over a year ago in:
6c5aea60b8d9d163c6caa536036e82e7472b84bc and nobody so far complained about it.
It is still very strange that previously those were OK. So what has changed now?
What if I'm offended by software bugs? Should I remove that sofware or try to
fix it? What if someone is offended by the license say GPL, CDDL or even Apache?
So far censorship applies only to games/fortune/.
All of this is just something to think about & no further talks will take place.
Respect others and respect yourself. Also, don't get offended to get offended.
I can only hope that infinity will forgive me, but this needs to be done.
zrj [Tue, 28 Nov 2017 11:44:44 +0000 (13:44 +0200)]
kernel: Make floppies work again.
Revive the old x86 32bit only fdc(4) driver, it only needs just a few changes.
The fdc was never ported to work on x86_64 DragonFly, so rather than remove it
together with its manpage, fix few things and hook it to LINT64 config so that
we would keep track the state of it and not keep it in a dusty corner of sys/.
On modern x86_64 systems fdc($) has little value and it is getting harder and
harder to find floppy drives that work or even the motherboards that still have
the FDD headers to hook the 34pin ribbon cable, but I feel nostalgic about the
scratching noises the floppy drive makes while performing the operations.
So went through all storage closets and find one that works, blew out all the
accumulated dusts, cleaned the magnetic heads with a folder paper tissue good.
The hardest part was to find a floppy disk. Only could find just a single one
stashed away deep on the floor of a very old safe under heeps of old documents.
For fdc(4) to actually work, some adjustmens to isa_dma.c were needed because
of how ISA bus probing is done in platform/pc64/x86_64/autoconf.c. To work
around the exhaustion of low DMA memory before it gets to isa_probe_children()
now try to preallocate contiguous buffer of 512KB and free it just before the
probe of ISA bus. This should help any legacy ISA drivers(including ppc(4))
or even some of more picky drivers that are not built in into the kernel.
For case where isa_dmainit() would still fail to allocate the buffer fitting
the requirements, have added the safety checks and explicit fallback to non
DMA mode by setting the FDC_NODMA flag to avoid panics on "bad bounce buffer".
Floppy drive would not work properly, but it is this versus a panic. There are
other issues too. For some reason some files tend to be read with stripes of
zeros, but write operations seems to work. Same floppy is readable on linux.
Currently can not debug the issue cause my floppy had seen better days:
_# time dd if=/dev/fd0 of=/tmp/recover.img conv=sync,noerror
...
dd: /dev/fd0: Input/output error
2880+0 records in
2880+0 records out
1474560 bytes transferred in 80.723953 secs (18267 bytes/sec)
while dmesg:
fd0: hard error reading offset
00000000ae00 for 512 (ST0 40<abnrml> ST1 20<bad_crc> ST2 20<bad_crc> cyl 2 hd 0 sec 16)
fd0: hard error reading offset
00000000f600 for 512 (ST0 40<abnrml> ST1 1<no_am> ST2 1<no_dam> cyl 3 hd 0 sec 16)
fd0: hard error reading offset
000000113800 for 512 (ST0 40<abnrml> ST1 20<bad_crc> ST2 20<bad_crc> cyl 61 hd 0 sec 9)
fd0: hard error reading offset
000000115c00 for 512 (ST0 44<abnrml,top_head> ST1 4<sec_not_fnd> ST2 10<wrong_cyl> cyl 61 hd 1 sec 9)
fd0: hard error reading offset
00000011a400 for 512 (ST0 44<abnrml,top_head> ST1 4<sec_not_fnd> ST2 0 cyl 62 hd 1 sec 9)
fd0: hard error reading offset
00000011ec00 for 512 (ST0 44<abnrml,top_head> ST1 4<sec_not_fnd> ST2 0 cyl 63 hd 1 sec 9)
fd0: hard error reading offset
000000123400 for 512 (ST0 44<abnrml,top_head> ST1 4<sec_not_fnd> ST2 0 cyl 64 hd 1 sec 9)
fd0: hard error reading offset
000000127c00 for 512 (ST0 44<abnrml,top_head> ST1 4<sec_not_fnd> ST2 0 cyl 65 hd 1 sec 9)
Given the state of my single floppy I cannot even do a proper newfs_msdos(8).
So maybe someone who has a collection of good floppies could give it a go.
While there, hook old musycc(4) driver to LINT64, it was fixed in:
906779c3d1e064e55bb019342ad6c1621cc04399
Sascha Wildner [Tue, 28 Nov 2017 19:13:35 +0000 (20:13 +0100)]
libarchive: Revert commit that was not meant to be pushed.
Sascha Wildner [Tue, 28 Nov 2017 18:34:23 +0000 (19:34 +0100)]
libc/nls: Use current locale (set by thread).
It was global locale always previously.
Taken-from: FreeBSD (r304755)
Reported-by: xenu (also provided a test case)
François Tigeot [Tue, 28 Nov 2017 17:21:03 +0000 (18:21 +0100)]
drm/linux: Add vmalloc_user() and vfree()
zrj [Tue, 28 Nov 2017 14:41:49 +0000 (16:41 +0200)]
ix: Add missing source to conf/files.
Missed in
6150453f26f6ee01b60ce647b20bc8afcfc71c8e
Sepherosa Ziehau [Sat, 11 Nov 2017 22:26:56 +0000 (06:26 +0800)]
ix: Sync with Intel's ix-3.2.17.
- Add several new chips.
- Add software workaround for 82598 errata #26.
François Tigeot [Mon, 27 Nov 2017 18:03:25 +0000 (19:03 +0100)]
drm/linux: Add or improve various header files
François Tigeot [Mon, 27 Nov 2017 09:22:32 +0000 (10:22 +0100)]
drm/linux: Remove debugging messages
Peeter Must [Mon, 27 Nov 2017 11:25:09 +0000 (13:25 +0200)]
kernel - Bring in definition of _IOWINT from FreeBSD.
* This is needed for evdev.
Obtained-from: FreeBSD
Sascha Wildner [Sun, 26 Nov 2017 13:11:17 +0000 (14:11 +0100)]
tcpdump(8): Reconfigure a bit after NO_CRYPT removal.
Sascha Wildner [Sat, 25 Nov 2017 21:01:12 +0000 (22:01 +0100)]
Remove faith(4) and faithd(8) from the tree.
FreeBSD did that 3 years ago (r274331). Quoting from their commit msg:
-----8<-----
It looks like industry have chosen different (and more traditional)
stateless/stateful NAT64 as translation mechanism. Last non-trivial
commits to both faith(4) and faithd(8) happened more than 12 years
ago, so I assume it is time to drop RFC3142 in FreeBSD.
----->8-----
Some more info here:
https://lists.freebsd.org/pipermail/freebsd-net/2014-October/040224.html
Discussed-with: sephe
Tomohiro Kusumi [Sat, 25 Nov 2017 18:02:47 +0000 (20:02 +0200)]
autofs: Add "noatime" to auto_master
FreeBSD@GitHub
708d95a2d6 e5253222e9
Note that in DragonFly "noatime" was never added to -media map.
("noatime" in -media map existed only for 1 day in FreeBSD)
Tomohiro Kusumi [Sat, 25 Nov 2017 17:53:20 +0000 (19:53 +0200)]
autofs: Add etc/autofs/include_nis
FreeBSD@GitHub
e9b93842e9
Tomohiro Kusumi [Sat, 25 Nov 2017 14:09:02 +0000 (16:09 +0200)]
autofs: Import FreeBSD@GitHub
7e6cabd06e
Sascha Wildner [Sat, 25 Nov 2017 14:20:17 +0000 (15:20 +0100)]
lock.9: lockcount() and lockcountnb() were removed in
3b6a19b26fb9c0e7918.
Sascha Wildner [Sat, 25 Nov 2017 13:51:09 +0000 (14:51 +0100)]
Remove some duplicated includes.
Sascha Wildner [Sat, 25 Nov 2017 13:40:05 +0000 (14:40 +0100)]
hier.7: Adjust for recent changes.
Sascha Wildner [Sat, 25 Nov 2017 13:39:47 +0000 (14:39 +0100)]
Update the pciconf(8) database.
October 21, 2017 snapshot from http://pciids.sourceforge.net/
Imre Vadász [Fri, 24 Nov 2017 19:19:50 +0000 (20:19 +0100)]
kernel - Get rid of old KDSETRAD keyboard ioctl, and some __i386__ kbd code.
* The KDSETREPEAT ioctl was implemented as a replacement more than 18 years
ago in 1999 (FreeBSD svn r44628).
Sascha Wildner [Fri, 24 Nov 2017 15:24:40 +0000 (16:24 +0100)]
mount_{smbfs,std,udf}: Use MOPT_NULL.
Sascha Wildner [Thu, 23 Nov 2017 20:18:13 +0000 (21:18 +0100)]
reboot.2: Remove obsolete BUGS section.
Matthew Dillon [Wed, 22 Nov 2017 18:00:33 +0000 (10:00 -0800)]
libc - Use O_CLOEXEC in srandomdev()
* Specify O_CLOEXEC in srandomdev() to avoid descriptor leakages
if called during a concurrent threaded fork().
Sascha Wildner [Wed, 22 Nov 2017 14:06:23 +0000 (15:06 +0100)]
Remove various former kernel config options for good.
Sascha Wildner [Wed, 22 Nov 2017 13:47:44 +0000 (14:47 +0100)]
kernel: Remove old SHOW_BUSYBUFS kernel configuration option.
It was removed in
5e13112632fcc46beba13acf879e178aba56391c.
zrj [Wed, 22 Nov 2017 06:26:59 +0000 (08:26 +0200)]
kernel: Remove <sys/inflate.h> inclusion from files that don't need it.
The <sys/inflate.h> is only needed for:
* sys/kern/imgact_gzip.c
* sys/kern/inflate.c
zrj [Tue, 21 Nov 2017 15:57:31 +0000 (17:57 +0200)]
inet6: Remove few unneeded <net/zlib.h> headers.
No functional change.
Tomohiro Kusumi [Tue, 21 Nov 2017 21:28:02 +0000 (23:28 +0200)]
kqueue: Fix kqueue(2) EVFILT_FS section
Fix
05d3db1bc901548d6335d701c773c537d4ef42fd.
EVFILT_FS filter currently does not use ident. It can be any value
to catch mount/umount.
FreeBSD kqueue(2) man page doesn't have description on EVFILT_FS
by the way, while the code was taken from FreeBSD for mount/umount.
Sascha Wildner [Tue, 21 Nov 2017 14:24:22 +0000 (15:24 +0100)]
kmalloc.9: Remove some obsolete information.
Sascha Wildner [Tue, 21 Nov 2017 07:25:48 +0000 (08:25 +0100)]
Revert "kprintf.9: Remove unneeded header."
This reverts commit
dbb5d235a84b2aa354a9d5745aa6a02ac9a26c50.
The header was actually useful because <sys/syslog.h> has the
priority definitions.
Sascha Wildner [Tue, 21 Nov 2017 07:09:29 +0000 (08:09 +0100)]
kprintf.9: Remove unneeded header.
Reported-by: zrj
Sascha Wildner [Mon, 20 Nov 2017 06:55:32 +0000 (07:55 +0100)]
Remove unused <{cpu,machine}/coredump.h> header.
Matthew Dillon [Sat, 18 Nov 2017 19:01:47 +0000 (11:01 -0800)]
vkernel - Sync to recent API changes (3)
* Fix va page offset in returned value.
Matthew Dillon [Sat, 18 Nov 2017 18:43:37 +0000 (10:43 -0800)]
vkernel - Sync to recent API changes (2)
* Refactor uservtophys() to use vm_fault_page(). The pmap
lookup isn't going to work coupled with the fuword style
test because the vkernel's copyin/copyout/fuword/etc code
doesn't fault the underlying page into the pmap.
Matthew Dillon [Sat, 18 Nov 2017 18:13:01 +0000 (10:13 -0800)]
vkernel - Sync to recent API changes
* Add uservtophys() to the vkernel code. This is a bit of a quick hack
but it should work. It won't be efficient, though.
* vkernel compiles again and appears to run ok.
Matthew Dillon [Sat, 18 Nov 2017 17:08:45 +0000 (09:08 -0800)]
kernel - Fix vclean assertion due to short-cut taken by TMPFS
* Allow a vnode being destroyed to have a dirty VM object. TMPFS
doesn't bother to cleanup VM objects when destroying file nodes
(e.g. when a file that is no longer referenced is removed), and
can leave dirty pages present in the underlying object.
* Fixes occassional kernel assertions related to tmpfs (that only
tend to occur with specific use cases).
Reported-by: zrj
Sascha Wildner [Sat, 18 Nov 2017 12:30:57 +0000 (13:30 +0100)]
libc/citrus: Catch a NULL pointer earlier, check for empty string later.
This fixes a gcc8 warning.
Taken-from: NetBSD (Revisions 1.20-1.22)
Sascha Wildner [Sat, 18 Nov 2017 12:01:04 +0000 (13:01 +0100)]
Remove the NO_CRYPT build option.
It has been broken for a long time without anyone complaining about and
we don't want to maintain it either.
In-discussion-with: zrj
Sascha Wildner [Sat, 18 Nov 2017 01:32:47 +0000 (02:32 +0100)]
<sys/indefinite2.h>: Fix header name.
This is never reached (<sys/globaldata.h> comes in via <sys/indefinite.h>
as it seems), but fix anyway.
Sascha Wildner [Fri, 17 Nov 2017 17:44:54 +0000 (18:44 +0100)]
kernel: Remove some semicolons at the end of macro definitions.
Sascha Wildner [Fri, 17 Nov 2017 17:35:23 +0000 (18:35 +0100)]
kernel: Remove some unnecessary semicolons.
Sascha Wildner [Fri, 17 Nov 2017 17:34:14 +0000 (18:34 +0100)]
kernel: Remove two final \ in macro definitions.
zrj [Fri, 17 Nov 2017 12:40:56 +0000 (14:40 +0200)]
LTO: Disable safety feature.
No longer can reproduce boot issue in the padlock/padlock_rng codes.
The -flto-partition=one can be supplied together with -flto as needed.
zrj [Fri, 17 Nov 2017 10:50:35 +0000 (12:50 +0200)]
LTO: Pass CFLAGS to compiler for kernel module linking too.
Forgot to git add it in
fa8104330967fab6248da216251a4382b39b1dab.
Linker still could link LTO'ed *.o objects, because ld is invoked by cc
with explicitly passed -plugin option that loads the liblto_plugin.so.
This only slightly changes how LTO is performed on kernel modules.
Note: this will need to be adjusted for clang -flto compatibility
when I will update the clangb version in git module.
Reported-by: dillon
zrj [Fri, 17 Nov 2017 10:21:09 +0000 (12:21 +0200)]
gcc47: Backport static initialization acceptance.
I only backporting these so that failing to accept drm/i915 _MMIO() stuff
would *not* be used as an argument to remove gcc47 alternative compiler
from base, just because "oh look it does not compile the i915.ko".
The gcc47 is likely the last C compiler compilable with C compiler able
to bootstrap the c++ compiler that is used on x86_64 anymore.
If anyone has/works on simple C compiler that could boostrap modern gcc,
you know where I hanging out and I gladly replace gcc47 with it in base.
It only takes few lines to accept updated drm/i915 "features".
It still warns with -pedantic:
/usr/src/sys/dev/drm/i915/intel_pm.c:3925:3: warning: initializer element is not constant [-pedantic]
/usr/src/sys/dev/drm/i915/intel_pm.c:3925:3: warning: (near initialization for 'wm0_pipe_reg[0]') [-pedantic]
/usr/src/sys/dev/drm/i915/intel_pm.c:3926:3: warning: initializer element is not constant [-pedantic]
/usr/src/sys/dev/drm/i915/intel_pm.c:3926:3: warning: (near initialization for 'wm0_pipe_reg[1]') [-pedantic]
/usr/src/sys/dev/drm/i915/intel_pm.c:3927:3: warning: initializer element is not constant [-pedantic]
/usr/src/sys/dev/drm/i915/intel_pm.c:3927:3: warning: (near initialization for 'wm0_pipe_reg[2]') [-pedantic]
...
So far i915 is the only place in kernel that does this, please lets keep it at this.
Check C99 Standard: Section 6.7.8 for more info.
Taken-from: gcc trunk (216416 + 216440 revisions)
zrj [Fri, 17 Nov 2017 10:17:27 +0000 (12:17 +0200)]
tftp(1): Avoid symbol conflict with ncurses.
The usr.bin/tftp/main.c: int trace;
while lib_trace.c: void trace(const unsigned int){};
This breaks -flto -static link against LTO'ed libncurses.a.
Fix it by just renaming: s/trace/tftp_trace/g.
zrj [Fri, 17 Nov 2017 10:03:18 +0000 (12:03 +0200)]
ftp(1): Avoid symbol conflict with ncurses.
The contrib/tnftp/src/ftp_var.h: GLOBAL int trace;
while lib_trace.c: void trace(const unsigned int){};
This breaks -flto -static link against LTO'ed libncurses.a.
Since it is in contrib code, just -Dtrace it.
zrj [Fri, 17 Nov 2017 09:20:44 +0000 (11:20 +0200)]
backgammon(6): Avoid symbol issue with ncurses lib.
The backgammon(6) has: back.k: extern int raw;
while in ncurses tinfo/lib_raw.c: int raw(void){}.
This breaks -flto -static link against LTO'ed libncurses.a.
So just rename backgammon global raw to bgraw.
Just for the fun of it, note that init.c: struct termios bgraw;
NetBSD already have it fixed in games/backgammon/.
Also still not clear how to do with
c5e1790f6b.
Sascha Wildner [Fri, 17 Nov 2017 08:02:47 +0000 (09:02 +0100)]
Fix some trailing whitespace in sys/conf and sys/config.
Submitted-by: zrj
zrj [Thu, 16 Nov 2017 13:28:59 +0000 (15:28 +0200)]
banner(1): Remove (void) casts.
Forgot about these. Sorry.
zrj [Thu, 16 Nov 2017 13:27:21 +0000 (15:27 +0200)]
games: Remove (void) casts.
No functional change.
zrj [Thu, 16 Nov 2017 12:38:47 +0000 (14:38 +0200)]
fortune(6): Add few fortunes.