Commit Graph

271027 Commits

Author SHA1 Message Date
ozaki-r
367904e3e7 Validate ip6_temp_preferred_lifetime (net.inet6.ip6.temppltime) on a change
ip6_temp_preferred_lifetime is used to calculate an interval period to
regenerate temporary addresse by
  TEMP_PREFERRED_LIFETIME - REGEN_ADVANCE - DESYNC_FACTOR
as per RFC 3041 3.5.  So it must be greater than (REGEN_ADVANCE +
DESYNC_FACTOR), otherwise it will be negative and go wrong, for example
KASSERT(to_ticks >= 0) in callout_schedule_locked fails.
2019-10-16 07:41:28 +00:00
ozaki-r
e32ddc921e Reorganize in6_tmpaddrtimer stuffs
- Move the related functions to where in6_tmpaddrtimer_ch exists
- Hide global variable in6_tmpaddrtimer_ch
- Rename ip6_init2 to in6_tmpaddrtimer_init
- Reduce callers of callout_reset
- Use callout_schedule
2019-10-16 07:40:40 +00:00
mrg
bf3ec4633d use GCC_NO_STRINGOP_OVERFLOW for charray.c.
this only affects some platforms.
2019-10-16 07:39:18 +00:00
mrg
4c9e8c010a regen arm ports for config.gcc fix. 2019-10-16 07:38:02 +00:00
mrg
c1069780e3 make sure to include bpabi.h before arm.h. 2019-10-16 07:35:14 +00:00
mrg
55a26eb0f8 copy arm-cpu.h and arm-isa.h for arm platforms. 2019-10-16 06:57:24 +00:00
knakahara
13a5b9a698 Fix missing kpreempt_disable() before softint_schedule() like if_vmx.c:r1.51. 2019-10-16 06:53:34 +00:00
knakahara
401e1ddf1b Fix missing kpreempt_disable() before softint_schedule() like if_vmx.c:r1.51. 2019-10-16 06:36:00 +00:00
msaitoh
10d0273d63 Apply FreeBSD r353599:
> ixgbe: Disable EEE for backplane X550EM_X
 >
 > From Zach:
 > Intel documentation indicates that backplane X550EM_X KR devices do not
 > support Energy Efficient Ethernet. Prior to this patch, X552 devices
 > (device ID 0x15AB) will crash the system when transitioning EEE state
 > via sysctl.
 >
 > Signed-off-by: Zach Vargas <zvargas@xes-inc.com>
 >
 > PR:		240320
 > Submitted by:	Zach Vargas <zvargas@xes-inc.com>
 > Reviewed by:	erj@
 > MFC after:	3 days
 > Differential Revision:	https://reviews.freebsd.org/D21673
2019-10-16 04:07:42 +00:00
msaitoh
52ca9fac7f Use unsigned to avoid undefined behavior. Found by kUBSan. 2019-10-16 01:44:48 +00:00
christos
7b9c8da681 remove conditional portion that was wrong and always false. 2019-10-15 19:29:58 +00:00
msaitoh
5e6beb46a1 Don't pass null pointer as argument 2 of memcpy(). Same as Linux.
Found by kUBSan.
2019-10-15 18:50:44 +00:00
christos
075f50f56a Add a function cast for enosys 2019-10-15 18:36:38 +00:00
christos
43453200ca sup was removed. RIP. 2019-10-15 18:35:29 +00:00
christos
1e0c7fc18e remove sup 2019-10-15 18:33:23 +00:00
christos
66434e381d remove sup examples 2019-10-15 18:32:59 +00:00
christos
3a70c5972e bump sizes 2019-10-15 18:29:32 +00:00
christos
384c9fdd8d use strncpy... 2019-10-15 18:29:21 +00:00
msaitoh
e86a0551d8 Use unsigned to avoid undefined behavior. Found by kUBSan. 2019-10-15 18:20:44 +00:00
bad
3033929fb4 flush the dcache in cpu_enable_psci() before calling psci_cpu_on().
fixes the kernel hanging with multiple "mpstart" on (at least) NanoPi R1.

OK jmcneill@, skrll@

XXX pullup-9
2019-10-15 17:25:02 +00:00
tnn
34d38eb08e correct pointer arithmetics 2019-10-15 17:19:05 +00:00
msaitoh
67443f1cda Use unsigned to avoid undefined behavior in agpattach(). Found by kUBSan. 2019-10-15 16:59:15 +00:00
tnn
3c96a2be23 awge: fix issue that caused rx packets to be corrupt with DIAGNOSTIC kernel
It seems the hardware can only reliably do rx DMA to addresses that are
dcache size aligned. This is hinted at by some GMAC data sheets but hard to
find an authoritative source.

on non-DIAGNOSTIC kernels we always implicitly get MCLBYTES-aligned mbuf
data pointers, but with the reintroduction of POOL_REDZONE for DIAGNOSTIC
we can get 8-byte alignment due to redzone padding. So align rx pointers to
64 bytes which should be good for both arm32 and aarch64.

While here change some bus_dmamap_load() to bus_dmamap_load_mbuf() and add
one missing bus_dmamap_sync(). Also fixes the code to not assume that
MCLBYTES == AWGE_MAX_PACKET. User may override MCLSHIFT in kernel config.
2019-10-15 16:30:49 +00:00
christos
c6fcfb947a new acpica 2019-10-15 16:17:43 +00:00
christos
5deb22f351 add new grammar file 2019-10-15 16:14:49 +00:00
christos
7ab6b89bcc merge conflicts 2019-10-15 16:13:39 +00:00
christos
783af925ce ----------------------------------------
16 August 2019. Summary of changes for version 20190816:

This release is available at https://acpica.org/downloads


1) ACPICA kernel-resident subsystem:

Modified the OwnerId mechanism to allow for more Owner Ids. The previous
limit was 256 Ids, now it is 4096 Ids. This prevents OWNER_ID_LIMIT
exceptions on machines with a large number of initialization threads,
many CPU cores and nested initialization control methods.

Introduced acpi_dispatch_gpe() as a wrapper around AcpiEvDetectGpe() for
checking if the given GPE (as represented by a GPE device handle and a
GPE number) is currently active and dispatching it (if that's the case)
outside of interrupt context.

Table load: exit the interpreter before initializing objects within the
new table This prevents re-acquiring the interpreter lock when loading
tables

Added the "Windows 2019" string to the _OSI support (version 1903). Jung-
uk Kim

Macros: removed pointer math on a null pointer. Causes warnings on some
compilers and/or tools. Changed ACPI_TO_POINTER to use ACPI_CAST_PTR
instead of using arithmetic.

Fully deployed the ACPI_PRINTF_LIKE macro. This macro was not being used
across all "printf-like" internal functions. Also, cleanup all calls to
such functions (both in 32-bit mode and 64-bit mode) now that they are
analyzed by the gcc compiler via ACPI_PRINTF_LIKE.


2) iASL Compiler/Disassembler and ACPICA tools:

iASL: implemented a new data table compiler flex/bison front-end. This
change is internal and is not intended to result in changes to the
compiled code. This new compiler front-end can be invoked using the -tp
option for now, until the old mechanism is removed.

ASLTS: Implemented a new data table compiler test suite. This test suite
generates all table templates and compile/disassemble/re-compile/binary-
compare each file.

iASL: return -1 if AML files were not generated due to compiler errors

iASL: added a warning on use of the now-legacy ASL Processor () keyword.

iASL: added an error on _UID object declaration that returns a String
within a Processor () declaration. A _UID for a processor must be an
Integer.

iASL: added a null terminator to name strings that consist only of
multiple parent prefixes (^)

iASL: added support to compile both ASL and data table files in a single
command.

Updated the tool generation project files that were recently migrated to
MSVC 2017 to eliminate all new warnings. The new project files appear in
the directory \acpica\generate\msvc2017. This change effectively
deprecates the older project files in \acpica\generate\msvc9.
2019-10-15 16:07:21 +00:00
msaitoh
2c782f89ca Move PCIe initiaization code from alc_attach() to alc_init_pcie().
No functional change.
2019-10-15 15:59:26 +00:00
christos
738f1cc2dc add %code bison extension (needed by acpica) 2019-10-15 15:58:46 +00:00
msaitoh
7a13ef071a Apply FreeBSD r218141:
> alc_rev was used without initialization such that it failed to
 > apply AR8152 v1.0 specific initialization code. Fix this bug by
 > explicitly reading PCI device revision id via PCI accessor.
 >
 > Reported by:	Gabriel Linder ( linder.gabriel <> gmail dot com )
2019-10-15 15:56:26 +00:00
christos
0c7a7c13c0 Allow individual lex and yacc sources to override/extend LFLAGS and YFLAGS
respectively.
2019-10-15 15:05:00 +00:00
kamil
29be9f8e91 Remove the short-circuit lwp_exit() path from sigswitch()
sigswitch() can be called from exit1() through:

   ttywait()->ttysleep()-> cv_timedwait_sig()->sleepq_block()->issignal()->sigswitch()

lwp_exit() called for the last LWP triggers exit1() and this causes a panic.

The debugger related signals have short-circuit demise paths in
eventswitch() and other functions, before calling sigswitch().

This change restores the original behavior, but there is an open question
whether the kernel crash is a red herring of misbehavior of ttywait().

This should fix PR kern/54618 by David H. Gutteridge
2019-10-15 13:59:57 +00:00
jmcneill
cf3fce5272 Amazon Graviton maxdevs quirk no longer required as of pci.c r1.155 2019-10-15 13:27:50 +00:00
jmcneill
b19ff0b635 PCIe downstream ports only have a single child device, so limit probing to
dev 0.
2019-10-15 13:27:11 +00:00
ryoon
34216fb6c3 Add Apple adapter, A1433 2019-10-15 13:21:19 +00:00
hannken
e59a8eaee2 Add missing "#ifdef _KERNEL" to fix the build of userland zfs libraries. 2019-10-15 06:58:12 +00:00
uki
dd7dd1d4bb Give syspkg's names to xcomp mi files until extensions. 2019-10-15 04:25:44 +00:00
jmcneill
358269bbb2 Fix detection of root port resources for Graviton and remove no longer required bridge fixup 2019-10-15 00:23:44 +00:00
chs
0a827a3f50 convert more KM_NOSLEEP to KM_SLEEP and remove code to handle failures. 2019-10-15 00:13:52 +00:00
jmcneill
4d4886ed94 More Amazon Graviton quirks:
- Ignore devno > 0 on the PCIe root port.
 - Fixup PCIe bridge bus number register on the root port.
 - Move quirk handling to acpipchb so it can be applied before the bus
   is configured.
2019-10-14 22:59:15 +00:00
jmcneill
9f29b8abb6 Remove the A72 errata #859971 detection, it causes an illegal instruction on AWS A1 (virtualized) 2019-10-14 22:53:05 +00:00
sevan
c8c96838bd Add Ted Nelson's birthday 2019-10-14 17:30:17 +00:00
maxv
a1bd50f5a7 Error out if the type is beyond the storage size. No functional change,
since the shift would otherwise 'and' against zero, returning EEXIST.

Reported-by: syzbot+cb68ccdc1ef3aca2d679@syzkaller.appspotmail.com
2019-10-14 16:43:04 +00:00
maxv
7b43da9e77 Add a check before the memcpy. memcpy is defined to never take NULL as
second argument, and the compiler is free to perform optimizations knowing
that this argument is never NULL.

In this particular case, it was harmless. But still good to fix.

Reported-by: syzbot+6f504255accb795eb6b7@syzkaller.appspotmail.com
2019-10-14 16:27:03 +00:00
jhigh
ab00eaeb2d added test cases
invalid version specification
	salt too short
2019-10-14 14:48:48 +00:00
jhigh
b640afc213 added versioning tests for argon2 2019-10-14 14:37:31 +00:00
christos
d08d589de9 remove masking and cast (requested by kre@) 2019-10-14 13:34:14 +00:00
hannken
239a7f3a3b Change dmu_diff() back to use a "file" instead of a "vnode".
Command "zfs diff" calls it with a pipe, not a plain file.

Fixes PR kern/54541: kernel panic using "zfs diff"
2019-10-14 13:18:00 +00:00
jmcneill
97755cb245 Add support for Amazon's Graviton MSI controller.
Graviton has a GICv3 with a modified GICv2m (!) for MSIs. Instead of
sending messages to a fixed address with the SPI as data, the Graviton's
GICv2m uses a different address for each vector with "don't care" as data.
2019-10-14 11:00:13 +00:00
maxv
fabc9bf218 Improve nvmm_vcpu_dump(). 2019-10-14 10:43:40 +00:00