Commit Graph

281814 Commits

Author SHA1 Message Date
Ed Maste
398b12691b mergemaster: add deprecation notice to man page
Reviewed by:	bapt, gjb, kevans (all earlier)
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D23327
2023-03-02 20:43:34 -05:00
John-Mark Gurney
13597be965
length for the 64-bit entry is 32-bits, not 16-bits.
Reported by:	Jérôme Duval  (korli on github)
2023-03-02 17:03:57 -08:00
John-Mark Gurney
2fee875629
abstract out the vm detection via smbios..
This makes the detection of VMs common between platforms that
have SMBios.

Reviewed by:		imp, kib
Differential Revision:	https://reviews.freebsd.org/D38800
2023-03-02 16:54:21 -08:00
Brooks Davis
cfe244cb37 src.conf.5: regen for KBOOT and KTLS changes
kboot was enabled for aarch64 in 4601064126 and KTLS was added for
powerpc64* in e552cac3d7.
2023-03-03 00:50:36 +00:00
Ed Maste
e27ded83c7 freebsd-update: use grep -E instead of egrep
GNU egrep emits a warning that it is obsolescent and suggests grep -E
instead.  Switch to grep -E in case we end up invoking GNU (e)grep (and
for consistency with other invocations in this file).

Reported by:	Steffen Nurpmeso
Sponsored by:	The FreeBSD Foundation
2023-03-02 18:58:58 -05:00
Brooks Davis
3518a5bbd9 netgraph.4: remove obsolete ng_atm.4 reference
MFC After:	3 days

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D38876
2023-03-02 23:40:05 +00:00
Brooks Davis
bd32aedeee NgATM: Remove useless NGATM_ATM option
MFC after:	3 days

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D38875
2023-03-02 23:40:05 +00:00
Brooks Davis
3746e90118 NATM: Remove useless NETGRAPH_ATM_ATMPIF option
This code was removed as part of the NATM removal in 2017 and somehow
this option was missed.

MFC after:	3 days

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D38874
2023-03-02 23:40:05 +00:00
Rick Macklem
cbbb22031f kern_jail.c: Remove #ifdefs for VNET_NFSD
The consensus was that VNET_NFSD was not needed.
This patch removes it from kern_jail.c.

With this patch, support for the "allow.nfsd"
jail parameter is enabled in the kernel for
kernels built with "options VIMAGE".

Reviewed by:	markj
MFC after:	3 months
Differential Revision:	https://reviews.freebsd.org/D38808
2023-03-02 13:13:24 -08:00
Rick Macklem
4bbbd5875d vfs_mount.c: Allow mountd(8) to do exports in a vnet prison
To run mountd in a vnet prison, three checks in vfs_domount()
and vfs_domount_update() related to doing exports needed
to be changed, so that a file system visible within the
prison but mounted outside the prison can be exported.

I did all three in a minimal way, only changing the checks for
the specific case of a process (typically mountd) doing exports
within a vnet prison and not updating the mount point in other
ways.  The changes are:
- Ignore the error return from vfs_suser(), since the file
  system being mounted outside the prison will cause it to fail.
- Use the priv_check(PRIV_NFS_DAEMON) for this specific case
  within a prison.
- Skip the call to VFS_MOUNT(), since it will return an error,
  due to the "from" argument not being set correctly.  VFS_MOUNT()
  does not appear to do anything for the case of doing exports only.

Reviewed by:	markj
MFC after:	3 months
Differential Revision:	https://reviews.freebsd.org/D37741
2023-03-02 13:09:01 -08:00
Val Packett
c7a8502bdf open.2: describe O_RESOLVE_BENEATH errors correctly
The behavior is the same as in capability mode, it does not actually
return EINVAL for absolute lookups:

    openat(AT_FDCWD,"/tmp/test",O_RDONLY|O_DIRECTORY,00) = 3 (0x3)
    openat(3,"../../",O_RDONLY|0x800000,00)          ERR#93 'Capabilities insufficient'
    openat(3,"/etc/passwd",O_RDONLY|0x800000,00)     ERR#93 'Capabilities insufficient'

Fixes:          1f305be43 ("Document {O,AT}_RESOLVE_BENEATH...")
Reviewed by:    kib, pauamma (manpages), emaste
Sponsored by:   https://www.patreon.com/valpackett
Pull Request:	https://github.com/freebsd/freebsd-src/pull/680
Differential Revision: https://reviews.freebsd.org/D38675
2023-03-02 15:58:00 -05:00
Val Packett
939b24b0ab xlocale: garbage collect references to strtoq_l/strtouq_l
These were explicitly never implemented (see
lib/libc/locale/DESIGN.xlocale), but were referenced in the
manpage and the symbol map.

Fixes:          3c87aa1d3d ("Implement xlocale APIs from Darwin")
Reported by:    ld.lld 16 being --no-undefined-version by default
Reviewed by:    theraven, emaste
Sponsored by:   https://www.patreon.com/valpackett
Pull Request:	https://github.com/freebsd/freebsd-src/pull/679
Differential Revision: https://reviews.freebsd.org/D38408
2023-03-02 15:53:29 -05:00
Alan Somers
72aad3f902 Fix kernel memory disclosures in mpr and mps
In every mpr and mps ioctl that copies kernel data to userland, validate
that the requested length does not exceed the size of the kernel's
buffer.

Note that all of these ioctls already required root access.

MFC after:	2 weeks
Sponsored by:	Axcient
Reviewed by:	imp
Differential Revision: https://reviews.freebsd.org/D38842
2023-03-02 13:31:06 -07:00
Emmanuel Vadot
0fed8288c3 arm: Tag VHYBRID kernel as NO_UNIVERSE
All drivers are already either in GENERIC or in the other arches LINT
so no need to build this one too.

Sponsored by:   Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D38851
2023-03-02 19:59:28 +01:00
Emmanuel Vadot
79ec3b10b4 arm: Tag SOCFPGA kernel as NO_UNIVERSE
All drivers are already either in GENERIC or in the other arches LINT
so no need to build this one too.

Sponsored by:   Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D38850
2023-03-02 19:59:23 +01:00
Emmanuel Vadot
68f8ac87e0 arm: Tag EFIKA_MX kernel as NO_UNIVERSE
All drivers are already either in GENERIC or in the IMX51 kernel config
so no need to build this one too.

Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D38849
2023-03-02 19:59:16 +01:00
Emmanuel Vadot
f201e3800b arm: Tag ALPINE kernel as NO_UNIVERSE
Specific devices are in LINT so no need to build this one as part
of make universe.

Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D38848
Reviewed by:	imp
2023-03-02 19:59:11 +01:00
Emmanuel Vadot
58d487c301 arm: Add PCI and Annapurna devices drivers to LINT
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D38847
Reviewed by:	imp
2023-03-02 19:59:04 +01:00
Warner Losh
7b4299eb4e kboot: Fix hostdisk_override
We were assuming that hostdisk_override was both a directory and a
file, which is not going to work very well. It's supposed to be a
single file, so recode it as such. Simplify erorr handling a little as
well and fix a return type-mismatch that doesn't matter for the
generated code (return NULL is the same as return false in this
context)

Sponsored by: Netflix
2023-03-02 11:12:10 -07:00
Warner Losh
35b4acad2f kboot: Use MIN instead of min
MIN works for any type, while min() is only for integers. So we were
rounding down to 0 since that's the size of 4GB truncated to an int.

Sponsored by: Netflix
2023-03-02 11:12:10 -07:00
Warner Losh
3a616b10d8 kboot: Better default boot device
Provide a better message when we can't find a boot device.

Sponsored by: Netflix
2023-03-02 11:12:09 -07:00
Warner Losh
6c47abb63b kboot: Hack for running on FreeBSD host
When we're running on a FreeBSD host, we can't open /proc/iomem.  So,
for now, just assume that we have 32GB of ram starting at 4GB.

Sponsored by: Netflix
2023-03-02 11:12:09 -07:00
Elyes Haouas
de1a17db89 moused: Fix typos
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2023-03-02 11:53:44 -05:00
Stéphane Rochoy
2c1b8eb29d ftgpio: Fix panic at attach and use better device description
Use ftgpio_group_get_status instead of inlining an imperfect
version of it to get correct register and avoid
panic: ftgpio_group_get_ioreg: invalid register 0 for group 0

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/677
2023-03-02 08:17:04 -07:00
Elyes Haouas
ae90e9a9d6 yp_mkdb: Remove useless return at the end of void function
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/656
2023-03-02 08:01:39 -07:00
Elyes Haouas
0715ec7eb4 usbconfig: Remove useless return at the end of void function
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/656
2023-03-02 08:01:39 -07:00
Elyes Haouas
0fd15eb335 rrenumd: Remove useless return at the end of void function
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/656
2023-03-02 08:01:39 -07:00
Elyes Haouas
fce4b0c51d rpcbind: Remove useless return at the end of void function
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/656
2023-03-02 08:01:39 -07:00
Elyes Haouas
c7846853d3 rpc.yppasswdd: Remove useless return at the end of void function
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/656
2023-03-02 08:01:39 -07:00
Elyes Haouas
ca2edebb92 pmcstat: Remove useless return at the end of void function
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/656
2023-03-02 08:01:39 -07:00
Elyes Haouas
1def31df76 lpr: Remove useless return at the end of void function
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/656
2023-03-02 08:01:28 -07:00
Elyes Haouas
a5aa07dd85 extattr: Remove useless return at the end of void function
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/656
2023-03-02 07:59:13 -07:00
Elyes Haouas
86cda797bd diskinfo: Remove useless return at the end of void function
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/656
2023-03-02 07:59:12 -07:00
Elyes Haouas
b23e15e1c8 dconschat: Remove useless return at the end of void function
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/656
2023-03-02 07:59:11 -07:00
Elyes Haouas
beb2af45bd bluetooth/hccontrol: Remove useless return at the end of void function
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/656
2023-03-02 07:59:10 -07:00
Baptiste Daroussin
0ba66872be uuidgen(1): back to the past and fix typo
Reported by:	ceri
2023-03-02 09:37:03 +01:00
Ihor Antonov
129ec8f480 daemon: more human-friendly variable names
Reviewed by:	kevans
Pull Request:	https://github.com/freebsd/freebsd-src/pull/669
2023-03-01 21:00:43 -06:00
Ihor Antonov
6f0636728b daemon: move syslog facility and syslog tag into log_params
Since struct log_params already contains logging-related
varaiables, including syslog-related, move remaining
syslog-related variables into struct log_params as well

Reviewed by:	kevans
Pull Request:	https://github.com/freebsd/freebsd-src/pull/669
2023-03-01 21:00:42 -06:00
Ihor Antonov
e70444c622 daemon: deduplicate log_params varaibles
While we're here, sort log_params by size.

Reviewed by:	kevans
Pull Request:	https://github.com/freebsd/freebsd-src/pull/669
2023-03-01 21:00:42 -06:00
Ihor Antonov
97022e90c3 daemon: make log_reopen variable a bool
Following style(9) and C99 recommendation use bool instead of
int for boolean operations.

Reviewed by:	kevans
Pull Request:	https://github.com/freebsd/freebsd-src/pull/669
2023-03-01 21:00:42 -06:00
Ihor Antonov
f2f9d31d9f daemon: make dosyslog variable a bool and give it a better name
Following style(9) and C99 recommendation use bool instead of
int for boolean operations. Also give the variable a more descriptive
name that follows boolean naming convention.

Reviewed by:	kevans
Pull Request:	https://github.com/freebsd/freebsd-src/pull/669
2023-03-01 21:00:42 -06:00
Ihor Antonov
203df05b69 daemon: add supervision_enabled var
explicitly name a bunch of boolean checks that enable
supervison mode and improve comments

Reviewed by:	kevans
Pull Request:	https://github.com/freebsd/freebsd-src/pull/669
2023-03-01 21:00:42 -06:00
Ihor Antonov
259ed21d21 daemon: initialize struct sigaction at declaration site
This improves readability by uncluttering the code

Reviewed by:	kevans
Pull Request:	https://github.com/freebsd/freebsd-src/pull/669
2023-03-01 21:00:42 -06:00
Ihor Antonov
91b921c7d4 daemon: fix double init of pid variable
Reviewed by:	kevans
Pull Request:	https://github.com/freebsd/freebsd-src/pull/669
2023-03-01 21:00:42 -06:00
Ihor Antonov
84866cefdf daemon: initialize mask_orig with sigemptyset()
consolidation of variable declarations and initializations in previous
commit allowed me to detect that one of the signal masks is not properly
initialized with sigemptyset (as man 3 sigsetops demands)

Reviewed by:	kevans
Pull Request:	https://github.com/freebsd/freebsd-src/pull/669
2023-03-01 21:00:41 -06:00
Ihor Antonov
e745dc2287 daemon: consolidate variable declarations and initializaions
- improve readability by breaking apart single-line multi-variable declarations
- initialize simple variables at declaration site
- move other top-level variable initializations closer declarations
  to avoid potential UB and unclutter the use-site.

Reviewed by:	kevans
Pull Request:	https://github.com/freebsd/freebsd-src/pull/669
2023-03-01 21:00:41 -06:00
Ihor Antonov
6b4ef4b16a daemon: use braces with 'if' consistently
Reviewed by:	kevans
Pull Request:	https://github.com/freebsd/freebsd-src/pull/669
2023-03-01 21:00:41 -06:00
Ed Maste
ceb5f28ba5 freebsd-update: re-edit files if merge conflict markers remain
freebsd-update will open ${EDITOR} if conflicts occur while merging
updates to config files.  Inform the user if they've left conflict
markers behind, and go back to editing the file.

PR:		185546
PR:		229689
Reviewed by:	delphij
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37703
2023-03-01 20:20:33 -05:00
Ed Maste
c5e54e56e6 tools/build: Hide spurious errors if sys/stat.h does not exist
Reviewed by:	brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D38757
2023-03-01 19:59:26 -05:00
Warner Losh
005cca8361 Fix typo: messages missing an 'a'. 2023-03-01 16:34:43 -07:00