aboutsummaryrefslogtreecommitdiff
path: root/libexec
Commit message (Collapse)AuthorAgeFilesLines
* Revert "rtld: Add arm64 variant pcs tests"Andrew Turner2024-05-178-247/+0
| | | | | | It's missing an mtree update This reverts commit 9e48c30e25a743a268d17a6215b9c2d859543547.
* rtld: Move powerpc specific code to powerpc filesAndrew Turner2024-05-176-25/+28
| | | | | | | | | | | There are two variables set by dynamic tags in the powerpc runtime linker. Now we have a way to split out architecture-specific dynamic tags use it to handle these. Reviewed by: kib, jhibbits Obtained from: jhibbits (earlier version) Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45182
* rtld: Add arm64 variant pcs testsAndrew Turner2024-05-178-0/+247
| | | | | | | | | | When marking a function as variant pcs we can use registers not normally used in procedure calls. Add a test that uses this and stores all general purpose registers to a buffer and compare this buffer with the expected value later. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D44870
* rtld: Add support for arm64 variant pcsAndrew Turner2024-05-172-5/+51
| | | | | | | | | | | | | | The aarch64 ELF spec has support for a variant of the normal procedure call standard that doesn't follow the normal register convention, e.g. using more registers as arguments, or different register state is preserved. Add support to rtld to handle this. As we don't know which registers need to be preserved disable lazy binding for these functions. Reviewed by: kib Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D44869
* rtld: Add arch_digest_dynamicAndrew Turner2024-05-178-0/+24
| | | | | | | | This will be used to handle the DT_AARCH64_VARIANT_PCS tag. Reviewed by: kib Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45117
* rtld: Add MD_OBJ_ENTRY to extend Struct_Obj_EntryAndrew Turner2024-05-178-0/+16
| | | | | | | | | Add a macro the architectures can use to add per-arch fields to Struct_Obj_Entry. Reviewed by: kib Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45116
* nuageinit: by default to not enable nuageinitBaptiste Daroussin2024-05-141-0/+1
| | | | | MFC After: 1 day Reported by: karels@
* Add a build knob for _FORTIFY_SOURCEKyle Evans2024-05-131-0/+4
| | | | | | | | | | | | | | | | | In the future, we will Default to _FORTIFY_SOURCE=2 if SSP is enabled, otherwise default to _FORTIFY_SOURCE=0. For now we default it to 0 unconditionally to ease bisect across older versions without the new symbols, and we'll put out a call for testing. include/*.h include their ssp/*.h equivalents as needed based on the knob. Programs and users are allowed to override FORTIFY_SOURCE in their Makefiles or src.conf/make.conf to force it off. Reviewed by: des, markj Relnotes: yes Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D32308
* tftpd: silence gcc overflow warningsDag-Erling Smørgrav2024-05-101-14/+29
| | | | | | | | | | | | | | | | | | | | | | | GCC 13 complains that we might be writing too much to an on-stack buffer when createing a filename. In practice there is a check that filename isn't too long given the time format and other static characters so GCC is incorrect, but GCC isn't wrong that we're potentially trying to put a MAXPATHLEN length string + some other characters into a MAXPATHLEN buffer (if you ignore the check GCC can't realistically evaluate at compile time). Switch to snprintf to populate filename to ensure that future logic errors don't result in a stack overflow. Shorten the questionably named yyyymmdd buffer enough to slience the warning (checking the snprintf return value isn't sufficent) while preserving maximum flexibility for admins who use the -F option. MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D45086
* tftpd: Satisfy clang-analyzer.Dag-Erling Smørgrav2024-05-104-16/+12
| | | | | | | | | | | * Replace `random()` with `arc4random()`. * Change some variable types. * Drop some unused assignments. MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: imp, markj Differential Revision: https://reviews.freebsd.org/D45132
* tftpd: Add missing include.Dag-Erling Smørgrav2024-05-101-0/+1
| | | | | | | | | This went unnoticed due to namespace pollution in our headers. MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D45131
* tftpd: Drop unneeded includes.Dag-Erling Smørgrav2024-05-105-5/+0
| | | | | | | MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: imp, markj Differential Revision: https://reviews.freebsd.org/D45130
* tftpd: Add missing `-S` option to synopsis.Dag-Erling Smørgrav2024-05-101-3/+3
| | | | | | | MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: imp, markj Differential Revision: https://reviews.freebsd.org/D45129
* at cron file is now in /etc/cron.dPaweł Krawczyk2024-05-101-1/+1
| | | | | | PR: 243380 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1106
* New sysctl to disable NOMATCH until devmatch runsIsaac Cilia Attard2024-05-101-0/+1
| | | | | | | | | | | | | | | | | | | Introduce hw.bus.devctl_nomatch_enabled and use it to suppress NOMATCH until devmatch runs There's a lot of NOMATCH events generated at boot. We also run devmatch once during early boot to load unmatched devices. To avoid redundant work, don't start generating NOMATCH events until after devmatch runs. Set hw.bus.devctl_nomatch_enabled=1 just before we run devmatch. The kernel will suppress NOMATCH events until this is set to true. This saves about 170ms from the boot on aarch64 running atop Apple M-series processors and the VMWare Fusion hypervisor. Reviewed by: imp, cperciva MFC after: 3 days Sponsored by: Google Summer of Code Pull Request: https://github.com/freebsd/freebsd-src/pull/1213
* Remove cross-references to GBDEPoul-Henning Kamp2024-05-071-1/+0
|
* Remove documentation of GBDE rc supportPoul-Henning Kamp2024-05-071-1/+0
|
* Remove GBDE rc supportPoul-Henning Kamp2024-05-072-125/+0
|
* packages: add package for NTPLexi Winter2024-05-041-2/+4
| | | | | Reviewed by: imp, manu Pull Request: https://github.com/freebsd/freebsd-src/pull/1193
* tftpd: Untangle a conditional.Dag-Erling Smørgrav2024-04-301-4/+5
| | | | | | | MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D45026
* Remove remnants of portsnap(8)Olivier Certner2024-04-301-7/+4
| | | | | | | | | | | | | | | | | | | This was prompted by noticing that '/var/db/portsnap' still exists on newly-installed machines. With this change, all mentions of portsnap(8) in the tree are gone, except for the historical note in the AUTHORS section of manpage phttpget(8). locate(1) will thus start indexing again '/var/db/portsnap' on machines where this directory still exists, which may be a good way to push administrators to delete it. Reviewed by: cperciva Approved by: emaste (mentor) MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45023
* rtld.1: clarify interaction between -u and -oKonstantin Belousov2024-04-301-1/+3
| | | | | Sponsored by: The FreeBSD Foundation MFC after: 1 week
* rtld direct exec: make -u behavior match the descriptionKonstantin Belousov2024-04-301-1/+4
| | | | | | | | | Instead of only ignoring insecure env vars, clear them all. Reviewed by: emaste, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44999
* rtld: add direct-exec option -oKonstantin Belousov2024-04-302-1/+49
| | | | | | | | | | | allowing to set any known LD_ parameter for the current rtld invocation, but without polluting the activated' binary environment. In other words, the set parameter is not exported into the environment. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44988
* package: move OpenBSM auditing into its own packageLexi Winter2024-04-291-1/+1
| | | | | | | | | | | Move auditing runtime (auditd, etc.) into the new FreeBSD-audit package. Also move the runtime OpenBSM manual pages from libbsm into auditd so they get installed with the right package. Add an UPDATING entry noting the new packages. Reviewed by: imp, manu Pull Request: https://github.com/freebsd/freebsd-src/pull/1197
* rtld snprintf: do not erronously skip a char at the buffer boundaryKonstantin Belousov2024-04-281-4/+3
| | | | | | | Reviewed by: emaste, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44987
* tftpd: Immediately reject any request shorter than 4 bytes.Dag-Erling Smørgrav2024-04-252-0/+24
| | | | | | | MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D44957
* tftpd: Check the server status after each test.Dag-Erling Smørgrav2024-04-251-2/+42
| | | | | | | | | | | | | | | | | * In the setup phase, wait for the server to start (or fail to start) before proceeding with the test. This makes it possible to write test cases that don't expect a response from the server without ending up in a race over the server PID file. * After running each test, wait up to 30 seconds for the server to exit and check that the exit status matches what the test case says to expect (usually 0). * We still kill and collect the server in the cleanup phase, in case the test ended early. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D44956
* tftpd: Clean up the tests.Dag-Erling Smørgrav2024-04-251-125/+128
| | | | | | | MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D44955
* tftpd: Use `size_t` where appropriate.Dag-Erling Smørgrav2024-04-254-32/+42
| | | | | | | | | | * Limit the use of `ssize_t` to only where it's needed. * Correct one case of `int` being used for a length. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D44954
* kdc: Add restart optionCy Schubert2024-04-242-2/+29
| | | | | | | | | | | | | | | | Add a new kdc_restart rc variable that manages kdc (or krb5kdc) under daemon(8). This automatically restarts the kdc should it fail, i.e. when it's configured to use LDAP as a backend and cannot connect to its LDAP directory. Set kdc_restart="YES" to auto restart kdc on abnormal termination. Set kdc_restart_delay="N" to the number of seconds to delay before restarting the kdc. The daemon(8) default seconds applies when not set. Reported by: Lexi Winter <lexi.freebsd@le-fay.org> PR: 278395 Differential Revision: https://reviews.freebsd.org/D44898
* nfsserver: Default to nfs_reserved_port_only="YES"Mark Johnston2024-04-231-1/+1
| | | | | | | | | | | | | | | | | | | This setting causes the NFS server to check that all RPCs are sent from a privileged (<= 1023) port, rejecting those that are not. This slightly raises the bar for a user with network access to an unauthenticated NFS server to access exported NFS filesystems. Users that use traditional NFS clients (e.g., those provided by FreeBSD or Linux) should not see any difference, assuming that unprivileged filesystem mounting is disallowed. Note that the setting is per-VNET, so may be overridden in VNET jails without affecting the rest of the system. Discussed with: freebsd-arch@ Reviewed by: rmacklem, bz, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D44906
* package: move cron into its own packageLexi Winter2024-04-231-1/+4
| | | | | Reviewed by: imp, manu, Mina Galic Pull Request: https://github.com/freebsd/freebsd-src/pull/1172
* rtld(1): minor clarification for LD_STATIC_TLS_EXTRAKonstantin Belousov2024-04-201-2/+5
| | | | | | | Also properly style the paragraph. Sponsored by: The FreeBSD Foundation MFC after: 3 days
* package: move lpr into its own packageLexi Winter2024-04-191-1/+3
| | | | | Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1171
* nuageinit: start the script after zfsBaptiste Daroussin2024-04-171-1/+1
| | | | | It prevents the home directory for the new users to be hidden by late mount of the home directory
* defaults/rc.conf: Remove /usr/lib32 from ldconfig32_pathsJohn Baldwin2024-04-121-1/+1
| | | | | | | | | | | Commit 99132daf6f70cb0cc969c555d3612547fa3cf1db prepends /usr/lib32 to the list of paths in ldconfig32_paths since it is a standard library path in ld-elf32.so.1. Remove /usr/lib32 from the value in rc.conf so that it is not listed twice. Reviewed by: olce, kib Sponsored by: University of Cambridge, Google, Inc. Differential Revision: https://reviews.freebsd.org/D44752
* rc.d/ldconfig: Compute ldconfig paths in a functionKonrad Witaszczyk2024-04-121-26/+29
| | | | | | | | | Move logic that computes paths passed to ldconfig(8) to a ldconfig_paths() function that can be called for multiple ABIs. Reviewed by: olce, kib Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D44751
* Support BTI in rtldAndrew Turner2024-04-129-0/+70
| | | | | | | | | Read the elf note to decide when to set the guard page on arm64. Reviewed by: kib Sponsored by: Arm Ltd Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39452
* dma.conf: Fix typoMikael Urankar2024-03-271-1/+1
| | | | Pull Request: https://github.com/freebsd/freebsd-src/pull/1150
* rtld: reduce debug messages after fix on big-endian hostsStefan Eßer2024-03-221-5/+3
| | | | | | | Remove a debug message that had been added to support the debugging of a mis-detection of the hint files endianness on powerpc64. MFC after: 3 days
* rtld: fix check for endianess of elf hints fileMichael Tuexen2024-03-221-2/+2
| | | | | | | | | | Don't check if the elf hints file is in host byte order, but check if it is in little endian by looking at the magic number. This fixes rtld on big endian platforms. Reviewed by: se, kib (prior version of the patch) Fixes: 7b77d37a561b ("rtld-elf: support either byte-order of hints") MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D44472
* rtld-elf: add some debug print statementsStefan Eßer2024-03-211-0/+5
| | | | | | The byte-order independent code has been reported to fail on powerpc64. Add some more debug statements to help identify the parametrs used and to verify the correct operation of the byte-swap macros used..
* rc.initdiskless: Disable soft-updates in mdmfs (again)Jose Luis Duran2024-03-201-2/+2
| | | | | | | | | | | | Re-apply the -S switch to disable soft-updates in memory disks (commit 8b1292ac5219). This might be beneficial when tmpfs(5) is not present in the kernel, as this can cause mdmfs(8)'s auto keyword to fallback to using md(4). PR: 85558 MFC after: 1 week Reviewed by: imp, emaste, brooks Differential Revision: https://reviews.freebsd.org/D43242
* nuageinit: be case insentive when looking got labelsBaptiste Daroussin2024-03-151-2/+2
| | | | Reported by: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
* nuageinit: add basic support for cloudinit.Baptiste Daroussin2024-03-1518-0/+1677
| | | | | | | | | | | | | | | | | | | | | | | | | | | | this is a very early script to support cloudinit, it does not intend to be a full featured cloudinit client, but will support a good enough subset to be viable in most case. It support nocloud and openstack config-2 config drive mode (iso9660 or msdosfs) The following features are currently supported: - adding users (including a default user named 'freebsd' with password 'freebsd' - adding groups - adding ssh keys - static ipv4, static ipv6, dynamic ipv4 With this one is able to use the 'bring your own image feature" out of box. It is expected that the script grows the support of other clouds supporting cloud-init, contributions are welcomed. It is designed to be only run once via the firstboot mecanism. Sponsored by: OVHCloud MFC After: 3 weeks Differential Revision: https://reviews.freebsd.org/D44141
* rtld: use generated map file to check for some leaks from libc into rtldKonstantin Belousov2024-02-291-0/+19
| | | | | | | Reviewed by: brooks, emaste (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44136
* rtld: unconditionally generate map file during buildKonstantin Belousov2024-02-291-0/+6
| | | | | | | | | | | It is needed at least to ensure that undesirable code is not linked into rtld from libsys/libc, and adding the map file option each time is not productive. Reviewed by: brooks, emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44136
* rc: Set var_run_enable to enable by defaultEmmanuel Vadot2024-02-282-7/+2
| | | | | | | | | | This will load/save the /var/run directories at boot/shutdown if and only if /var/run/ is a tmpfs mount so it is a win for tmpfs users and a no-op for everyone else. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D44097 Sponsored by: Beckhoff Automation GmbH & Co. KG
* rtld-elf: support either byte-order of hints fileStefan Eßer2024-02-261-16/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | Accept either little-endian or big-endian representation of the ELF hints magic number in the header of a hints file and convert the parameters to the native byte-order of the repsective system. This is a pre-requisite for a planned change to always write the byte order in little-endian format on all architectures. The only relvant architecture that uses big-endian data is powerpc64, and it is not likely that new architectures will choose that representation of data in memory. When all supported architectures use little-endian data in the hints file, the byte swap logic can be enabled for big-endian CPUs at compile time. Up to that point, there is a very small run-time penalty that is paid on all systems to check the byte-order of the hints file and to provide the option to byte-swap the parameters read from the hints file header. This commit contains the changes from review D44080 (which had been split off from this patch for easier review), Reviewed by: kib MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D44053