Commit graph

277363 commits

Author SHA1 Message Date
Olivier Certner
eb07a26af1
sys_procctl(): Make it clear that negative commands are invalid
An initial reading of the preamble of sys_procctl() gives the impression
that no test prevents a malicious user from passing a negative commands
index (in 'uap->com'), which is soon used as an index into the static
array procctl_cmds_info[].

However, a closer examination leads to the conclusion that the existing
code is technically correct.  Indeed, the comparison of 'uap->com' to
the nitems() expression, which expands to a ratio of sizeof(), leads to
a conversion of 'uap->com' to an 'unsigned int' as per Usual Arithmetic
Conversions/Integer Promotions applied by '<=', because sizeof() returns
'size_t' values, and we define 'size_t' as an equivalent of 'unsigned
int' (which is not mandated by the standard, the latter allowing, e.g.,
integers of lower ranks).

With this conversion, negative values of 'uap->com' are automatically
ruled-out since they are converted to very big unsigned integers which
are caught by the test.  An analysis of assembly code produced by LLVM
16 on amd64 and practical tests confirm that no exploitation is possible.

However, the guard code as written is misleading to readers and might
trip up static analysis tools.  Make sure that negative values are
explicitly excluded so that it is immediately clear that EINVAL will be
returned in this case.

Build tested with clang 16 and GCC 12.

Approved by:    markj (mentor)
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit afc10f8bba)

Approved by:    emaste (mentor)
2024-04-29 14:33:30 +09:00
Kyle Evans
f224a2ca04 script: handle terminal resize on SIGWINCH
Add a -w flag to forward terminal resize events on to the child, which
can be useful in some circumstances to avoid terminal corruption.

Reviewed by:	des
Co-authored-by:	Xavier Beaudouin <xavier.beaudouin@klarasystems.com>
Sponsored by:	Modirum MDPay
Sponsored by:	Klara, Inc.

(cherry picked from commit 8ceac8e13d)
2024-04-29 00:28:45 -05:00
Xavier Beaudouin
2a2cc22f51 script: minor style improvements
Fix some nits pointed out by checkstyle9.pl in advance of functional
changes to script(1).

Reviewed by:	des
Sponsored by:	Modirum MDPay
Sponsored by:	Klara, Inc.

(cherry picked from commit 4459abe334)
2024-04-29 00:28:45 -05:00
Warner Losh
6063683eb8 ada: Another NCQ Trim instability drive
The Seagate IronWolf 110 SATA SSD drive has been reported to be unstable
with NCQ trim enabled.

PR: 264139
Sponsored by:		Netflix

(cherry picked from commit a6cef61766)
2024-04-28 20:35:12 -06:00
Mateusz Piotrowski
5119386711 sync.8: Document that the "sync dance" is not a thing
People still believe that it is essential to run sync(8) a couple of
times before a reboot/halt. Document that this has not been necessary
for a long time now.

Reviewed by:	imp, bcr, Pau Amma <pauamma@gundo.com>
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D33233

(cherry picked from commit 177ba18307)
2024-04-28 20:29:36 +02:00
Dimitry Andric
b9b248b1df Merge commit 0f329e0246d1 from llvm-project (by Dimitry Andric):
[sanitizer_symbolizer] Cast arguments for format strings in markup (#89815)

  When compiling the common sanitizer libraries, there are many warnings
  about format specifiers, similar to:

      compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup.cpp:31:32: warning: format specifies type 'void *' but the argument has type 'uptr' (aka 'unsigned long') [-Wformat]
         31 |   buffer->AppendF(kFormatData, DI->start);
            |                   ~~~~~~~~~~~  ^~~~~~~~~
      compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup_constants.h:33:46: note: format string is defined here
         33 | constexpr const char *kFormatData = "{{{data:%p}}}";
            |                                              ^~
            |                                              %lu
      compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup.cpp:46:43: warning: format specifies type 'void *' but the argument has type 'uptr' (aka 'unsigned long') [-Wformat]
         46 |   buffer->AppendF(kFormatFrame, frame_no, address);
            |                   ~~~~~~~~~~~~            ^~~~~~~
      compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_markup_constants.h:36:48: note: format string is defined here
         36 | constexpr const char *kFormatFrame = "{{{bt:%u:%p}}}";
            |                                                ^~
            |                                                %lu
      ...

  This is because `uptr` is dependent on the platform, and can be either
  `unsigned long long`, `unsigned long`, or `unsigned int`.

  To fix the warnings, cast the arguments to the expected type of the
  format strings.

PR:		276104
Reported by:	pstef
MFC after:	3 days

(cherry picked from commit f08bf5a3ac)
2024-04-28 10:04:33 +02:00
Gordon Bergling
3ad3a5f32b vmm(4): Fix a typo in a kernel message
- s/cant/can't/

(cherry picked from commit 8b5c5cae92)
2024-04-28 07:21:41 +02:00
Gordon Bergling
5f9d770bdc wtap: Fix typos in kernel messages
- s/cant/can't/

(cherry picked from commit 026520a5f2)
2024-04-28 07:21:33 +02:00
Rick Macklem
fba90651e4 Revert "nfsd: Fix NFSv4.1/4.2 Claim_Deleg_Cur_FH"
This reverts commit f300335d9a.

It turns out that the old code was correct and it was wireshark
that was broken and indicated that the RPC's XDR was bogus.
Found during IETF bakeathon testing this week.

(cherry picked from commit 54c3aa02e9)
2024-04-27 18:41:12 -07:00
Dag-Erling Smørgrav
1799750704 cp: Clarify an obscure comment.
MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D44805

(cherry picked from commit 64d6925d19)

cp: Additional sanity check.

Once we've successfully opened the file we've been asked to copy, check
that it's of the same type as FTS told us it was.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	allanjude, markj
Differential Revision:	https://reviews.freebsd.org/D44806

(cherry picked from commit 9075d4cfad)

cp: Use warnc().

MFC after:	1 week
Sponsored by:	Klara, Inc.

(cherry picked from commit f070188c3a)
2024-04-27 14:58:40 +00:00
Dag-Erling Smørgrav
44101eb580 install: Always use a temporary file.
Previously, we would only use a temporary file if explicitly asked to
with the `-S` option, and even then, only if the target file already
existed.  This meant that an outside observer looking for the target
file might see a partial file, and might see the file disappear and
then reappear.

With this patch, we always use a temporary file, ensuring atomicity.
The downside is slightly increased disk usage.  The upside is never
having to worry about, for instance, cron jobs randomly failing if
they happen to run simultaneously with `make installworld`.

The `-S` option is retained, partly for compatibility, and partly
to control the use of `fsync(2)`, which has a non-negligible cost
(approximately 10% increase in wall time for `make installworld`).

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	0mp, brooks, imp, markj
Differential Revision:	https://reviews.freebsd.org/D44742

(cherry picked from commit e5035d0857)

install: Simplify path construction.

There's no need to copy the path twice to split it into base and dir.
We simply call `basename()` first, then handle the two trivial cases in
which it isn't safe to call `dirname()`.

While here, add an early check that the destination is not an empty
string.  This would always fail eventually, so it may as well fail
right away.  Also add a test case for this shortcut.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D44743

(cherry picked from commit 17dc7017d7)

install: Remove the mmap(2) option.

We already removed it from cp(1) over a year ago but never followed up
here.  Do so now, for the same reasons: significant complexity for
little to no benefit.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D44809

(cherry picked from commit a0439a1b82)

install: Assorted nitpickery.

* Use `errc()` instead of manually setting `errno` before calling `err()`.
* Change one warning into a fatal error.
* Drop some unnecessary casts.
* `strlcat()` bounds checks were off-by-one.  This does not matter in
  practice because the subsequent code renders an overrun harmless.
* We were passing `SSIZE_MAX` to `copy_file_range()` instead of the
  requested size.  This only matters if we're asked to install a file
  which is still being written to while we are copying it.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D44810

(cherry picked from commit 000a533e6d)
2024-04-27 14:58:40 +00:00
Dag-Erling Smørgrav
82c8a5f4f1 nullfs: Show correct exported flag.
MFC after:	3 days
Reviewed by:	allanjude, kib
Differential Revision:	https://reviews.freebsd.org/D44773

(cherry picked from commit 2b258dd17c)
2024-04-27 14:58:40 +00:00
Doug Rabson
1d06b45463 Fix MNT_IGNORE for devfs, fdescfs and nullfs
The MNT_IGNORE flag can be used to mark certain filesystem mounts so
that utilities such as df(1) and mount(8) can filter out those mounts by
default. This can be used, for instance, to reduce the noise from
running container workloads inside jails which often have at least three
and sometimes as many as ten mounts per container.

The flag is supplied by the nmount(2) system call and is recorded so
that it can be reported by statfs(2). Unfortunately several filesystems
override the default behaviour and mask out the flag, defeating its
purpose. This change preserves the MNT_IGNORE flag for those filesystems
so that it can be reported correctly.

MFC after:	1 week

(cherry picked from commit b5c4616582)
2024-04-27 14:58:39 +00:00
Denny Page
90499f6efd Support ARP for 802 networks
This is used by 802.3 Ethernet.  (Also be used by 802.4 Token Bus and
802.5 Token Ring, but we don't support those.)

This was accidentally removed along with FDDI support in commit
0437c8e3b1, presumably because comments implied it was used only by
FDDI or Token Ring.

Fixes: 0437c8e3b1 ("Remove support for FDDI networks.")
Reviewed-by: emaste
Signed-off-by: Denny Page <dennypage@me.com>
Pull-request: https://github.com/freebsd/freebsd-src/pull/1166
(cherry picked from commit fcdf9a1989)
(cherry picked from commit d776dd5fbd)
2024-04-27 10:47:16 -04:00
Ricardo Branco
302d0acea8 MFV: less: Do not trust st_size if it equals zero
This is a smaller version of upstream
1fafd968b48e5cea6c85f126d77071a8de707a55 to address the
issue that less not being able to operate on files
residing in pseudo-filesystems that advertize a zero
size value.

PR:		bin/276133

(cherry picked from commit cae336280b)
2024-04-27 00:08:17 -07:00
Gordon Bergling
5da0bdbf28 ds1307(4): Fix a typo in a source code comment
- s/slighly/slightly/

(cherry picked from commit fa3b320668)
2024-04-27 07:50:20 +02:00
Gordon Bergling
3f82081454 i386: Fix a typo in a source code comment
- s/slighly/slightly/

(cherry picked from commit e6c45f377d)
2024-04-27 07:50:11 +02:00
Alexander Motin
a36b9f2442 libpmc: Import AMD Zen 4 PMU events
MFC after:	1 week

(cherry picked from commit 278d695094)
2024-04-26 23:02:51 -04:00
Gordon Bergling
1002fa246b mwlstats: Fix a typo in an error message
- s/the the/the/

(cherry picked from commit e1e149ad8a)
2024-04-25 08:17:38 +02:00
Gordon Bergling
ce775a889a sys: Remove two double words in source code comments
- s/of of/of/

(cherry picked from commit cf5d9c4124)
2024-04-25 08:17:28 +02:00
Kyle Evans
fac45b6b9a ahc(4): resolve some minor nits
In ahc_init(), qoutfifo is already assigned to effectively the same
value a couple lines up, except in the first assignment it uses the
proper definition; keep the more descriptive assignment.

ahc_targetcmd_offset() gets the offset wrong entirely; as per the
area of ahc_init() this diff also touches, targetcmds is laid out first
in the shared map and it's followed by the qoutfifo.  As a result, we'd
generally be getting negative offsets here.  We can't actually do a
partial sync anyways, so there was no consequence to getting this wrong.

Reviewed by:	imp, mav

(cherry picked from commit b5e0cc2fa4)
2024-04-24 22:59:20 -05:00
Kyle Evans
cef3d542b7 ahc(4)/ahd(4): fix target mode on ARM
One of the comments in ahc_execute_scb() notes that the CAM direction is
actually w.r.t. the initiator.  As a consequence, all of our sync ops
end up being wrong because the direction is flipped from that of the
transfer.  Fix it to do proper invalidation and avoid spewing random
garbage out on the SCSI bus.

Reported and tested by:	HP van Braam <hp@tmm.cx>
Reviewed by:	imp, mav

(cherry picked from commit 9dcf39575e)
2024-04-24 22:59:14 -05:00
Dimitry Andric
15dfc47b6a heimdal: asn1: Use unsigned bitfields for named bitsets
Import upstream 6747e1628:

  asn1: Use unsigned bitfields for named bitsets

  Signed 1-bit bitfields are undefined in C.

This should fix the following warnings, which for unknown reasons are
errors in CI:

  /usr/src/crypto/heimdal/lib/hx509/ca.c:1020:22: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
   1020 |         ku.digitalSignature = 1;
        |                             ^ ~
  /usr/src/crypto/heimdal/lib/hx509/ca.c:1021:21: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
   1021 |         ku.keyEncipherment = 1;
        |                            ^ ~
  /usr/src/crypto/heimdal/lib/hx509/ca.c:1028:17: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
   1028 |         ku.keyCertSign = 1;
        |                        ^ ~
  /usr/src/crypto/heimdal/lib/hx509/ca.c:1029:13: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
   1029 |         ku.cRLSign = 1;
        |                    ^ ~

PR:		276960
Fixes:		1b74875929
MFC after:	1 week

(cherry picked from commit 219b6e4423)
2024-04-24 23:27:27 +02:00
Dimitry Andric
2efe30782c heimdal: Add 64-bit integer support to ASN.1 compiler
Import upstream 19d378f44:

  ASN.1 INTEGERs will now compile to C int64_t or uint64_t, depending
  on whether the constraint ranges include numbers that cannot be
  represented in 32-bit ints and whether they include negative
  numbers.

  Template backend support included.  check-template is now built with
  --template, so we know we're testing it.

  Tests included.

Also adjusts the generated files:
* asn1parse.c, asn1parse.h (not strictly necessary, but nice to have)
* der-protos.h, which needs a bunch of new prototypes. I copied these
  from a der-protos.h generated by the upstream build system, which
  uses a perl script for this.
* adjust printf format strings for int64_t. Upstream uses %lld for this,
  but that is not portable, and leads to lots of -Werror warnings.

This should fix target-dependent differences between headers generated
by asn1_compile. For example, when cross compiling world from amd64 to
i386, the generated cms_asn1.h header has:

  CMSRC2CBCParameter ::= SEQUENCE {
    rc2ParameterVersion   INTEGER (0..-1),
    iv                    OCTET STRING,
  }

while a native build on i386 has:

  CMSRC2CBCParameter ::= SEQUENCE {
    rc2ParameterVersion   INTEGER (0..2147483647),
    iv                    OCTET STRING,
  }

These are _both_ wrong, since the source file, cms.asn1, has:

  CMSRC2CBCParameter ::= SEQUENCE {
          rc2ParameterVersion   INTEGER (0..4294967295),
          iv                    OCTET STRING -- exactly 8 octets
  }

PR:		276960
Reviewed by:	cy, emaste
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D44814
Differential Revision: https://reviews.freebsd.org/D44815

(cherry picked from commit 1b74875929)
2024-04-24 23:26:47 +02:00
Dimitry Andric
8b4cf1092b Add a few missed libclang_rt files to ObsoleteFiles.inc
PR:		276104
Reported by:	Mark Millard <marklmi@yahoo.com>
MFC after:	3 days

(cherry picked from commit 0ab121e9f9)
2024-04-24 23:26:28 +02:00
Ed Maste
a913f3ab8f Cirrus-CI: bump Clang versions to 16 and 17
Clang/LLVM 17 is currently the in-tree default compiler, so use it as
the default Cirrus-CI toolchain.  Clang/LLVM 18 is coming soon and needs
to be added here, but I ran into trouble with llvm18-lite package
availability so will look at that later.

Reviewed by:	dim (earlier), Jose Luis Duran
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44162

(cherry picked from commit 51c6bf0478)
(cherry picked from commit adc61137fd)
2024-04-24 10:06:09 -04:00
Josef 'Jeff' Sipek
1a4e512adb acpi_battery: avoid divide-by-zero when no devices have capacity info
On laptops with builtin batteries, disconnecting the battery may show up
as a battery without any capacity information. (The theory is that one
is disconnecting the cells but the electronics identifying the battery
are still connected.) As a result, the loop over all batteries in
acpi_battery_get_battinfo results in total_lfcap == 0.

So, just check that total_lfcap is non-zero to avoid a division by zero
(triggerable by sysctl hw.acpi.battery).

Reported by:	Stefano Marinelli
Tested by:	Stefano Marinelli
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D44818

(cherry picked from commit 2e850b832f)
(cherry picked from commit 788987e034)
2024-04-24 10:06:08 -04:00
Gordon Bergling
e03c9c311e arm: Fix a typo in a KASSERT message
- s/resoure/resource/

(cherry picked from commit 178cf4b9db)
2024-04-24 12:21:20 +02:00
Gordon Bergling
c64f93bf5a freescale: Fix a typo in a source code comment
- s/cant/can't/

(cherry picked from commit 26f6c148bc)
2024-04-24 12:21:09 +02:00
Gordon Bergling
67e24ed0fc geom(4): Fix a typo in a source code comment
- s/cant/can't/

(cherry picked from commit c0a01ee83d)
2024-04-24 12:20:58 +02:00
Gordon Bergling
64dfe0a94b uipc_domain: Fix a typo in a source code comment
- s/cant/can't/

(cherry picked from commit 9576fc16ca)
2024-04-24 12:20:45 +02:00
John Baldwin
835b1bd404 release: Use the ABI of the target release to fetch packages
- Point --rootdir at the installed destdir in the dvd tree.  This
  causes pkg to determine the ABI from the installed destdir instead
  of the host's binaries.  Previously the result was that packages
  for the host's ABI were always downloaded breaking cross-releases
  (e.g. arm64 releases built on an amd64 host included amd64
  packages on the DVD ISO image rather than arm64 packages).  This
  also handles version mismatches, and I tested this by cross-building
  a 15.x arm64 release on a 14.x amd64 host.

- As a result, pkg now does a chdir(3) to the rootdir before running,
  so the -o argument to fetch needs to be updated to be relative to
  rootdir instead of the CWD as make runs.

- Add a new ROOTDIR variable to limit references to "dvd" to one
  place.  Ideally ROOTDIR would be an argument to this script so
  that it didn't really know about the dvd layout at all.

- While here, simplify creation of symlinks by just using a longer
  path to the link name instead of using 'cd' in the shell before
  invoking ln(1).  Also use ln -sf to create the pkg.pkg symlink
  rather than rm + ln.

PR:		278273
Reported by:	gatekeeper <tiago.gasiba@gmail.com>
Reviewed by:	imp, delphij
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D44749

(cherry picked from commit ea2663040d)
2024-04-23 22:04:44 -07:00
Colin Percival
6b8ca8c4e4 release: Support r/o /usr/ports for cloudware
Set WRKDIRPREFIX=/tmp/ports DISTDIR=/tmp/distfiles when building tools
needed for uploading cloudware images.

While I'm here, adjust the bsdec2-image-upload build target to match
the style used by the Azure/GCE/Vagrant Makefiles.

MFC after:	3 days

(cherry picked from commit 6c87aed39c)
2024-04-23 22:04:06 -07:00
Colin Percival
1b0e859897 release/Makefile.vm: Support read-only ports tree
Build qemu (if needed) with WRKDIRPREFIX=/tmp/ports DISTDIR=/tmp/distfiles
so that we can have a read-only /usr/ports and don't contaminate it.  This
became an issue when I enabled parallel release building, since one image
might be creating its ports.txz file at the same time as we're building
qemu as a prerequisite for building another image.

MFC after:	5 days

(cherry picked from commit 6f454c211b)
2024-04-23 22:02:02 -07:00
Dimitry Andric
7929070fb7 Merge llvm-project release/18.x llvmorg-18.1.4-0-ge6c3289804a6
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/18.x llvmorg-18.1.4-0-ge6c3289804a6.

PR:		276104
MFC after:	3 days

(cherry picked from commit dfa39133b3)
2024-04-23 19:33:14 +02:00
Gordon Bergling
78de6a587c NOTES: Remove a double word in comment
- s/of of/of/

(cherry picked from commit 1ff65c57e3)
2024-04-23 07:26:55 +02:00
Gordon Bergling
4cea50b47d arm64: Remove a double word in a source code comment
- s/of of/of/

(cherry picked from commit 516e591db1)
2024-04-23 07:26:42 +02:00
Gordon Bergling
cdadad917e ifconfig(8): Fix two typos in source code comments
- s/the the/the/

(cherry picked from commit 68b9eb9185)
2024-04-23 07:26:30 +02:00
Gordon Bergling
4fef442e75 bhnd(4): Remove a double word in a source code comment
- s/of of/of/

(cherry picked from commit d2747968c0)
2024-04-23 07:26:15 +02:00
Gordon Bergling
8e73397eb6 safe(4): Remove a double word in a source code comment
- s/of of/of/

(cherry picked from commit 1bbdcf62d3)
2024-04-23 07:26:00 +02:00
Gordon Bergling
b6ddbb47e1 binmiscctl.8: Remove a double word
- s/the the/the/

(cherry picked from commit 5235e9d646)
2024-04-23 07:25:10 +02:00
Gordon Bergling
db6bf2d09b usb(4): Remove a double word in a source code comment
- s/of of/of/

(cherry picked from commit 604511f84a)
2024-04-23 07:24:57 +02:00
Konstantin Belousov
ed9f44083d rtld(1): minor clarification for LD_STATIC_TLS_EXTRA
(cherry picked from commit 8d74737035)
2024-04-23 03:32:54 +03:00
Stephen J. Kiernan
57d49c4bcb rtld: introduce STATIC_TLS_EXTRA
(cherry picked from commit 95335dd3c1)
2024-04-23 03:32:54 +03:00
Dimitry Andric
b449894978 share/mk/bsd.cpu.mk: add F16C feature for i386 and amd64 architectures
As discussed in bug 278417, some ports require the F16C instruction set
to compile, but there is no way yet to detect whether the currently
chosen CPUTYPE supports this feature.

Add the feature to the MACHINE_CPU variable, for each processor that
supports it. The list of processors was extracted from clang 18's -dM
output, filtered on the __F16C__ define.

PR:		278417
Reviewed by:	brooks, emaste
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D44848

(cherry picked from commit 2fd73b7126)
2024-04-21 21:02:09 +02:00
Daniel Engberg
a45dd98445 share/mk/bsd.cpu.mk: Add AMD Zen 4 for x86
Main difference between older Zen variants is that this supports AVX-512

Reviewed by:	imp (previous version), emaste
Approved by:	emaste
Differential Revision:	https://reviews.freebsd.org/D41331

(cherry picked from commit ed3fb74e44)
2024-04-21 21:02:09 +02:00
Greg V
ce159ac62d bsd.cpu.mk: add support for x86-64-v[234] levels as CPUTYPE
These are supported in LLVM 12 and GCC 11:

https://github.com/llvm/llvm-project/commit/012dd42e027e
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=324bec558e95584e8c1997575ae9d75978af59f1

Differential Revision:	https://reviews.freebsd.org/D29150

(cherry picked from commit 362fef2f4a)
2024-04-21 21:02:08 +02:00
Jung-uk Kim
445aa3bcc5 bsd.cpu.mk: Correct MACHINE_CPU for Intel Alder Lake
Apparently Intel Alder Lake lacks AVX-512 instructions.

Fixes:		09e7341c5e "Catch up with Clang 12"
(cherry picked from commit e80145525b)
2024-04-21 21:02:08 +02:00
Jung-uk Kim
562855795e Catch up with Clang 12.
Add "znver3" for AMD and "alderlake" and "sapphirerapids" for Intel.

(cherry picked from commit 09e7341c5e)
2024-04-21 21:02:07 +02:00
Andriy Gapon
9c444571ab aw_gpio: temporarily switch to input function if read in eint mode
This is needed for gpiokeys driver that needs to read input state after
receiving an interrupt for either edge.

PR:		248138

(cherry picked from commit b98558e69b)
2024-04-21 15:32:16 +03:00