Commit Graph

301257 Commits

Author SHA1 Message Date
andvar 9719c27fea fix various typos in comments. 2023-06-01 20:15:16 +00:00
uwe 563f06395e mtree(8): a few markup fixes
Didn't touch the section that describes the spec file format.  We have
the format documented here, in mtree(8), and we also have the format
description in mtree(5) that comes from libarchive.
2023-06-01 13:04:47 +00:00
rillig a7d1ba3ffa make: add more details to debug logging of .for loops 2023-06-01 09:02:14 +00:00
riastradh 78e97c0a70 ld.elf_so: Make tls alloc debug messages more detailed and greppable.
XXX pullup-10
2023-06-01 08:20:10 +00:00
rillig d45705acd7 make: shorten function names, clean up comments
No functional change.
2023-06-01 07:44:10 +00:00
rillig 9458670356 tests/make: clean up comments, extend a few tests 2023-06-01 07:27:30 +00:00
rillig 72cb4673f3 make: error out on a .break directive with arguments 2023-06-01 06:25:34 +00:00
mrg cefbb2f39f add 2004's "@" definition. 2023-06-01 04:08:36 +00:00
gutteridge 6b947a974c 3RDPARTY: gcc-11.4 out 2023-06-01 01:09:51 +00:00
uwe 71118f0693 stat_flags(3): try to improve the descriptions
List all alternative forms recognized by string_to_flags(3).
Both "dump" and "nonodump" are the negative of "nodump".
string_to_flags does not recognize "snap".
Provide xrefs for flag descriptions where applicable.
2023-05-31 21:49:39 +00:00
wiz 6fd586299b doc: fix swappo 2023-05-31 21:02:50 +00:00
christos 21927c5e23 new OpenSSL 2023-05-31 20:59:15 +00:00
christos 63c35a6c57 fix the build 2023-05-31 20:57:31 +00:00
lukem ea42860061 bsd.own.mk: support ${MACHINE} defaults in MK* = yes
For MK* variables (in _MKVARS.yes), default to
MK*.${MACHINE} if MK*.${MACHINE_ARCH} isn't defined.

Equivalent to _MKVARS.no change by mrg@ in rev 1.1065 on 2018-06-16.
2023-05-31 20:47:35 +00:00
lukem 5d3629a706 bsd.own.mk: sort lists. whitespace fixes
Create _NOVARS for the list of NO* variables,
for consistency with _MKVARS.yes and _MKVARS.no

Format _NOVARS, _MKVARS.yes, and _MKVARS.no with
one entry per line, and sort the lists.
Simplifies review and adding new entries.
Per suggestion from riastradh@

Line up some variable assignments more consistently.
2023-05-31 20:45:02 +00:00
christos a53fe4a1e9 regen 2023-05-31 20:43:28 +00:00
uwe 52efc5a51d chflags(1): xref stat_flags(3) 2023-05-31 20:33:22 +00:00
ad d3ebc88635 Fix typo. 2023-05-31 20:00:50 +00:00
christos 64d14f900e new openssl man pages 2023-05-31 19:44:42 +00:00
christos cd340f292c regen 2023-05-31 19:35:31 +00:00
christos d6e24a893e merge conflicts between 3.0.8 and 3.0.9 2023-05-31 19:30:28 +00:00
christos 4170684f22 Import OpenSSL-3.0.9
### Changes between 3.0.8 and 3.0.9 [30 May 2023]

 * Mitigate for the time it takes for `OBJ_obj2txt` to translate gigantic
   OBJECT IDENTIFIER sub-identifiers to canonical numeric text form.

   OBJ_obj2txt() would translate any size OBJECT IDENTIFIER to canonical
   numeric text form.  For gigantic sub-identifiers, this would take a very
   long time, the time complexity being O(n^2) where n is the size of that
   sub-identifier.  ([CVE-2023-2650])

   To mitigitate this, `OBJ_obj2txt()` will only translate an OBJECT
   IDENTIFIER to canonical numeric text form if the size of that OBJECT
   IDENTIFIER is 586 bytes or less, and fail otherwise.

   The basis for this restriction is RFC 2578 (STD 58), section 3.5. OBJECT
   IDENTIFIER values, which stipulates that OBJECT IDENTIFIERS may have at
   most 128 sub-identifiers, and that the maximum value that each sub-
   identifier may have is 2^32-1 (4294967295 decimal).

   For each byte of every sub-identifier, only the 7 lower bits are part of
   the value, so the maximum amount of bytes that an OBJECT IDENTIFIER with
   these restrictions may occupy is 32 * 128 / 7, which is approximately 586
   bytes.

   Ref: https://datatracker.ietf.org/doc/html/rfc2578#section-3.5

   *Richard Levitte*

 * Fixed buffer overread in AES-XTS decryption on ARM 64 bit platforms which
   happens if the buffer size is 4 mod 5 in 16 byte AES blocks. This can
   trigger a crash of an application using AES-XTS decryption if the memory
   just after the buffer being decrypted is not mapped.
   Thanks to Anton Romanov (Amazon) for discovering the issue.
   ([CVE-2023-1255])

   *Nevine Ebeid*

 * Reworked the Fix for the Timing Oracle in RSA Decryption ([CVE-2022-4304]).
   The previous fix for this timing side channel turned out to cause
   a severe 2-3x performance regression in the typical use case
   compared to 3.0.7. The new fix uses existing constant time
   code paths, and restores the previous performance level while
   fully eliminating all existing timing side channels.
   The fix was developed by Bernd Edlinger with testing support
   by Hubert Kario.

   *Bernd Edlinger*

 * Corrected documentation of X509_VERIFY_PARAM_add0_policy() to mention
   that it does not enable policy checking. Thanks to David Benjamin for
   discovering this issue.
   ([CVE-2023-0466])

   *Tomáš Mráz*

 * Fixed an issue where invalid certificate policies in leaf certificates are
   silently ignored by OpenSSL and other certificate policy checks are skipped
   for that certificate. A malicious CA could use this to deliberately assert
   invalid certificate policies in order to circumvent policy checking on the
   certificate altogether.
   ([CVE-2023-0465])

   *Matt Caswell*

 * Limited the number of nodes created in a policy tree to mitigate
   against CVE-2023-0464.  The default limit is set to 1000 nodes, which
   should be sufficient for most installations.  If required, the limit
   can be adjusted by setting the OPENSSL_POLICY_TREE_NODES_MAX build
   time define to a desired maximum number of nodes or zero to allow
   unlimited growth.
   ([CVE-2023-0464])

   *Paul Dale*
2023-05-31 19:25:17 +00:00
riastradh 3e105dc2be ld.elf_so: Sprinkle tls debug messages.
XXX pullup-10
2023-05-31 18:44:39 +00:00
uwe a2db434eb1 date(1): sync two [[[[[CC]yy]mm]dd]HH]MM[.SS] instances
The markup was the same (modulo Li vs Cm for the dot before the
seconds), but use the same source markup grouping/layout in both to
make this fact more obvious.
2023-05-31 18:04:00 +00:00
kim 219c5cc723 Add -R to usage 2023-05-31 17:56:54 +00:00
uwe 8710cd3b8d date(1): minor markup fixes 2023-05-31 17:52:02 +00:00
kim 04f2a3c19d Add -R option for displaying time in RFC 5322 format, similar to GNU date. 2023-05-31 16:01:53 +00:00
riastradh 3e86fda22b ld.elf_so: Fix set lists for MKDEBUG=yes builds with t_tls_extern.
XXX pullup-10
2023-05-31 13:02:10 +00:00
lukem ef8663be6b CHANGES: pax fixes 2023-05-31 09:33:09 +00:00
riastradh fca22ba5cb ld.elf_so: Nix inadvertently committed private test program. 2023-05-31 01:06:43 +00:00
riastradh 111bb99c35 ld.elf_so: Fix extern TLS test to match PR toolchain/50277.
Now it's actually testing the problem.
2023-05-31 00:46:11 +00:00
riastradh 12037d6a69 ld.elf_so: New test for extern initial-exec TLS, PR toolchain/50277.
XXX pullup-10
2023-05-31 00:18:44 +00:00
hgutch d9afbe107f Fix LLVM build with host gcc 13
Building LLVM with a host gcc 13 fails and suggests including <cstdint>
in external/apache2/llvm/dist/llvm/include/llvm/Support/Signals.h .
Instead of this, joerg@ suggested not modifying the llvm vendor branch
but instead working around this in our LLVM build infrastructure.
2023-05-30 19:05:04 +00:00
lukem 39d234c9f0 tools/compat: regen 2023-05-30 19:04:42 +00:00
lukem 8d651401a4 tools/compat: disable host CC warnings
Determine if the host CC supports flags to disable various
warnings similar to <bsd.own.mk> GCC_*, CLANG_*, and CC_*,
and override the <bsd.own.mk> equivalents in defs.mk.

Silences "warning: unknown warning option '...'" from our source.
External source (e.g., binutils and gcc) need their own fixes
to enhance their detection of supported clang compiler flags.
2023-05-30 18:54:21 +00:00
lukem 2356d03a18 tools/compat: detect supported host compiler flags
Define NB_CC_FLAG(FLAG) to use AX_CHECK_COMPILE_FLAG
to determine if the host compiler supports FLAG
and define and AC_SUBST CC_FLAG if so.

Use workarounds to force clang to hard-fail on unknown -Wwarning,
and gcc to use -WWARN to check unknown -Wno-WARN because the
latter doesn't cause an error in gcc.

In the future we could use NB_CC_FLAG([-fcommon]) for
older NetBSD release branches compiled with host gcc 10+.

Rework Darwin -no-cpp-precomp check to use NB_CC_FLAG().
Note: this flag probably hasn't been required on macOS (Darwin)
for a long time, but serves as a good example on how to use this.

Display varaibles at the end of configure to show what was detected.
2023-05-30 18:39:19 +00:00
lukem 69c1db2ad0 tools/compat: import AX_CHECK_COMPILE_FLAG
Import AX_CHECK_COMPILE_FLAG serial 6 from autoconf-archive
  https://github.com/autoconf-archive/autoconf-archive.git
as at commit 5b5ce7f on 2023-05-01.
2023-05-30 18:35:16 +00:00
lukem c578bb77d2 tools/compat: don't expose HAVE_PTHREAD_H to make
Non of the tools Makefiles needs HAVE_PTHREAD_H, so don't
AC_SUBST it or provide in defs.mk.
2023-05-30 18:31:55 +00:00
lukem f7d6f1b13f tools/compat: use autoreconf, support MAKEVERBOSE
Use autoreconf instead of autoconf + autoheader;
we'll need aclocal in the near future.

If MAKEVERBOSE >= 2, add -v to autoreconf.
2023-05-30 18:27:04 +00:00
christos f3bd495543 Fix some const qual (Piotr Pawel Stefaniak) 2023-05-30 11:53:40 +00:00
msaitoh 0692385f37 Use device_printf() instead of aprint_error_dev(). 2023-05-30 04:14:30 +00:00
gutteridge 92ce9f6bbb sysctl.7: be a little more descriptive about kern.osrevision
It's expressed as an integer, and is also returned as an integer type
should one retrieve it via sysctl(3) (as this man page already
correctly documents in the table above its description).
2023-05-29 23:30:47 +00:00
lukem e6c216806f tools/compat: regen 2023-05-29 21:34:57 +00:00
lukem 2ec2a2d759 tools/compat/configure.ac: style tweaks
Use "NB_" prefix not "AC_" for our macros ("AC_" is for autoconf).
Fail is NB_ macro isn't defined.
Use AC_DEFUN() instead of define().
Consistently use () in zero argument macro calls.
2023-05-29 21:30:42 +00:00
andvar 3532fe7de5 mdnsd(8): restore fixes for PR bin/46758, lost on resolving merge conflicts.
Original commit message from Roy Marples:
"Derive our primary interface and address by trying to connect to an
address in the TEST-NET-2 network as noted in RFC5737 instead of using
the 1.1.1.1 address. Also, use port 7 (echo) for better style.
Fixes PR bin/46758 thanks to Lloyd Parkes."

pullups needed for netbsd-9, netbsd-10.
2023-05-29 21:16:58 +00:00
lukem 11f18d4109 bsd.own.mk: rename NO_ADDR_OF_PACKED_MEMBER to CC_NO_ADDR_OF_PACKED_MEMBER
Add "CC_" prefix to NO_ADDR_OF_PACKED_MEMBER.

We now have the following convention:
GCC_NO_*: Disable specific warnings from GCC.
CLANG_NO_*: Disable specific warnings from Clang.
CC_NO_*: Disable specific warnings from both Clang and GCC.

This reserves "NO_*" Makefile variables to disable other features.

Some space->tab fixes.
2023-05-29 20:31:09 +00:00
lukem c1aa87e38c libc: fix typo in comments: NO_SRSC -> NO_SRCS 2023-05-29 18:25:52 +00:00
lukem 0c67090a00 bsd.own.mk: sort list of NO* variables
List the NO variables in order, leaving enough room to add more entries,
not splitting the next letter after "NO" across a line.

No functional change; just prettier and easier to review.
2023-05-29 17:35:11 +00:00
rin d708cb6fb0 aq(4): if_transmit: Invoke softint_schedule(9) with kpreempt disabled.
XXX
Pull up to netbsd-10 and netbsd-9.
2023-05-29 08:00:05 +00:00
rin 9bacf14f2a libsa/printf: Do not fetch long va_arg as long long.
This does real harm iff all of the following conditions are satisfied:

(1) On ILP32 architectures.
(2) Both LIBSA_PRINTF_LONGLONG_SUPPORT and LIBSA_PRINTF_WIDTH_SUPPORT
    compile-time options are enabled.
(3) Width field is used with 'l' modifier.

This is an implicit-fallthrough bug, but unfortunately, GCC 10.4 cannot
find this out somehow...

XXX
Pull up to netbsd-10 and netbsd-9. netbsd-8 is not affected.
2023-05-29 03:56:52 +00:00