Commit Graph

259615 Commits

Author SHA1 Message Date
msaitoh
3cd62456f9 Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

 This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.
2018-06-26 06:47:57 +00:00
thorpej
067d2463e3 Remove the i2c "size" locator and corresponding property / attach arg.
It was a hack meant only for EEPROMs, which have another way to specify
size in the config directive ("flag" paramter), as well as a better way
to detect size based on "compatible" string.
2018-06-26 06:34:55 +00:00
thorpej
c61b43cf75 In of_enter_i2c_devs(), we no longer need to set a "size" property
for a couple of models of Atmel EEPROMs because the driver can figure
this out on its own now (based on the same "compatible" criteria that
we're using).
2018-06-26 06:24:52 +00:00
thorpej
7b7b75dcdf Encode the size information in the compat data. 2018-06-26 06:21:23 +00:00
msaitoh
e07fb63fca bpf_mtap*() after ieee80211_encap() should be bpf_mtap3() rather than
bpf_mtap(). bpf_mtap3() is for raw bpf.
2018-06-26 06:17:40 +00:00
msaitoh
53e375eb53 bpf_mtap*() before ieee80211_encap() should be bpf_mtap() rather than
bpf_mtap3(). bpf_mtap3() is for raw bpf and be used after ieee80211_encap().
2018-06-26 06:16:09 +00:00
thorpej
feee3a19f4 In my quest to make device_compatible_entry (and associated goo)
super-general, it turns out I also made it a little to cumbersome
to use (if my tired fingers are any indication).  So, this is a
course-correction -- one string per entry (like of_compat_data,
which it will soon replace), and remove the over-verbose macros.
2018-06-26 06:03:57 +00:00
thorpej
408f5aa571 Change device_compatible_match() and iic_compatible_match() to return
the weighted match value and take an optional compatible-entry pointer,
rather than the other way around.
2018-06-26 04:32:35 +00:00
kamil
53b1355eec Document sanitizers in acronyms.comp
Added: ASan, CFI, DFSan, ESan, HWASan, LSan, MSan, TSan, UBSan.
2018-06-26 00:06:08 +00:00
sevan
453f52add6 Add HVDS, LVDS, RDRAM 2018-06-25 19:56:54 +00:00
kamil
eb8a7705cd Avoid UB in tmux/window_copy_add_formats()
Do not perform NULL pointer arithmetics.

Reported with MKSANITIZER/UBSan.

The patch proposed by upstream https://github.com/tmux/tmux/issues/1382
2018-06-25 18:41:25 +00:00
kamil
54b8bd3463 Include <stddef.h> for offsetof(3) 2018-06-25 18:36:36 +00:00
kamil
2ca8c8d72f Specify SANITIZER_RENAME_SYMBOL in chpass
Rename local versions of getpwent getpwnam getpwnam_r getpwuid getpwuid_r
(all of the symbols are namespaced) in order to remove symbol clash with
libc.

This program uses code directly from libc.
2018-06-25 18:05:25 +00:00
kamil
ee01cd1e81 Specify SANITIZER_RENAME_SYMBOL in cvs
Rename local versions of regcomp regerror regexec regfree in order to
remove symbol clash with libc.
2018-06-25 18:03:56 +00:00
kamil
45d1d00b99 Specify SANITIZER_RENAME_SYMBOL in grep
Rename local versions of regcomp regerror regexec regfree in order to
remove symbol clash with libc.
2018-06-25 18:02:49 +00:00
kamil
f1e4bfafe7 Specify SANITIZER_RENAME_SYMBOL in diffutils
Rename local versions of regcomp regerror regexec regfree in order to
remove symbol clash with libc.
2018-06-25 18:01:13 +00:00
kamil
17b10cd3f4 Specify SANITIZER_RENAME_SYMBOL in nvi
Rename local versions of regcomp regerror regexec regfree in order to
remove symbol clash with libc.
2018-06-25 18:00:34 +00:00
kamil
eb682ff828 Add a framework for renaming symbols in libc&co for MKSANITIZER
A new keyword SANITIZER_RENAME_SYMBOL. It's a variable that has specified
a list of symbols to be renamed in a processor in order to remove naming
conflicts with public symbols in libc/m/pthread/rt.

This renaming will occur for libraries and programs.
A symbol with a conflicting 'name', will be renamed to '__mksanitizer_name'.

Based on an idea by <christos>
2018-06-25 17:58:36 +00:00
kamil
626dd188a2 Avoid unportable offsetof(3) calculation in nvi in log1.c
Detected with MKSANITIZER/UBSan.
2018-06-25 17:42:34 +00:00
christos
fd98358317 Don't require any arguments as the usage indicates; simplifies the code
and the documentation: now "jot" works like "jot -" used to (and continues
to). From Ingo Schwarze
2018-06-25 14:29:17 +00:00
msaitoh
3d3638f672 KNF & fix typo. No functional change. 2018-06-25 13:28:12 +00:00
martin
67f3e0d165 Do not put debug.tgz and xdebug.tgz onto install CDs (a lot of them
grow out of bounds and for some architectures can not turn into DVDs).
2018-06-25 12:18:22 +00:00
wiz
1045729af3 Remove superfluous Pp. 2018-06-25 10:53:47 +00:00
msaitoh
313477deff Simplify bpf_mtap() call. No functional change. 2018-06-25 09:57:25 +00:00
kamil
ef7aae126a Rephrase the documentation of MKSANITIZER
Based on the feedback from <f8l> and <pgoyette>.
2018-06-25 09:38:46 +00:00
msaitoh
483517e3bb Move txintr_setup() stuff from lmc_interrupt() and do it in ifnet_start().
Now we can use bpf_mtap() in the TX path. Not tested.
2018-06-25 09:32:28 +00:00
msaitoh
351461b019 Remove duplicated inclusion of net/bpf.h. 2018-06-25 04:59:42 +00:00
msaitoh
3f65f475e9 Bump version to 8.99.20 (removal of bpf_tap()). 2018-06-25 03:23:55 +00:00
msaitoh
c6a4b11da8 Removal of bpf_tap(). 2018-06-25 03:22:14 +00:00
dholland
bc382992a0 Describe what this actually does. Bump date. 2018-06-25 01:21:21 +00:00
christos
f0907ab569 Fix the rest of the functions that have been made visible by xopen5,
posix 2017, and c99.
2018-06-24 23:55:29 +00:00
christos
9dd3d50e00 PR/53393: coypu: move rint to the right section. 2018-06-24 22:07:46 +00:00
kamil
7d11bff33f Enhance the documentation of MKSANITIZER in bsd.README
Note that the list of sanitizer features is just a selection, not a
complete list. Include there LSan and Scudo. Missing: hwmsan, esan,
ubsan_minimal etc.

Explain that USE_SANITIZER is an argument passed to -fsanitize= and it can
contain multiple options.

Mention SANITIZERFLAGS to pass even more sanitizer arguments.

Stop tracking in this file what compiler compiles what features. Just note
that the selection of supported features depends on a compiler version and
target CPU architecture.
2018-06-24 20:40:58 +00:00
jdolecek
8c3f655828 mark with XXXSMP all remaining spl*() and tsleep() calls 2018-06-24 20:28:57 +00:00
jdolecek
555482fa99 similar treatment as xennetback_xenbus.c:
- protect instance list with mutex
- mark more local variables static
- mark with XXXSMP what looks suspicious
- in pciback.c use kmem_zalloc() et.al to allocate the device structures
2018-06-24 20:15:00 +00:00
jdolecek
464130e376 fix panic of DOM0 in xennetback_xenbus_destroy() on xl destroy of
DOMU with created, but non CONNECTED xennet (such as when DOMU
panics during boot); only try to disestablish the intr if it was
actually setup

while here protect xnetback_instances with mutex, and switch to use
kmem_zalloc() + KM_SLEEP / kmem_free() like xbdback_xenbus.c; add XXXSMP
to the other global variables, and at least mark them static
2018-06-24 19:53:50 +00:00
christos
fe2acef404 Revert previous, fix iteration loops to be consistent:
All sets that have an id >= SET_LAST have NULL name, so use that like the
loop just below.
2018-06-24 19:53:35 +00:00
sevan
9e7e3cac9b typo 2018-06-24 19:48:46 +00:00
sevan
421010cd47 Add GDI, NeWS, PRAM, PS, RIP, WDM, WDDM 2018-06-24 19:47:20 +00:00
kamil
07c0d23991 Reset SANITIZERFLAGS when specified NOSANITIZER / MKSANITIZER=no
This allows passing additional sanitizer specifig flags from the ./build.sh
level, like: -V SANITIZERFLAGS="-fsanitize-memory-track-origins" for MSan.
2018-06-24 19:35:12 +00:00
kamil
ff37330f94 Fix typo in previous
The -Wno-format-extra-args argument to Clang/LLVM needs trailing 's'.

Noted by <joerg>
2018-06-24 19:27:26 +00:00
ryo
255e8f796a fixed a case of gtmr_cntvct_stable_read() is returning the same value as before. 2018-06-24 19:04:30 +00:00
maxv
2bb1a63369 Sync the ld scripts:
* Force a PAGE_SIZE alignment of .bss on i386. Normally that's not
   required since the bootloader ensures page alignment, but let's be
   safe. Same on Xen-i386.

 * Fill the .text section padding with int3 instructions on Xen kernels,
   to prevent FALLTHROUGHs if a pointer goes crazy, same as native.
2018-06-24 18:24:53 +00:00
jdolecek
6127cb3089 follow change in rev. 1.22 of kern.ldscript and apply same fix for xen
ldscript too, but using just regular PAGE_ALIGN alignment:

"""
Fix a pretty dumb mistake I made in r1.22: the alignment needs to be in the
bss, otherwise the bootloader will use memory before __kernel_end and give
a wrong start pa to the kernel.
"""

this got broke by amd64/locore.S rev. 1.141 which removed an unused variable
which forced the alignment

this fixes ps/bt in ddb to be able to find symbols and hence PR port-xen/53056
2018-06-24 17:11:57 +00:00
christos
9c2395c2ef Since now we are called from cleanup_exit() make sure that we have a state
to work with. Found by ASAN.
2018-06-24 15:36:31 +00:00
jdolecek
f216ec15d7 add support for kern.intr.list aka intrctl(8) 'list' for xen
event_set_handler() and pirq_establish() now have extra intrname
parameter; shared intr_create_intrid() is used to provide the value

xen drivers were changed to pass the specific driver instance
name as the xname, e.g.  'vcpu0 clock' instead just 'clock', or
'xencons0' instead of 'xencons'

associated evcnt is now changed to use intrname - this matches native x86
2018-06-24 13:35:32 +00:00
mrg
240adcf578 fix the previous. the code was right, just badly formatted before.
should fix infinite loops reported in some cases.
2018-06-24 12:55:36 +00:00
jdolecek
dd26fc5ed7 use isa_intr_establish_xname() so this passes the device name 2018-06-24 12:25:33 +00:00
kamil
e111561b93 Prevent signed integer left shift UB in FD_SET(), FD_CLR(), FD_ISSET()
Set the type of shifted integer 1 to unsigned int.

Detected with MKSANITIZER/UBSan in sysinst(8).
2018-06-24 12:05:40 +00:00
jdolecek
081e12698b provide pci_intr_establish_xname() on x86 independantly from MSI,
so it's available on XEN too; change also the stub to use weak
symbol instead #ifdef
2018-06-24 11:51:15 +00:00