CVS commit: src/sys/arch

2018-12-02 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Sun Dec  2 08:19:44 UTC 2018

Modified Files:
src/sys/arch/amd64/amd64: mainbus.c
src/sys/arch/i386/i386: mainbus.c
src/sys/arch/x86/pci: pci_intr_machdep.c
src/sys/arch/x86/x86: intr.c

Log Message:
make

options NO_PCI_MSI_MSIX

work again for arch/x86/


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/amd64/amd64/mainbus.c
cvs rdiff -u -r1.103 -r1.104 src/sys/arch/i386/i386/mainbus.c
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/x86/pci/pci_intr_machdep.c
cvs rdiff -u -r1.135 -r1.136 src/sys/arch/x86/x86/intr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man9

2018-12-02 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sun Dec  2 09:18:26 UTC 2018

Modified Files:
src/share/man/man9: audio.9

Log Message:
Sync prototypes with reality.  These have been changed in 2011.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/share/man/man9/audio.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man9

2018-12-02 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sun Dec  2 09:22:30 UTC 2018

Modified Files:
src/share/man/man9: audio.9

Log Message:
Correct function name.
freem is used to free memory allocated by allocm.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/share/man/man9/audio.9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/man/man4

2018-12-02 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Dec  2 10:06:45 UTC 2018

Modified Files:
src/share/man/man4: ena.4

Log Message:
New sentence, new line. Add .An -nosplit. Move RCS Id to top.
Remove unnecessary quuotes.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/ena.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/bin/sh

2018-12-02 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Dec  2 10:27:58 UTC 2018

Modified Files:
src/bin/sh: alias.c

Log Message:
Fix the worst of the bugs in alias processing.   This has been in sh
since this code was first imported (May 1994) (ie: before 4.4-Lite)

There is (much) more coming soon (the big ugly comment is going away).

This one has been separated out, as it can easily cause sh
core dumps, so needs:

XXX pullup-8

(the other changes to aliases probably will not get that.)


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/bin/sh/alias.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.sbin/acpitools/acpidump

2018-12-02 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec  2 10:51:07 UTC 2018

Modified Files:
src/usr.sbin/acpitools/acpidump: acpi.c acpidump.8

Log Message:
 Decode IO Remapping Table.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/usr.sbin/acpitools/acpidump/acpi.c
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/acpitools/acpidump/acpidump.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2018-12-02 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Dec  2 13:17:19 UTC 2018

Modified Files:
src/sys/dev/pci: mpt_pci.c

Log Message:
use pci_intr_establish_xname()


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pci/mpt_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2018-12-02 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Dec  2 13:22:28 UTC 2018

Modified Files:
src/sys/dev/pci: mpii.c

Log Message:
use pci_intr_establish_xname()


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/pci/mpii.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/distrib/utils/embedded/conf

2018-12-02 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Dec  2 15:43:05 UTC 2018

Modified Files:
src/distrib/utils/embedded/conf: evbarm.conf

Log Message:
Fix variable escaping in dev_exists()


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/distrib/utils/embedded/conf/evbarm.conf

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/include

2018-12-02 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Sun Dec  2 16:49:24 UTC 2018

Modified Files:
src/sys/arch/ia64/include: proc.h

Log Message:
fix SP offset


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/include/proc.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libedit

2018-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec  2 16:58:13 UTC 2018

Modified Files:
src/lib/libedit: readline.c tty.c tty.h
src/lib/libedit/readline: readline.h

Log Message:
Add a couple more readline compat functions.


To generate a diff of this commit:
cvs rdiff -u -r1.147 -r1.148 src/lib/libedit/readline.c
cvs rdiff -u -r1.67 -r1.68 src/lib/libedit/tty.c
cvs rdiff -u -r1.22 -r1.23 src/lib/libedit/tty.h
cvs rdiff -u -r1.43 -r1.44 src/lib/libedit/readline/readline.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2018-12-02 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Dec  2 17:02:04 UTC 2018

Modified Files:
src/sys/dev/pci: if_bge.c if_bgereg.h

Log Message:
Don't destroy the dma maps if we're not disabling the adapter, avoids
a KASSERT() when bus_dmamap_destroy() is called from interrupt
context via bge_watchdog()
Set IFF_OACTIVE only when bge_encap() fails on adapter ressource shortage.
Otherwise we may set IFF_OACTIVE while no transmit is in progress, and
nothing will clear it.
If bus_dmamap_load_mbuf() fails with EFBIG, m_defrag() the chain and retry.
Refine the check for the 4GB boundary workaround (a fragment should also
not cross the boundary), and do it only for TSO.
If bge_encap() fails and didn't set IFF_OACTIVE, drop the packet.
Bring in more hardware bug workarounds from freebsd.

With these it seems that a BCM5720 A0 can survive a few hours of internet
load with TSO4 enabled.


To generate a diff of this commit:
cvs rdiff -u -r1.319 -r1.320 src/sys/dev/pci/if_bge.c
cvs rdiff -u -r1.93 -r1.94 src/sys/dev/pci/if_bgereg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci

2018-12-02 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sun Dec  2 18:12:29 UTC 2018

Modified Files:
src/sys/dev/pci: if_pcn.c

Log Message:
use pci_intr_establish_xname()


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/dev/pci/if_pcn.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/aarch64/include

2018-12-02 Thread Alexander Nasonov
Module Name:src
Committed By:   alnsn
Date:   Sun Dec  2 20:54:44 UTC 2018

Modified Files:
src/sys/arch/aarch64/include: sljit_machdep.h

Log Message:
Switch to __builtin___clear_cache() in userspace.

aarch64_sync_icache() doesn't exist because there no libarm equivalent
on aarch64.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/aarch64/include/sljit_machdep.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src

2018-12-02 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sun Dec  2 21:00:13 UTC 2018

Modified Files:
src/share/mk: bsd.sys.mk
src/sys/arch/amd64/conf: GENERIC
src/sys/arch/amd64/include: param.h
src/sys/conf: files ssp.mk
src/sys/kern: files.kern subr_pool.c sys_syscall.c
src/sys/sys: systm.h
src/sys/uvm: uvm_km.c
Added Files:
src/sys/arch/amd64/include: kleak.h
src/sys/kern: subr_kleak.c
src/usr.sbin/kleak: Makefile kleak.c

Log Message:
Introduce KLEAK, a new feature that can detect kernel information leaks.

It works by tainting memory sources with marker values, letting the data
travel through the kernel, and scanning the kernel<->user frontier for
these marker values. Combined with compiler instrumentation and rotation
of the markers, it is able to yield relevant results with little effort.

We taint the pools and the stack, and scan copyout/copyoutstr. KLEAK is
supported on amd64 only for now, but it is not complicated to add more
architectures (just a matter of having the address of .text, and a stack
unwinder).

A userland tool is provided, that allows to execute a command in rounds
and monitor the leaks generated all the while.

KLEAK already detected directly 12 kernel info leaks, and prompted changes
that in total fixed 25+ leaks.

Based on an idea developed jointly with Thomas Barabosch (of Fraunhofer
FKIE).


To generate a diff of this commit:
cvs rdiff -u -r1.286 -r1.287 src/share/mk/bsd.sys.mk
cvs rdiff -u -r1.508 -r1.509 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r0 -r1.1 src/sys/arch/amd64/include/kleak.h
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/amd64/include/param.h
cvs rdiff -u -r1.1216 -r1.1217 src/sys/conf/files
cvs rdiff -u -r1.2 -r1.3 src/sys/conf/ssp.mk
cvs rdiff -u -r1.25 -r1.26 src/sys/kern/files.kern
cvs rdiff -u -r0 -r1.1 src/sys/kern/subr_kleak.c
cvs rdiff -u -r1.227 -r1.228 src/sys/kern/subr_pool.c
cvs rdiff -u -r1.11 -r1.12 src/sys/kern/sys_syscall.c
cvs rdiff -u -r1.279 -r1.280 src/sys/sys/systm.h
cvs rdiff -u -r1.145 -r1.146 src/sys/uvm/uvm_km.c
cvs rdiff -u -r0 -r1.1 src/usr.sbin/kleak/Makefile src/usr.sbin/kleak/kleak.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/kern

2018-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec  3 00:11:02 UTC 2018

Modified Files:
src/sys/kern: files.kern init_sysctl.c

Log Message:
Expose addresses depending on the KASLR setting (from mrg@). Restores the
status quo of exposing kernel addresses if there is no KASLR.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/kern/files.kern
cvs rdiff -u -r1.219 -r1.220 src/sys/kern/init_sysctl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/i386/conf

2018-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec  3 00:11:39 UTC 2018

Modified Files:
src/sys/arch/i386/conf: files.i386

Log Message:
KASLR is in files.kern


To generate a diff of this commit:
cvs rdiff -u -r1.396 -r1.397 src/sys/arch/i386/conf/files.i386

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/amd64/conf

2018-12-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Dec  3 00:12:22 UTC 2018

Modified Files:
src/sys/arch/amd64/conf: files.amd64

Log Message:
KASLR is in files.kern now.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/arch/amd64/conf/files.amd64

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/bin/sh

2018-12-02 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Dec  3 02:38:30 UTC 2018

Modified Files:
src/bin/sh: jobs.c main.c main.h

Log Message:
When forking a child shell, arrange for errors/exit to always unwind
to the main handler, rather than wherever the parent shell would go.

nb: not needed for vfork(), after vfork() we never go that path - which
is good or we'd be corrupting the parent's handler.

This allows the child to always exit (when it should) rather than being
caught up doing something else (and while it would eventually exit, the
status would be incorrect in some cases).

One test is:
sh -c 'trap "(! :) && echo BUG || echo nobug" EXIT'
from Martijn Dekker

Fix from FreeBSD (missed earlier).

XXX - 2b part of the 48875 pullup to -8


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/bin/sh/jobs.c
cvs rdiff -u -r1.76 -r1.77 src/bin/sh/main.c
cvs rdiff -u -r1.11 -r1.12 src/bin/sh/main.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2018-12-02 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Dec  3 04:39:44 UTC 2018

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixgbe.h

Log Message:
 Some counters are not per queue but per traffic class. Make new evcnt group
"ixgM tcN" (N = 0..7) and move those counters into it. We are using only
traffic class 0, so we will see only tc0's counter are updated.


To generate a diff of this commit:
cvs rdiff -u -r1.167 -r1.168 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.51 -r1.52 src/sys/dev/pci/ixgbe/ixgbe.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/acpi

2018-12-02 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Mon Dec  3 05:22:03 UTC 2018

Modified Files:
src/sys/dev/acpi: acpi_mcfg.c

Log Message:
Define macro before using it. This macro is used as a compile time
"plugin" mechanism to use various platform specific enumeration
functions. It is currently separately defined for 'native' and XEN,
but the mechanism is not exported globally as it should be.

XXX: fix this.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/acpi/acpi_mcfg.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/bin/sh

2018-12-02 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Dec  3 06:40:26 UTC 2018

Modified Files:
src/bin/sh: alias.c alias.h eval.c input.c parser.c parser.h syntax.c
syntax.h

Log Message:
Revamp aliases - as dumb an idea as they are, if we're going
to have them, they should work as documented, not cause core
dumps, reference after free, incorrect replacements, failing
to implement alias after alias, ...

The big comment that ended:
  This is a good idea --- ***NOT***
and the hack it was describing are gone.

Note that most of this was from original CVS version 1.1
code (ie: came from the original import, even before 4.4-Lite
was merged.   That is, May 1994.  And no-one in 24.5 years
noticed (or at least complained about)  all the bugs (or at
least, most of them)).

With these changes, aliases ought to work (if you can call it
that) as they are expected to by POSIX.   Now if only we could
get POSIX to delete them (or make them optional)...

Changes partly inspired by similar changes made by FreeBSD,
(as was the previous change to alias.c, forgot ack in commit
log for that one, apologies) but done a little differently,
and perhaps with a slightly better outcome.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/bin/sh/alias.c
cvs rdiff -u -r1.8 -r1.9 src/bin/sh/alias.h
cvs rdiff -u -r1.165 -r1.166 src/bin/sh/eval.c
cvs rdiff -u -r1.63 -r1.64 src/bin/sh/input.c
cvs rdiff -u -r1.155 -r1.156 src/bin/sh/parser.c
cvs rdiff -u -r1.25 -r1.26 src/bin/sh/parser.h
cvs rdiff -u -r1.6 -r1.7 src/bin/sh/syntax.c
cvs rdiff -u -r1.10 -r1.11 src/bin/sh/syntax.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/bin/sh

2018-12-02 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Dec  3 06:41:30 UTC 2018

Modified Files:
src/bin/sh: expand.c parser.c

Log Message:
Yet another foray into the mysterious world of $@ -- this time
to fix the (unusual) idiom "${1+$@}"  (the quotes are part of it).
This seems to have broken about 5 or 6 years ago (somewhere
between -6 and -7), I believe.

Note this is not the same as "$@" and also not the same as ${1+"$@"}
(much more common idioms) which both worked.

Also attempt to deal with "" more correctly, especially when it
appears adjacent to "$@" (or one of the similar constructs.)

This stuff is still all as ugly and hackish (and fragile) as is
possible to imagine, but in an effort to allow some of the weirdness
to eventually go away, the parser output has been made more
regular and all quoted (parts of) words always now start with
CTLQUOTEMARK and end with CTLQUOTEEND regardless of where the
quotes appear.

This allows us to tell the difference between """$@" and "$@"
which was impossible before - yet they are required to generate
different output when there are no args (when "$@" simply vanishes).

Needless to say that change had ramifications all over the place.
To simplify any similar change in the future, there are some new
macros that can generally be used to detect the "noise" data when
processing words, rather than open coding that every time (which
meant that there would *always* be one which missed getting
updated...)

Several other bugs (of my making, and older ones) are also fixed.

The aim is that (aside from anything that is detecting the cases
that were broken before - which were all unlikely uses of sh
syntax) these changes should have no external visible impact.

Sure...


To generate a diff of this commit:
cvs rdiff -u -r1.128 -r1.129 src/bin/sh/expand.c
cvs rdiff -u -r1.156 -r1.157 src/bin/sh/parser.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/bin/sh

2018-12-02 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Dec  3 06:42:25 UTC 2018

Modified Files:
src/bin/sh: eval.c var.c var.h

Log Message:
Fix "export -x" (and its consequences) to behave as originally
intended (and as documented) rather than how it has been behaving
(which was not very rational.)   Since it is unlikely that anyone
is using this, the change should be mostly invisible.

While here, a couple of other minor cleanups:
. One call of geteuid() is enough in choose_ps1()
. Fix a typo in a comment
. Improve appearance (whitspace changes) in find_var()


To generate a diff of this commit:
cvs rdiff -u -r1.166 -r1.167 src/bin/sh/eval.c
cvs rdiff -u -r1.70 -r1.71 src/bin/sh/var.c
cvs rdiff -u -r1.36 -r1.37 src/bin/sh/var.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/bin/sh

2018-12-02 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Dec  3 06:43:19 UTC 2018

Modified Files:
src/bin/sh: eval.c eval.h main.c sh.1 trap.c trap.h

Log Message:
Cleanup traps a bit - attempt to handle weird uses in traps, such
as traps that issue break/continue/return to cause the loop/function
executing when the trap occurred to break/continue/return, and
generating the correct exit code from the shell including when a
signal is caught, but the trap handler for it exits.

All that from FreeBSD.

Also make
T=$(trap)
work as it is supposed to (also trap -p).

For now this is handled by the same technique as $(jobs) - rather
than clearing the traps in subshells, just mark them invalid, and
then whenever they're invalid, clear them before executing anything
other than the special blessed "trap" command.   Eventually we will
handle these using non-subshell command substitution instead (not
creating a subshell environ when the commands in a command-sub alter
nothing in the environment).


To generate a diff of this commit:
cvs rdiff -u -r1.167 -r1.168 src/bin/sh/eval.c
cvs rdiff -u -r1.21 -r1.22 src/bin/sh/eval.h
cvs rdiff -u -r1.77 -r1.78 src/bin/sh/main.c
cvs rdiff -u -r1.209 -r1.210 src/bin/sh/sh.1
cvs rdiff -u -r1.46 -r1.47 src/bin/sh/trap.c
cvs rdiff -u -r1.23 -r1.24 src/bin/sh/trap.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.