Commit Graph

5181 Commits

Author SHA1 Message Date
Ed Maste
2e85df652c Add libcbor to the build
From https://github.com/PJK/libcbor:

    libcbor is a C library for parsing and generating CBOR, the general-
    purpose schema-less binary data format.

libcbor will be used by ssh to support FIDO/U2F keys.  It is currently
intended only for use by ssh, and so is installed as a PRIVATELIB and is
placed in the ssh pkgbase package.

cbor_export.h and configuration.h were generated by the upstream CMake
build.  We could create them with bmake rules instead (as NetBSD has
done) but this is a fine start.

This is currently disabled for the 32-bit library build as libfido2 is
not compatible with the COMPAT_32BIT hack in usb_ioctl.h, and there is
no need for libcbor without libfido2.

Reviewed by:	kevans
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32347
2021-10-15 15:10:24 -04:00
Cameron Katri
1b85b68da0 llvm-readobj: Attach to buildsystem
Also install it as readelf when MK_LLVM_BINUTILS is set.

Reviewed By:	dim, arichardson
Differential Revision: https://reviews.freebsd.org/D32058
2021-10-14 17:18:05 +01:00
Peter Holm
fc22fe5c74 stress2: Use two memory disks for this test 2021-10-12 06:45:19 +00:00
Alex Richardson
a89410ef91 cross-build: fix some redeclaration warnings during bootstrap
MFC after:	3 days
2021-10-11 11:57:54 +01:00
Alex Richardson
88c027338f Update OptionalObsoleteFiles.inc after 021385aba5
I forgot to update this file so make delete-old would incorrectly remove
the newly-installed LLVM binutils. While touching the file also update
for 8e1c989abb since ObsoleteFiles.inc now inludes the tablegen binaries.

Reported by:	Herbert J. Skuhra <herbert@gojira.at>
Reviewed By:	emaste, imp

Differential Revision: https://reviews.freebsd.org/D32022
2021-10-11 11:46:31 +01:00
Warner Losh
880aec7361 cross-build: Remove redundant lines.
There's two identical gid_from_group lines in a row. We only need one.
Ditto for uid_from_user().

Sponsored by:		Netflix
Reviewed by:		bapt, jrtc27
Differential Revision:	https://reviews.freebsd.org/D32442
2021-10-10 11:17:14 -06:00
Ed Maste
032448cd2c Belatedly track private lib renaming for OptionalObsoleteFiles.inc
Reviewed by:	kevans
Fixes:		5551c57355 ("Rework PRIVATELIB")
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D32384
2021-10-08 23:15:56 -04:00
Peter Holm
89ec6dcce0 stress2: Added a regression test 2021-10-08 06:38:17 +00:00
Peter Holm
e6c28c2465 stress2: exclude known problem test 2021-10-08 06:35:17 +00:00
John Baldwin
42dcd39528 crypto: Support Chacha20-Poly1305 with a nonce size of 8 bytes.
This is useful for WireGuard which uses a nonce of 8 bytes rather
than the 12 bytes used for IPsec and TLS.

Note that this also fixes a (should be) harmless bug in ossl(4) where
the counter was incorrectly treated as a 64-bit counter instead of a
32-bit counter in terms of wrapping when using a 12 byte nonce.
However, this required a single message (TLS record) longer than 64 *
(2^32 - 1) bytes (about 256 GB) to trigger.

Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32122
2021-10-06 14:08:49 -07:00
John Baldwin
bcb0fd6acc cryptocheck: Support multiple IV sizes for AES-CCM.
By default, the "normal" IV size (12) is used, but it can be overriden
via -I.  If -I is not specified and -z is specified, issue requests
for all possible IV sizes.

Reviewed by:	markj
Sponsored by:	 Chelsio Communications, The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D32110
2021-10-06 14:08:47 -07:00
Baptiste Daroussin
cbc83e378a ncurses: chase dependency changes in the source tree
Differential Revision:	https://reviews.freebsd.org/D32098
2021-10-04 11:38:24 +02:00
Vincenzo Maffione
f7cef43aa9 nemtap: lb app: Validate ihl field when hashing packet
MFC after:	1 week
2021-09-26 13:48:21 +00:00
Baptiste Daroussin
88741a40c8 check-links.sh: treat PIE executable as elf files 2021-09-23 04:49:57 +02:00
Peter Holm
9ac518adf0 stress2: Update test to ensure propper cleanup of fifo files 2021-09-20 07:36:27 +00:00
Warner Losh
7cf62c68c0 nanobsd: Provide empty routines for new embedded scheme
calculate_partitioning and create_code_slice are now required in
nanobsd.sh. While things work with the ones provided by legacy.sh, it's
fighting embedded/common's other actions. Instead, replace them with
stubs.

Sponsored by:		Netflix
2021-09-16 11:54:18 -06:00
Konstantin Belousov
9a8eb5db55 test/ptrace/scescx.c: fix printing of braces for syscalls without args
Also do not print stray closing brace for error condition.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2021-09-16 20:26:18 +03:00
Peter Holm
bab406830a stress2: Added more unionfs tests 2021-09-16 06:29:07 +00:00
Alan Somers
ff33e5c83f stress2: replace fuse.ko with fusefs.ko
It got renamed in FreeBSD 13

Reviewed by:	pho
MFC after:	2 weeks
Sponsored by:	Axcient
Differential Revision: https://reviews.freebsd.org/D31963
2021-09-15 12:59:21 -06:00
Alan Somers
5dc5f849be tools/test/upsdl: fix compiler warnings
MFC after:	2 weeks
Sponsored by:	Axcient
2021-09-14 14:50:01 -06:00
Peter Holm
94c678cf19 stress2: A two second timeout is too short 2021-09-14 07:50:26 +00:00
Edward Tomasz Napierala
ddedf2a11e tzcode: Implement timezone change detection
Implement optional timezone change detection for local time libc
functions.  This is disabled by default; set WITH_DETECT_TZ_CHANGES
to build it.

Reviewed By:	imp
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
X-NetApp-PR:	#47
Differential Revision:	https://reviews.freebsd.org/D30183
2021-09-12 03:07:58 +00:00
Peter Holm
89379af43f stress2: Update test to the sysctl 'vfs.lookup_shared' being removed 2021-09-13 08:56:06 +00:00
Peter Holm
ddd74e40e2 stress2: Added missing unmount 2021-09-13 08:55:19 +00:00
Peter Holm
f2c9a8b9d9 stress2: Add a syzkaller reproducer 2021-09-09 07:30:47 +00:00
Jose Luis Duran
94d9439b6b Fix cross-builds after 4e5d32a445
Add alignment macros to cross-build's sys/cdefs.h

Pull Request:	https://github.com/freebsd/freebsd-src/pull/531
MFC after:	immediately (build fix)
2021-09-07 10:53:50 +01:00
Robert Wing
8a004a98c2 git-arc: allow word splitting in build_commit_list()
git-rev-list expects commits to be listed separately, allow word
splitting and disable shellcheck SC2086 when using git-rev-list
to build the commit list.

Fixes: 4fd0c6ab1a ("Fix most shellcheck warnings in git-arc.sh")
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D31838
2021-09-06 07:42:46 -08:00
Edward Tomasz Napierala
439aa58728 iconv: Fix "make make-ref"
The purpose of this command is to "refresh" the source reference
files generated with GNU libiconv, located in tools/test/iconv/ref/.
Previously it would generate copies somewhere in OBJDIR, which
we don't use.

Reviewed By:	allanjude
Sponsored by:   Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D31820
2021-09-06 15:47:35 +01:00
Edward Tomasz Napierala
0016b7da34 iconv: Fix tablegen iconv test utility on arm64
Previously it would loop indefinitely on getopt_long(3)
due to 'char' being unsigned.

Reviewed By:	allanjude
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D31817
2021-09-06 15:45:08 +01:00
Edward Tomasz Napierala
c6da134591 iconv: Fix path names used by iconv(3) tests.
Reviewed By:	allanjude
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D31815
2021-09-06 15:43:40 +01:00
Edward Tomasz Napierala
efe014e6b1 iconv: Make it possible to build iconv(3) test suite.
It was broken after 1243a98e38.

Reviewed By:	allanjude
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D31816
2021-09-06 15:41:26 +01:00
Peter Holm
c86a43f1c7 stress2: Added a syzkaller reproducer 2021-09-06 13:32:23 +00:00
Alex Richardson
021385aba5 Add WITH_LLVM_BINUTILS to install LLVM binutils instead of Elftoolchain
When WITH_LLVM_BINUTILS is set, we will install the LLVM binutils as
ar/ranlib/nm/objcopy/etc. instead of the elftoolchain ones.
Having the LLVM binutils instead of the elftoolchain ones allows us to use
features such as LTO that depend on binutils that understand LLVM IR.
Another benefit will be an improved user-experience when compiling with
AddressSanitizer, since ASAN does not symbolize backtraces correctly if
addr2line is elftoolchain addr2line instead of llvm-symbolizer.
See https://lists.freebsd.org/archives/freebsd-toolchain/2021-July/000062.html
for more details.

This is currently off by default but will be turned on by default at some
point in the near future.

Reviewed By:	emaste

Differential Revision: https://reviews.freebsd.org/D31060
2021-09-06 09:49:49 +01:00
Peter Holm
bb61ccd530 stress2: Added missing ktrace() cleanup 2021-09-05 09:01:20 +02:00
Justin Hibbits
7b81e6c7ca Support bootstrapping from Linux/ppc* 2021-09-04 11:47:30 -05:00
Peter Holm
dbb0cb19ec stress2: Update test to new working of option nomtime 2021-09-02 07:12:58 +00:00
Peter Holm
78f718e2c8 stress2: Added timeout for looping mdnsd 2021-09-02 07:11:01 +00:00
Peter Holm
2a58b9c5db stress2: Fix cleanup 2021-09-02 07:09:39 +00:00
Peter Holm
d57bfbce7c stress2: Fix cleanup 2021-09-02 07:08:58 +00:00
Peter Holm
9d1eb47fa1 stress2: Fix cleanup 2021-09-02 07:07:44 +00:00
Peter Holm
d5c541c267 stress2: Make test less verbose 2021-09-02 07:06:55 +00:00
Peter Holm
22f5f4a14e stress2: Added new msdosfs rename() tests 2021-08-29 08:37:54 +02:00
Dimitry Andric
4544929cb5 Silence unused parameter warnings in fspacectl(2) bootstrap stub
While here, replace spaces with tabs and add a newline at EOF.

Fixes:		5425ba8332
MFC after:	3 days
2021-08-28 15:37:43 +02:00
Ka Ho Ng
5425ba8332 truncate(1): Fix cross-build CI failure due to missing fspacectl
For other platforms, fspacectl(2) is absent. This commit masks out the
calls to fspacectl(2) and replace them with a ENODEV errno.

Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D31619
2021-08-24 17:08:28 +08:00
Gordon Bergling
34f620f1d0 Fix a few typos in source code comments
- s/posbile/possible/

MFC after:	5 days
2021-08-14 09:39:17 +02:00
Jessica Clarke
8a1895a3fa tools/build/cross-build: Fix building libllvmminimal on Linux
There is a __used member in glibc's posix_spawn_file_actions_t in
spawn.h, so we must temporarily undefine __used when including it,
otherwise Support/Unix/Program.inc fails to build. This is based on
similar handling for __unused in other headers.

Fixes:		31ba4ce889 ("Allow bootstrapping llvm-tblgen on macOS and Linux")
MFC after:	1 week
2021-08-12 23:50:48 +01:00
Gordon Bergling
8b9f6d62f7 nanobsd: Correct a typo in a comment
- s/partion/partition/

MFC after:	3 days
2021-08-09 13:45:10 +02:00
Baptiste Daroussin
0fa5403d49 pkgbase: move locales into their own package
The only exception here being C.UTF-8 as this is the default
locales so it needs to always be installed

Reviewed by:	pkgbase (emaste)
Differential Revision:	https://reviews.freebsd.org/D31397
2021-08-03 18:35:26 +02:00
Baptiste Daroussin
30e1773fde locales: fix abuse of bsd.dirs.mk
the way SAMEDIRS was defined was an abuse of bsd.dirs.mk resulting in
all the directory to be created in one single command, but DESTDIR is
only prepend once on the first element of the list

Switch to the properway to use bsd.dirs.mk
2021-08-03 18:02:15 +02:00
Baptiste Daroussin
184d64af13 locales: stop hardcoding the directories in the mtree
The framework knows how to create directories and tag them properly
for a the creation of a mtree, not need to hardcode all the locales
entries in bsd.usr.mk

This simplifies addition of new locales but also allow people building
with WITHOUT_LOCALES to end up with a directory full of empty files
2021-08-03 14:25:00 +02:00