Commit Graph

269843 Commits

Author SHA1 Message Date
Baptiste Daroussin
6d38604fc5 mandoc: import version 1.14.6
MFC after: 3 weeks
2021-11-15 16:58:58 +01:00
Baptiste Daroussin
e9bf778aef mandoc: import v1.14.6 2021-11-15 16:35:39 +01:00
Greg V
9e9c651cac cddl: fix missing ZFS library dependencies
In 9fae47666 zfsd got a libspl dependency to avoid undefined references.
However that workaround did not help external consumers of libzfs_core.

Fix all missing dependencies lld 13 and the rtld complain about.

Reviewed by:	freqlabs, markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D32521
2021-11-15 09:42:07 -05:00
Peter Holm
fb41143324 Added a new unionfs test scenario. Removed a few old unionfs tests from
the exclude list
2021-11-15 10:40:51 +01:00
Kirk McKusick
b366ee4868 Consolodate four copies of the STDSB define into a single place.
The STDSB macro is passed to the ffs_sbget() routine to fetch a
UFS/FFS superblock "from the stadard place". It was identically defined
in lib/libufs/libufs.h, stand/libsa/ufs.c, sys/ufs/ffs/ffs_extern.h,
and sys/ufs/ffs/ffs_subr.c. Delete it from these four files and
define it instead in sys/ufs/ffs/fs.h. All existing uses of this macro
already include sys/ufs/ffs/fs.h so no include changes need to be made.

No functional change intended.

Sponsored by: Netflix
2021-11-14 22:10:16 -08:00
Ka Ho Ng
f7523c8a19 iser: Remove redundant linuxkpi MODULE_DEPEND
Since ibcore depends on linuxkpi, there is no need to pull in the
linuxkpi dependency in iser.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Reviewed by:	trasz
Differential Revision:	https://reviews.freebsd.org/D32977
2021-11-15 14:04:08 +08:00
Jason A. Harmening
06f79675b7 unionfs: fix potential deadlock in VOP_RMDIR
VOP_RMDIR() is called with both parent and child directory vnodes
locked.  The relookup operation performed by the unionfs implementation
may relock both vnodes.  Accordingly, unionfs_relookup() drops the
parent vnode lock, but the child vnode lock is never dropped.
Although relookup() will very likely try to relock the child vnode
which is already locked, in most cases this doesn't produce a deadlock
because unionfs_lock() forces LK_CANRECURSE (!).  However, relocking
of the parent vnode while the child vnode remains locked effectively
reverses the expected parent->child lock order, which can produce
a deadlock e.g. in the presence of a concurrent unionfs_lookup()
operation.  Address the issue by dropping the child lock around
the unionfs_relookup() call in unionfs_rmdir().

Reported by:	pho
Reviewed by:	kib, markj
Differential Revision: https://reviews.freebsd.org/D32986
2021-11-14 20:07:42 -08:00
Konstantin Belousov
8660813153 start_init: use 'p'
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2021-11-15 02:33:01 +02:00
Konstantin Belousov
0864ab3d32 procstat auxv: print out FXRNG
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2021-11-15 02:32:00 +02:00
Rick Macklem
75c666197c nfsstat: Add output for counts of new RPCs to the "-E" option
Add output to the "-E" option for new RPCs related
to NFSv4.1/4.2. Also, add output of the counts for
allocated layouts and the title for the "Client"
section (which was lost during a previous commit).

MFC after:	2 weeks
2021-11-14 13:36:14 -08:00
Mateusz Guzik
84c048822e ipsec: make sure the lock allocated in key_newsav does not false-share
Reviewed by:	ae
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D32828
2021-11-14 20:17:35 +00:00
Mateusz Guzik
e469b16d0b ipsec: fix edge case detection in key_getnewspid
Same comparison problem as in key_do_getnewspi.

Reviewed by:	ae
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D32827
2021-11-14 20:17:34 +00:00
Mike Karels
2f35e7d9fa kernel: partially revert e9efb1125a15, default inet mask
When no mask is supplied to the ioctl adding an Internet interface
address, revert to using the historical class mask rather than a
single default.  Similarly for the NFS bootp code.

MFC after:	3 weeks
Reviewed by:	melifaro glebius
Differential Revision: https://reviews.freebsd.org/D32951
2021-11-14 14:12:25 -06:00
Emmanuel Vadot
6b96bb7395 modules: rockchip: Add a module for rk808 PMIC
Now that the drivers are split we need one for RK3399-based board.
2021-11-14 20:26:33 +01:00
Emmanuel Vadot
090cbc39a5 modules: rockchip: Fix rk805 modules after recent changes
We need more files now.
2021-11-14 20:26:33 +01:00
Emmanuel Vadot
91a908e051 pmic: rockchip: Rename the driver with _pmu as it was before 2021-11-14 20:26:33 +01:00
Mateusz Guzik
79554f2b6c net: whack "set but not used" warnings in net/rtsock.c
... except for one where the error is ignored.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-11-14 17:20:46 +00:00
Mateusz Guzik
c681cce925 net: whack "set but not used" warnings in net/pfil.c
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-11-14 17:19:58 +00:00
Mateusz Guzik
5a4e46f6ec net: whack "set but not used" warnings in net/if.c
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-11-14 17:15:08 +00:00
Mateusz Guzik
e9c7ec2287 aio: whack "set but not used" warnings 2021-11-14 16:59:53 +00:00
Mateusz Guzik
7e9680d3be cache: whack "set but not used" warnings 2021-11-14 16:57:43 +00:00
Kristof Provost
047c4e365d pf: renumber DIOCKEEPCOUNTERS
We accidentally had two ioctls use the same base number
(DIOCKEEPCOUNTERS and DIOCGIFSPEEDV{0,1}). We get away with that on most
platforms because the size of the argument structures is different.
This does break CHERI, and is generally a bad idea anyway.
Renumber to avoid this collision.

Reported by:	jhb
2021-11-14 15:36:59 +01:00
Emmanuel Vadot
4c0c353d0e loader: Add more bus name to pnpautoload
Add ofwbus, iicbus and spibus to pnpautoload so modules under those
buses will be loaded.
On my rockpro64 now :
OK pnpautoload -v
Autoloading modules for simplebus
Using DTB provided by EFI at 0x8100000.
Autoloading modules for ofwbus
/boot/kernel/rk_spi.ko text=0x14b2 text=0xd4c data=0x4d0+0x8 syms=[0x8+0xa98+0x8+0x807]
/boot/kernel/dwwdt.ko text=0x12e2 text=0x78c data=0x4c8+0x10 syms=[0x8+0x990+0x8+0x6e1]
Autoloading modules for iicbus
Autoloading modules for spibus
/boot/kernel/mx25l.ko text=0x1613 text=0x114c data=0x6e8+0x8 syms=[0x8+0xa08+0x8+0x665]
loading required module 'fdt_slicer'
/boot/kernel/fdt_slicer.ko text=0x95e text=0x340 data=0x290 syms=[0x8+0x6c0+0x8+0x4a0]
2021-11-14 15:41:30 +01:00
Emmanuel Vadot
d4874307fd loader: Fix pnpload and add some usage
pnpload needs a busname and a compat data.
2021-11-14 15:41:30 +01:00
Emmanuel Vadot
544af629a4 loader: Fix pnpmatch and add some usage
pnpmatch needs a busname and a compat data.
2021-11-14 15:41:30 +01:00
Michael Tuexen
2f62f92e37 tcp: Fix a locking issue related to logging
tcp_respond() is sometimes called with only a read lock.
The logging however, requires a write lock. So either
try to upgrade the lock if needed, or don't log the packet.

Reported by:		syzbot+8151ef969c170f76706b@syzkaller.appspotmail.com
Reported by:		syzbot+eb679adb3304c511c1e4@syzkaller.appspotmail.com
Reviewed by:		markj, rrs
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D32983
2021-11-14 15:04:27 +01:00
Emmanuel Vadot
c200441872 pmic: rockchip: Name the driver rk80{5,8}
And add the needed relationship with iicbus.
2021-11-14 13:48:10 +01:00
Ian Lepore
44aae623ab Add ETHER_ALIGN support to ng_device(4).
This adds a new ng_device command, NGM_DEVICE_ETHERALIGN, which has no
associated args.  After the command arrives, the device begins adjusting all
packets sent out its hook to have ETHER_ALIGN bytes of padding at the
beginning of the packet.  The ETHER_ALIGN padding is added only when
running on an architecture that requires strict alignment of IP headers
(based on the __NO_STRICT_ALIGNMENT macro, which is only #define'd on
x86 as of this writing).

This also adds ascii <-> binary command translation to ng_device, both for
the existing NGM_DEVICE_GET_DEVNAME and the new ETHERALIGN command.

This also gives a name to every ng_device node when it is constructed, using
the cdev device name (ngd0, ngd1, etc).  This makes it easier to address
command msgs to the device using ngctl(8).

Reviewed by:	donner, ray, adrian
Differential Revision:	https://reviews.freebsd.org/D32905
MFC after:   1 week
2021-11-14 13:37:41 +01:00
Emmanuel Vadot
98c60dc31f pmic: rockchip: Split the driver in rk805 and rk808
This make the base driver cleaner and the subclassed driver only have
related code.

Kernel config wise this is still only handled by rk805.

No functional changes intended.
2021-11-14 12:31:26 +01:00
Emmanuel Vadot
cb3c3e0a42 pmic: rockchip: Split the clocks part in its own file
No functional changes intended.
2021-11-14 12:31:23 +01:00
Emmanuel Vadot
ad651f176b pmic: rockchip: Split the regulators part in its own file
No functional changes intended.
2021-11-14 12:31:21 +01:00
Emmanuel Vadot
328077bb8f pmic: rockchip: Split the rtc part in its own file
Even if for now all the RTC-related register are at the same offset don't
use some hardcoded values for them but set them based on the PMIC type.

No functional changes intended.
2021-11-14 12:31:18 +01:00
Emmanuel Vadot
c9b101d241 pmic: rockchip: Rename most of rk805 driver to rk8xx
This is in preparation of correctly splitting the driver.

No functional changes intended.
2021-11-14 12:31:15 +01:00
Emmanuel Vadot
43301ad2b6 pmic: rockchip: Add dedicated file for rk808
While here rename registers for rk805 and rk808 based on the names
on the datasheet.

No functional changes intended.
2021-11-14 12:31:12 +01:00
Emmanuel Vadot
51919325ff arm64: rockchip: Move rk805 pmic driver to dev/iicbus/pmic/rockchip
Having all PMIC driver at the same place makes it easier.
2021-11-14 12:31:07 +01:00
Dimitry Andric
20aa359773 Bump __FreeBSD_version for llvm-project 13.0.0 merge
PR:		258209
MFC after:	2 weeks
2021-11-13 21:52:35 +01:00
Jessica Clarke
a2fa290024 mips: Fix build of kernel.tramp.bin after upstream merge
Since the upstream merge we end up with the compiler generating calls to
memcpy (and it appears upstream LLVM does too, so this will probably
also be a problem upstream when the LLVM 13 import is finished). Like
the kernel we should just compile this file with -ffreestanding to avoid
such surprises.

Note that elf_trampoline.c does actually provide a memcpy, but it's
static. That's a bit weird, and means by the time the memcpy calls are
generated by the compiler the explicit ones have already been inlined
and the function itself GC'ed, but since using -ffreestanding is the
right thing to do for this kind of code anyway, that doesn't actually
matter.

Obtained from:	https://github.com/CTSRD-CHERI/cheribsd/commit/219ddb6293c
2021-11-13 21:52:26 +01:00
Dimitry Andric
397a8ba053 Apply fix for LLVM PR51957 (Miscompilation in Botan's SHA3)
Merge commit e27a6db5298f from llvm git (by Jameson Nash):

  Bad SLPVectorization shufflevector replacement, resulting in write to wrong memory location

  We see that it might otherwise do:

    %10 = getelementptr {}**, <2 x {}***> %9, <2 x i32> <i32 10, i32 4>
    %11 = bitcast <2 x {}***> %10 to <2 x i64*>
  ...
    %27 = extractelement <2 x i64*> %11, i32 0
    %28 = bitcast i64* %27 to <2 x i64>*
    store <2 x i64> %22, <2 x i64>* %28, align 4, !tbaa !2

  Which is an out-of-bounds store (the extractelement got offset 10
  instead of offset 4 as intended). With the fix, we correctly generate
  extractelement for i32 1 and generate correct code.

  Differential Revision: https://reviews.llvm.org/D106613
2021-11-13 21:52:25 +01:00
Dimitry Andric
a18c6161ef Fix assertion when building devel/glog with new pass manager
Merge commit 029f1a534489 from llvm git (by Arthur Eubanks):

  [LazyCallGraph] Skip blockaddresses

  blockaddresses do not participate in the call graph since the only
  instructions that use them must all return to someplace within the
  current function. And passes cannot retrieve a function address from a
  blockaddress.

  This was suggested by efriedma in D58260.

  Fixes PR50881.

  Reviewed By: nickdesaulniers

  Differential Revision: https://reviews.llvm.org/D112178
2021-11-13 21:52:24 +01:00
Dimitry Andric
4e117af10c Fix "Bad machine code" when building world for mips or mips64
Merge commit f5755c0849a5 from llvm git (by Jessica Clarke):

  [Mips] Add glue between CopyFromReg, CopyToReg and RDHWR nodes for TLS

  The MIPS ABI requires the thread pointer be accessed via rdhwr $3, $r29.
  This is currently represented by (CopyToReg $3, (RDHWR $29)) followed by
  a (CopyFromReg $3). However, there is no glue between these, meaning
  scheduling can break those apart. In particular, PR51691 is a report
  where PseudoSELECT_I was moved to between the CopyToReg and CopyFromReg,
  and since its expansion uses branches, it split the def and use of the
  physical register between two basic blocks, resulting in the def being
  eliminated and the use having no def. It also seems possible that a
  similar situation could arise splitting up the CopyToReg from the RDHWR,
  causing the RDHWR to use a destination register other than $3, violating
  the ABI requirement.

  Thus, add glue between all three nodes to ensure they aren't split up
  during instruction selection. No regression test is added since any test
  would be implictly relying on specific scheduling behaviour, so whilst
  it might be testing that glue is preventing reordering today, changes to
  scheduling behaviour could result in the test no longer being able to
  catch a regression here, as the reordering might no longer happen for
  other unrelated reasons.

  Fixes PR51691.

  Reviewed By: atanasyan, dim

  Differential Revision: https://reviews.llvm.org/D111967
2021-11-13 21:52:24 +01:00
Dimitry Andric
39dadd0628 Stop clang 13 from defining conflicting macros on PowerPC
Merge commit c9539f957f57 from llvm git (by Nemanja Ivanovic):

  [PowerPC] Define XL-compatible macros only for AIX and Linux

  Since XLC only ever shipped on PowerPC AIX and Linux, it is not
  reasonable to provide the compatibility macros on any target other
  than those two. This patch restricts those macros to AIX/Linux.

  Differential revision: https://reviews.llvm.org/D110213

PR:		258209
2021-11-13 21:52:23 +01:00
Dimitry Andric
28a41182c0 Merge llvm-project 13.0.0 release
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13.0.0-0-gd7b669b3a303, aka 13.0.0 release.

PR:		258209
MFC after:	2 weeks
2021-11-13 21:49:29 +01:00
Dimitry Andric
8c6f6c0c80 Merge llvm-project release/13.x llvmorg-13.0.0-rc3-8-g08642a395f23
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13.0.0-rc3-8-g08642a395f23.

PR:		258209
MFC after:	2 weeks
2021-11-13 21:46:08 +01:00
Dimitry Andric
69ade1e033 Merge llvm-project release/13.x llvmorg-13.0.0-rc2-43-gf56129fe78d5
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13.0.0-rc2-43-gf56129fe78d5.

PR:		258209
MFC after:	2 weeks
2021-11-13 21:45:49 +01:00
Dimitry Andric
6e75b2fbf9 Merge llvm-project release/13.x llvmorg-13.0.0-rc1-97-g23ba3732246a
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13.0.0-rc1-97-g23ba3732246a.

PR:		258209
MFC after:	2 weeks
2021-11-13 21:42:03 +01:00
Dimitry Andric
fe6060f10f Merge llvm-project main llvmorg-13-init-16847-g88e66fa60ae5
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-13-init-16847-g88e66fa60ae5, the last commit before
the upstream release/13.x branch was created.

PR:		258209
MFC after:	2 weeks
2021-11-13 21:39:49 +01:00
Konstantin Belousov
b61bce17f3 rtld dump_auxv: be pedantic and distiguish between auxv union members based on format
Reviewed by:	jrtc27
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2021-11-13 22:13:10 +02:00
Konstantin Belousov
3a902ef253 rtld dump_auxv: consistently use long modifier for non-pointer auxv vals
Reviewed by:	jrtc27
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2021-11-13 22:12:33 +02:00
Konstantin Belousov
64ba1f4cf3 rtld: Implement LD_SHOW_AUXV
It dumps auxv as seen by interpreter, right before starting any user
code.

Copied from:	glibc
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2021-11-13 19:33:13 +02:00
Konstantin Belousov
77c088ab21 rtld: add rtld_fdprintfx()
It is same as rtld_fdprintf() without enforcement of the format string
to be a literal.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2021-11-13 19:33:13 +02:00