cdefs: Add __deprecated1 which accepts a message as an argument
This message will be included in any warning issued by the compiler
for use of the deprecated function.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D47701
(cherry picked from commit 6da04bcff9efedeae7d4046553002b9e3b2bc24f)
cdefs: Add __deprecated
Add __deprecated decorator. This is for a deprecated interface. copystr
is tagged with this today in copy(9), but don't actually provide it or
use it. copystr is a #define so adding it will have to wait.
LinuxKPI was defining this away completely in compiler.h. Since this is
shared between Linux KPI consumers and OpenZFS, if it's already defined,
use the FreeBSD sys/cdefs.h version, otherwise define it away. For
OpenZFS this will retain it, while for Linux KPI it will tend to drop it
(I think always, but I didn't look at everything).
Sponsored by: Netflix
Reviewed by: jhb, emaste
Differential Revision: https://reviews.freebsd.org/D46137
(cherry picked from commit 16672453f12586703f1c51d909bd1900691bf884)
sys/cdefs.h: add __noexcept and __noexcept_if
These macros provide the C++11 noexcept and noexcept(...) keywords if
we're compiling in a C++11 environment. Otherwise, they expand to an
empty string.
This will be used to add the required noexcept specifier to several libc
functions as required in C++11.
MFC after: 2 weeks
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1085
(cherry picked from commit 02b0d4b688cc4deb14cb6e7534a2a4958e48b753)
Move MK_REPRODUCIBLE_PATHS to bsd.opts.mk
In commit faeaa25f5624 MK_REPRODUCIBLE_PATHS was introduced, but some
ports that include bsd.debug.mk then started to fail with:
make: /usr/share/mk/bsd.debug.mk:19: Variable "MK_REPRODUCIBLE_PATHS" is undefined
in /usr/share/mk/bsd.lib.mk:525
in /wrkdirs/usr/ports/devel/libsysinfo/work/libsysinfo-0.0.3/Makefile:16
make: Fatal errors encountered -- cannot continue
This is because bsd.debug.mk includes bsd.opts.mk, not src.opts.mk. Move
the MK_REPRODUCIBLE_PATHS option to bsd.opts.mk to fix this.
Reviewed by: imp, emaste
Fixes: faeaa25f5624
HBSD: Disable SafeStack for the Unbound daemon
When Unbound is built with SafeStack, attempts to kill the running
daemon process with SIGTERM does not kill the process. Instead, the
daemon stops responding.
Signed-off-by: Shawn Webb <shawn.webb at hardenedbsd.org>
Reported-by: @northboot
issue: #110
MFC-to: 15-STABLE
(cherry picked from commit ee472934f961f24a1c4dee56e7bd8dbb0e50ce13)
Signed-off-by: Shawn Webb <shawn.webb at hardenedbsd.org>
ioctl.2: Mention EACCES
ioctls can fail with EACCES, see sys/kern/tty.c
PR: 239504
MFC after: 3 days
Reviewed by: ziaee
Reported by: Brennan Vincent <brennan at umanwizard.com>
Differential Revision: https://reviews.freebsd.org/D49072
bio: Fix KASAN invalid access report in biodone
Do not touch the bio fields after calling the bio_done callback. The bio
might have been freed after the callback returns.
Fixes: 725f4b108d54
Reported by: kp, markj
linprocfs.4: Improve docs around pid/self entries
Mark <pid> as a placeholder and document that self is a symlink to a directory.
PR: 283080
Reviewed by: ziaee
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D54358
(cherry picked from commit 0d31189cbce4de142a43b65037beb7bf8c09cf26)
dpaa2: Setup interface caps on attach
39d4094173f9 ("epair: add support for checksum offloading") revealed
that HW checksum offloading is not enabled when the dpaa2_ni driver
is attached despite being declared and enabled on the dpni interface.
I modified dpaa2_ni_setup_if_caps to take into account both IPv4 and
IPv6 checksum offloading capabilities and added a call to re-configure
interface capabilities on attach to fix it.
Reviewed by: bz
Fixes: 39d4094173f9 ("epair: add support for checksum offloading")
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D53436
(cherry picked from commit a731cb93a66271713d6ea197946e4a307e5b0837)
dpaa2: Setup interface caps on attach
39d4094173f9 ("epair: add support for checksum offloading") revealed
that HW checksum offloading is not enabled when the dpaa2_ni driver
is attached despite being declared and enabled on the dpni interface.
I modified dpaa2_ni_setup_if_caps to take into account both IPv4 and
IPv6 checksum offloading capabilities and added a call to re-configure
interface capabilities on attach to fix it.
Reviewed by: bz
Fixes: 39d4094173f9 ("epair: add support for checksum offloading")
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D53436
(cherry picked from commit a731cb93a66271713d6ea197946e4a307e5b0837)
libc/stdlib/Makefile: one line for each source file name
Reviewed by: alc, emaste
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54365