Commit Graph

8910 Commits

Author SHA1 Message Date
christos
facc5599b7 Add libcbor 2020-03-03 00:36:29 +00:00
christos
946da905e8 Add build glue 2020-03-03 00:36:18 +00:00
christos
5dd36a3bc8 Import libcbor from: https://github.com/PJK/libcbor.git 2020-03-03 00:34:28 +00:00
christos
4e9fe299d1 Add libfido2 and pam-u2f 2020-03-03 00:29:41 +00:00
christos
0dd853b540 Add build glue 2020-03-03 00:28:50 +00:00
christos
eaea677c03 Add cast 2020-03-03 00:27:31 +00:00
christos
4379517986 add casts, change to multiline. 2020-03-03 00:27:08 +00:00
christos
9f5cccf32d - fix order initialization: debug_file was not getting properly initialized
- fix free casts
- add pam module entry for OpenPAM
2020-03-03 00:22:29 +00:00
christos
bf007de0f4 back to LOG_DEBUG 2020-03-03 00:21:20 +00:00
christos
ee4f39b036 define as empty when not debugging. 2020-03-03 00:20:45 +00:00
christos
9b07d16d3c define as empty when not debugging 2020-03-03 00:20:20 +00:00
christos
46988a0ecd Import Yubico's pam-u2f from https://github.com/Yubico/pam-u2f.git 2020-03-03 00:18:44 +00:00
christos
95f430ca15 Add build glue 2020-03-03 00:14:17 +00:00
christos
ba9bdd8b2f Import Yubico's libfido2 from https://github.com/Yubico/libfido2.git 2020-03-03 00:11:43 +00:00
riastradh
ffcf681ee3 New ioctl DIOCGSECTORALIGN returns sector alignment parameters.
struct disk_sectoralign {
	/* First aligned sector number.  */
	uint32_t dsa_firstaligned;

	/* Number of sectors per aligned unit.  */
	uint32_t dsa_alignment;
};

- Teach wd(4) to get it from ATA.
- Teach cgd(4) to pass it through from the underlying disk.
- Teach dk(4) to pass it through with adjustments.
- Teach zpool (zfs) to take advantage of it.
  => XXX zpool doesn't seem to understand when the vdev's starting
     sector is misaligned.

Missing:

- ccd(4) and raidframe(4) support -- these should support _using_
  DIOCGSECTORALIGN to decide where to start putting ccd or raid
  stripes on disk, and these should perhaps _implement_
  DIOCGSECTORALIGN by reporting the stripe/interleave factor.

- sd(4) support -- I don't know any obvious way to get it from SCSI,
  but if any SCSI wizards know better than I, please feel free to
  teach sd(4) about it!

- any ld(4) attachments -- might be worth teaching the ld drivers for
  nvme and various raid controllers to get the aligned sector size

There's some duplicate logic here for now.  I'm doing it this way,
rather than gathering the logic into a new disklabel_sectoralign
function or something, so that this change is limited to adding a new
ioctl, without any new kernel symbols, in order to make it easy to
pull up to netbsd-9 without worrying about the module ABI.
2020-03-02 16:01:56 +00:00
kamil
ce57424237 Fix undefined behavior in misaligned pointer usage
Detected by UBSan and already fixed upstream.

Cherry-pick:
From aa0218d6a12814fac50b287214f9f3b0b99e11b1 Mon Sep 17 00:00:00 2001
From: Brian Behlendorf <behlendorf1@llnl.gov>
Date: Tue, 7 Jan 2014 23:24:37 +0100
Subject: [PATCH] Fix nvlist 'Bus Error' for Sparc

The mis-aligned memory accesses in nvpair_native_embedded() and
nvpair_native_embedded_array() will cause a 'Bus Error' for
architectures such as Sparc which not fully byte addressible.
To avoid this issue care is taken to avoid dereferencing the
potentially mis-aligned packed nvlist_t.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ned Bass <bass6@llnl.gov>
Signed-off-by: marku89 <mar42@kola.li>
Issue #1700
2020-03-02 15:45:33 +00:00
mlelstv
8b765a5da5 Use utility functions to handle disk geometry. 2020-02-29 17:15:43 +00:00
mlelstv
5568ea814a Fix disk geometry calculation. Add DIOCGPARTINFO to support
getdisksize() used by other drivers, filesystems and specfs.
2020-02-29 17:03:33 +00:00
riastradh
55a1499437 Teach zfs bdevsw to do b_psize.
This is needed, among other things, to swap on zvols.

Attempting to swap on zvols currently deadlocks but that's a separate
issue that needs to be fixed too!
2020-02-28 03:52:26 +00:00
kamil
f842698d50 Fix undefined behavior in archive_read_support_format_xar()
Cherry-pick upstream patch:

From 2cfda000bc5159d46fd8ead7d1bd3ea1f66f7948 Mon Sep 17 00:00:00 2001
From: Martin Matuska <martin@matuska.org>
Date: Thu, 27 Feb 2020 01:54:19 +0100
Subject: [PATCH] XAR reader: initialize file_queue with 0 and memcpy() if
 allocated only

Fixes #1338
2020-02-27 10:35:08 +00:00
kamil
c8a71bc155 Fix undefined behavior in from_hex()
Cherry-pick upstream patch:

From 4a5fc0b980a23d1a317c7a564a94cca090e111c2 Mon Sep 17 00:00:00 2001
From: Martin Matuska <martin@matuska.org>
Date: Thu, 27 Feb 2020 10:42:27 +0100
Subject: [PATCH] bsdcpio_test: from_hex() needs to be an uint32_t

Fixes #1339

4a5fc0b980
2020-02-27 10:32:35 +00:00
kamil
3dbf747214 Avoid NULL pointer arithmetic
Cherry-pick upstream patch:

From ec5b86b48e99c5501374b01606f1ccdae6a8a93e Mon Sep 17 00:00:00 2001
From: Kamil Rytarowski <n54@gmx.com>
Date: Mon, 24 Feb 2020 22:58:00 +0100
Subject: [PATCH] archive_read.c: silence UBSan warning about undefined
 behavior

Fixes #1335

ec5b86b48e.patch
2020-02-25 09:01:25 +00:00
kamil
a8e08e9489 Use UNALIGNED_OK to disable unaligned pointer arithmetic checks in UBSan
Upstream fixed it differently by refactoring the code and the problem will
go away on upgrade to 5.0.
2020-02-24 18:39:47 +00:00
kamil
d8be380674 Rearrange the code to make UNALIGNED_OK available for __NetBSD__ 2020-02-24 16:19:35 +00:00
ad
d2a0ebb67a UVM locking changes, proposed on tech-kern:
- Change the lock on uvm_object, vm_amap and vm_anon to be a RW lock.
- Break v_interlock and vmobjlock apart.  v_interlock remains a mutex.
- Do partial PV list locking in the x86 pmap.  Others to follow later.
2020-02-23 15:46:38 +00:00
mrg
ca82237625 updates for xkeyboard-config 2.29. 2020-02-23 11:17:03 +00:00
mrg
492a651915 fix libXfont2 build, and (for now) remove new XvMCW pkg-config file. 2020-02-23 09:24:12 +00:00
mrg
6d597ebfc7 find the moved header. 2020-02-23 09:14:05 +00:00
mrg
1258266dea updates for xorgproto 2019.2, libX11 1.6.9, and libXvMC 1.0.12. 2020-02-23 09:10:50 +00:00
riastradh
b58d4067a2 Teach device nodes on zfs to handle fsync by calling spec_fsync too. 2020-02-23 06:15:27 +00:00
riastradh
5b7c5828ba Teach zfs spec nodes to VOP_BWRITE too.
Fixes hang on writing to, e.g., ffs mounted on a device node that
lives on zfs.

XXX pullup
2020-02-23 05:50:25 +00:00
joerg
723199159f Use C++ syntax for defining types, not C one. 2020-02-23 02:06:01 +00:00
joerg
984afdcb42 Don't hard-code LLVM version, extract it from external/apache2/llvm. 2020-02-23 02:03:19 +00:00
joerg
82bb6bcdda Doesn't need or use HAVE_LLVM. 2020-02-23 02:02:32 +00:00
joerg
953536060d Fix harmless syntax error. 2020-02-23 02:01:17 +00:00
joerg
ce578dfc2b Explicitly cast pointers to uintptr_t before casting to enums. They are
not necessarily the same size. Don't cast pointers to bool, check for
NULL instead.
2020-02-21 00:26:21 +00:00
christos
e9bf148a44 Fix failing unittests (by restoring old changes). 2020-02-20 19:59:12 +00:00
riastradh
3c37c6c9c5 Mark previous #ifdef __NetBSD__, per request from hannken. 2020-02-19 17:05:06 +00:00
riastradh
69aded6dbf Report the OS name and release appropriately for NetBSD.
We are not OpenSolaris or uts!
2020-02-19 16:11:19 +00:00
joerg
8beab7f7a8 Revert last. It was objected to pre-commit, there is no actual error
analysis or report and there is existing logic supposed to handle this.
2020-02-19 13:32:40 +00:00
kamil
88fd427e3b Disable HAVE_TERMINFO and HAVE_TERMIOS_H for ./build.sh tools build
These headers enable optional features and are not portable to all host
Operating Systems.

Speculative fix for certain Linux distributions.
2020-02-19 09:59:39 +00:00
riastradh
18954d9723 Define VOP_STRATEGY on zfs device nodes too.
Fixes eternal hangs in attempts to do I/O on device nodes on zfs.

XXX pullup
2020-02-19 05:52:52 +00:00
christos
ebfc71ebe2 regen 2020-02-18 21:29:39 +00:00
christos
b0222858ea use the correct header name. 2020-02-18 21:29:30 +00:00
christos
cdabad706d merge conflicts 2020-02-18 21:12:21 +00:00
christos
6f2cbaf607 Last import was 2010 when there was no ChangeLog yet. I've worked
with upstream to merge all our changes and this includes many other
fixes including new operator support etc. The change to pass an
extra "isnew" argument to open was not preserved as none of the
tests supplied with the PR fail.

This also adds the testsuite and all the bugs fixed since then.
2020-02-18 20:50:46 +00:00
uwe
95f8d17abf Fix comments to not break formatting. 2020-02-16 22:38:28 +00:00
gutteridge
e5791ef575 tcpdump.1.in: fix stray line from merge botch 2020-02-16 22:20:31 +00:00
roy
0495ebef35 zpool: The NetBSD specific ioctl needs to include sys/ioctl.h 2020-02-16 14:06:10 +00:00
riastradh
defa864ee7 Teach zfs to revoke vnodes the usual way.
XXX pullup
2020-02-15 19:03:15 +00:00