aboutsummaryrefslogtreecommitdiff
path: root/include/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* Import _FORTIFY_SOURCE implementation from NetBSDKyle Evans2024-05-131-1/+1
| | | | | | | | | | | | This is a mostly-unmodified copy of the various *_chk implementations and headers from NetBSD, without yet modifying system headers to start actually including them. A future commit will also apply the needed bits to fix ssp/unistd.h. Reviewed by: imp, pauamma_gundo.com (both previous versions), kib Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D32306
* nvmf: Install nvmf.h and nvmf_proto.h in /usr/include/dev/nvmfJohn Baldwin2024-05-021-0/+6
| | | | | | Reviewed by: imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D44707
* include: Ensure security/audit/audit.h gets staged properly.Stephen J. Kiernan2024-04-041-4/+4
| | | | | | | | | | | | | | | | There is a conflict between bsm/audit.h and security/audit/audit.h due to the way that staging is being set up using .PATH to point to the full directory and the leaf files being specified in the list. Due to this, the bsm/audit.h was getting staged as both bsm/audit.h and security/audit/audit.h since the sys/bsm directory is listed first in the .PATH list. Use sys/security in the .PATH instead of sys/security/audit and specify the audit header files as audit/<name>.h. This ensures that we get the correct audit.h stanged for security/audit/audit.h. Reviewed by: sjg Obtained from: Juniper Networks, Inc.
* include: Allow SDESTDIR to be overriddenStephen J. Kiernan2024-03-271-1/+1
| | | | | | Obtained from: Juniper Networks, Inc. Reviewed by: sjg Differential Revision: https://reviews.freebsd.org/D44540
* include: Remove ancient SCCS tags.Warner Losh2023-11-271-2/+0
| | | | | | | | Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script. Sponsored by: Netflix
* pf: convert state retrieval to netlinkAlexander V. Chernikov2023-10-101-1/+2
| | | | | | | | | | | | | | | | | | | | Use netlink to export pf's state table. The primary motivation is to improve how we deal with very large state stables. With the previous implementation we had to build the entire list (both in the kernel and in userspace) before we could start processing. With netlink we start to get data in userspace while the kernel is still generating more. This reduces peak memory consumption (which can get to the GB range once we hit millions of states). Netlink also makes future extension easier, in that we can easily add fields to the state export without breaking userspace. In that regard it's similar to an nvlist-based approach, except that it also deals with transport to userspace and that it performs significantly better than nvlists. Testing has failed to measure a performance difference between the previous struct-copy based ioctl and the netlink approach. Differential Revision: https://reviews.freebsd.org/D38888
* pkgbase: Move headers and libs out of runtime and utilitiesDoug Rabson2023-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | Headers from src/include were in the runtime-dev package but subdirectories of src/include ended up in utilities-dev by default. Neither package is a good choice - the headers in src/include are not useful without the libraries contained in clibs-dev. This moves the standard C headers to clibs-dev (C++ headers are already in this package). While working on this, I found that various clang libraries and headers were also bundled into utilities-dev by default so these are also moved to clang-dev. I also added a FreeBSD-build-essential meta package to make it simple to install all the toolchain parts. PR: 254173 Reviewed byb: manu MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41815
* include: Implement N2867.Dag-Erling Smørgrav2023-09-071-1/+1
| | | | | | | This adds macros for checked addition, subtraction, and multiplication with semantics similar to the builtins gcc and clang have had for years. Reviewed by: kib, emaste Differential Revision: https://reviews.freebsd.org/D41734
* Add mac_grantbylabelSimon J. Gerraty2023-08-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | This module allows controlled privilege escallation via mac labels securely associated with a process via mac_veriexec. There are over 700 PRIV_* but we can compress many of them into a single GBL_* thus constraining the size of gbl labels. The goal is to allow a daemon to run as an unprivileged process while still being able a set of privileged operations needed. We add APIs to libveriexec so that userland processes can check labels and an exec_script API that allows a suitably labeled process to run something like a python interpreter directly if necessary; overcomming the 'indirect' flag applied to the interpreter. Add -l option to sbin/veriexec to report labels. Reviewed by: stevek Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D41431
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* arm64 lib32: prepare arm64 headers to redirect to armMike Karels2023-07-251-4/+9
| | | | | | | | | | | | | | | | | | | | | | | In order to compile lib32 libraries and other 32-bit code on arm64, <machine/foo.h> needs to be redirected to an arm header rather than arm64 when building with -m32. Ifdef the arm64 headers that are installed in /usr/include/machine and used by user-level software (including references from /usr/include/*.h) so that if __arm__ is defined when including the arm64 version, <arm/foo.h> is included rather than using the rest of the file's contents. Some arm headers had no arm64 equivalent; headers were added just to do the redirection. These files use #error if __arm__ is not defined to guard against confusion. Also add an include/arm Makefile, and modify Makefiles as needed to install everything, including the arm files in /usr/include/arm. fenv.h comes from lib/msun/arm/fenv.h. The new arm64 headers are: acle-compat.h cpuinfo.h sysreg.h Reviewed by: jrtc27, imp Differential Revision: https://reviews.freebsd.org/D40944
* nvme: Don't install nvme_private.h in /usr/include.John Baldwin2023-06-271-1/+6
| | | | | | Reviewed by: chuck, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D40394
* includes: avoid installing if_wg.h twiceEd Maste2023-05-101-2/+2
| | | | | | | | | | | if_wg.h was installed via dev/wg in LSUBDIRS and also explicitly. We want to install only wg/if_wg.h not the other headers, so add dev/wg to the skip list in the copies and symlinks targets. PR: 271266 Reviewed by: kevans Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40031
* include: add a check-ldirs targetBrooks Davis2023-04-191-0/+13
| | | | | | | This target ensures all LDIRS, LSUBDIRS, and LSUBSUBDIRS actually exist. Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D39006
* include: Remove no longer existing netgraph/atmMichael Butler2023-03-091-1/+1
| | | | | Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D39005
* byteswap.h: Add a glibc/linux compatible byteswap.hWarner Losh2023-01-201-1/+2
| | | | | | | | | | | | For endian.h to work instead of sys/endian.h, some software needs byteswap.h available. It must define {__,}byteswap_{16,32,64}. Included sys/_endian.h to get an appropriate __byteswap16, etc and defines the new macros in terms of them. Enhance _endian.h to allow it to be included from here too. Sponsored by: Netflix Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D32051
* linux: For better compatibility, provide compatible endian.hWarner Losh2023-01-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Add endian.h. This includes sys/endian.h and then adds extra defines that glibc defines with double underscores for our _{BIG,BYTE,LITTLE,PDP}_ENDIAN macros. We also define __FLOAT_WORD_ORDER to be the same as _BYTE_ENDIAN since FreeBSD doesn't currently define this, and the default with glibc is exactly this for our platforms. Move common parts of endian.h and sys/endian.h into sys/_endian.h to limit namespace pollution from endian.h All this gives us good compatibility with Linux. There may be one or two upstreams that haven't integrated the patches I tried to send up. There are some minor differences: o The extra glibc macros are not defined. These are all controlled with either __ at the start, or only defined when glibc is being built. We also don't define macros that are used internally in glibc that would pollute the namespace. o For complete compatibility, this change must also be paired with providing a glibc-compatible byteswap.h. Sponsored by: Netflix Reviewed by: mhorne, markj, jhb Differential Revision: https://reviews.freebsd.org/D31962
* include: put includes into -dev packagesKyle Evans2022-11-101-7/+7
| | | | | | | | | | | | | | | | | | | The includes build is kind of funky, as we support either copying or symlinking files into /usr/include. For `copies`, we were supplying the include/ ${TAG_ARGS}, which puts packages into `FreeBSD-runtime`, without any consideration to the fact that we're installing headers. Let's copy the approach that the `symlinks` target uses for now, and add ",dev" to the TAG_ARGS so that headers at least end up in FreeBSD-runtime-dev, which is more appropriate. Some of these includes are actually technically supposed to be in *other* packages and their INCSGROUP's PACKAGE setting is actually correct, but this is less trivial to solve. This is a bandaid to fix the immediate problem of some headers ending up in two different packages. PR: 267526 Reviewed by: dfr, manu Differential Revision: https://reviews.freebsd.org/D37256
* Import the WireGuard driver from zx2c4.com.John Baldwin2022-10-281-2/+7
| | | | | | | | | | | | | | | This commit brings back the driver from FreeBSD commit f187d6dfbf633665ba6740fe22742aec60ce02a2 plus subsequent fixes from upstream. Relative to upstream this commit includes a few other small fixes such as additional INET and INET6 #ifdef's, #include cleanups, and updates for recent API changes in main. Reviewed by: pauamma, gbe, kevans, emaste Obtained from: git@git.zx2c4.com:wireguard-freebsd @ 3cc22b2 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D36909
* netlink: add headers installationAlexander V. Chernikov2022-10-011-1/+2
|
* amd64: add an i386 include directoryBrooks Davis2022-06-131-0/+7
| | | | | | | | | | | | | | This directory will hold i386-specific headers that are needed for -m32 support on amd64 and where the amd64 and i386 cases have too little in common for combining them to make sense. Files to be installed will come in later commits. With the currently required set of files, this could be done with another INCGROUP in include/Makefile, but at least one file that might want -m32 support (ieeefp.h) conflicts with a files installed in /usr/include. Reviewed by: jhb, imp
* Create a new GEOM utility, gunion(8).Kirk McKusick2022-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The gunion(8) utility is used to track changes to a read-only disk on a writable disk. Logically, a writable disk is placed over a read-only disk. Write requests are intercepted and stored on the writable disk. Read requests are first checked to see if they have been written on the top (writable disk) and if found are returned. If they have not been written on the top disk, then they are read from the lower disk. The gunion(8) utility can be especially useful if you have a large disk with a corrupted filesystem that you are unsure of how to repair. You can use gunion(8) to place another disk over the corrupted disk and then attempt to repair the filesystem. If the repair fails, you can revert all the changes in the upper disk and be back to the unchanged state of the lower disk thus allowing you to try another approach to repairing it. If the repair is successful you can commit all the writes recorded on the top disk to the lower disk. Another use of the gunion(8) utility is to try out upgrades to your system. Place the upper disk over the disk holding your filesystem that is to be upgraded and then run the upgrade on it. If it works, commit it; if it fails, revert the upgrade. Further details can be found in the gunion(8) manual page. Reviewed by: Chuck Silvers, kib (earlier version) tested by: Peter Holm Differential Revision: https://reviews.freebsd.org/D32697
* ipfilter: Move kernel bits to netpfilCy Schubert2021-12-201-2/+2
| | | | | | | | | | | | | | | | Through fixes and improvements our ipfilter sources have diverged enough to warrant move from contrib into sys/netpil. Now that I'm planning on implementing MSS clamping as in iptables it makes more sense to move ipfilter to netpfil. This is the first of three commits the ipfilter move. Suggested by glebius on two occaions. Suggested by and discussed with: glebius Reviewed by: glebius, kp (for #network) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D33510
* Add real sched.hKonstantin Belousov2021-11-101-2/+3
| | | | | | | | | | | | | | It is required by IEEE Std 1003.1-2008 AKA POSIX. Put some Linux compatibility stuff under BSD_VISIBLE namespace, in particular, sys/cpuset.h definitions. Also, if user really want Linux compatibility, she can request cpu_set_t typedef with _WITH_CPU_SET_T define. Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D32901
* an: Remove driverEmmanuel Vadot2021-06-111-1/+1
| | | | | | | | | Last an(4) devices have been End Of Life and End Of Sale in 2007. Time to remove this driver. Differential Revision: https://reviews.freebsd.org/D30679 Reviewed by: imp (earlier version), emaste (earlier version) Sponsored by: Diablotin Systems
* Fix build with WITHOUT_AUDIT=yes in src.confEmmanuel Vadot2021-04-151-5/+2
| | | | | | | | Always install the audit related includes are some part of the source always requires them. Reported by: many Fixes: 8c3eaf244a417a4
* Only symlink cryptodev.h into /usr/include/crypto/John Baldwin2021-03-191-4/+1
| | | | | | | I missed updating the symlink side in the earlier commit. Fixes: 283352dd4f6a3bb2f3c7cb45ce5dca3d86f5e3f4 MFC after: 1 week
* base: remove if_wg(4) and associated utilities, manpageKyle Evans2021-03-171-7/+2
| | | | | | | | | | | | After length decisions, we've decided that the if_wg(4) driver and related work is not yet ready to live in the tree. This driver has larger security implications than many, and thus will be held to more scrutiny than other drivers. Please also see the related message sent to the freebsd-hackers@ and freebsd-arch@ lists by Kyle Evans <kevans@FreeBSD.org> on 2021/03/16, with the subject line "Removing WireGuard Support From Base" for additional context.
* Revert "include: Remove symlink installation"Emmanuel Vadot2021-03-161-9/+108
| | | | This reverts commit 0006530aa14b9df56f88df7d819fae89b115d865.
* Revert "include: Tag directly the last headers"Emmanuel Vadot2021-03-161-8/+8
| | | | This reverts commit 839fc8cdf9b6bafe120e7da8a4b78950ad7295c4.
* include: Tag directly the last headersEmmanuel Vadot2021-03-161-8/+8
| | | | | | | | | We cannot easily used the TAG here and we don't yet have something to install even .h from a diretory in bsd.prog.mk Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D29170 MFC after: 2 weeks
* include: Remove symlink installationEmmanuel Vadot2021-03-161-108/+9
| | | | | | | | | | | | | | headers could be installed as symlink to the source tree instead of copies. Remove the possibility to do that. This make the makefile easier to read and to maintain and also don't duplicate code. While here remove some directories from LSBUDIRS as we already install them using the INCS stuff. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D29167 MFC after: 2 weeks
* pkgbase: Install all cam includes with INCSEmmanuel Vadot2021-03-161-3/+54
| | | | | | | | Now they are correctly taggued and put into the -dev package Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D29166 MFC after: 2 weeks
* pkgbase: Install all BSM includes with INCSEmmanuel Vadot2021-03-161-2/+25
| | | | | | | | Now they are correctly taggued and put them into the libbsm package Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D29165 MFC after: 2 weeks
* Stop installing kernel-only crypto headers to /usr/include/crypto.John Baldwin2021-03-161-15/+1
| | | | | | | | The only user-facing header from OCF is <crypto/cryptodev.h>. PR: 254167 (exp-run) MFC after: 1 week Sponsored by: Chelsio Communications
* if_wg: import latest fixup work from the wireguard-freebsd projectKyle Evans2021-03-151-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the culmination of about a week of work from three developers to fix a number of functional and security issues. This patch consists of work done by the following folks: - Jason A. Donenfeld <Jason@zx2c4.com> - Matt Dunwoodie <ncon@noconroy.net> - Kyle Evans <kevans@FreeBSD.org> Notable changes include: - Packets are now correctly staged for processing once the handshake has completed, resulting in less packet loss in the interim. - Various race conditions have been resolved, particularly w.r.t. socket and packet lifetime (panics) - Various tests have been added to assure correct functionality and tooling conformance - Many security issues have been addressed - if_wg now maintains jail-friendly semantics: sockets are created in the interface's home vnet so that it can act as the sole network connection for a jail - if_wg no longer fails to remove peer allowed-ips of 0.0.0.0/0 - if_wg now exports via ioctl a format that is future proof and complete. It is additionally supported by the upstream wireguard-tools (which we plan to merge in to base soon) - if_wg now conforms to the WireGuard protocol and is more closely aligned with security auditing guidelines Note that the driver has been rebased away from using iflib. iflib poses a number of challenges for a cloned device trying to operate in a vnet that are non-trivial to solve and adds complexity to the implementation for little gain. The crypto implementation that was previously added to the tree was a super complex integration of what previously appeared in an old out of tree Linux module, which has been reduced to crypto.c containing simple boring reference implementations. This is part of a near-to-mid term goal to work with FreeBSD kernel crypto folks and take advantage of or improve accelerated crypto already offered elsewhere. There's additional test suite effort underway out-of-tree taking advantage of the aforementioned jail-friendly semantics to test a number of real-world topologies, based on netns.sh. Also note that this is still a work in progress; work going further will be much smaller in nature. MFC after: 1 month (maybe)
* Remove xform_poly1305.h from the build, it is not necessary.Scott Long2021-03-051-2/+1
|
* Fix make includes path to nvpair.hAlex Richardson2021-01-191-1/+1
| | | | Fixes a typo introduced in 9e5787d2284e187abb5b654d924394a65772e004
* include: Delete stale symlinks using find(1) instead of a shell loop.Alex Richardson2021-01-191-14/+7
| | | | | | | This reduces the number of execve() syscalls during make includes by 88. Reviewed By: jhb Differential Revision: https://reviews.freebsd.org/D27622
* pccard: Remove wi(4) driverWarner Losh2021-01-081-1/+1
| | | | | | | | | Remove wi(4). pccard is going away, and wi only supports PC Card devices, though it has a minor amount of glue to also support PCI cards. However, removing the one without removing the other is hard, so the whole driver is being removed. Relnotes: Yes
* hid: Import hidraw(4) - driver for access to raw HID device dataVladimir Kondratyev2021-01-071-2/+4
| | | | | | | | | | | | This driver provides raw access to HID devices through uhid(4)-compatible interface and is based on pre-8.x uhid(4) code. Unlike uhid(4) it does not take devices in to monopoly ownership and allows parallel access from other drivers. hidraw supports Linux's hidraw-compatible interface as well. Reviewed by: hselasky Differential revision: https://reviews.freebsd.org/D27992
* Factor-out hardware-independent part of USB HID support to new moduleVladimir Kondratyev2021-01-071-2/+9
| | | | | | | | It will be used by the upcoming HID-over-i2C implementation. Should be no-op, except hid.ko module dependency is to be added to affected drivers. Reviewed by: hselasky, manu Differential revision: https://reviews.freebsd.org/D27867
* include: Use printf(1) instead of shell loops for header symlinksAlex Richardson2021-01-071-97/+52
| | | | | | | | | | | | | | Using a shell for loop means we have to spawn a separate install(1) process for each header that is symlinked. This patch uses printf(1) to generate an argument list that has been prefixed with the correct number of ../ and then uses a single install(1) invocation. This reduces the number of execve() calls during make includes from 2442 (with D27622) to 1382. Running `make symlinks` in include/ now spawns 214 processes instead of 1276 without this patch. Reviewed By: jhb Differential Revision: https://reviews.freebsd.org/D27723
* include: Use INCSGROUPS for a few filesEmmanuel Vadot2021-01-041-65/+128
| | | | | | | | | Instead of using install directly use INCSGROUPS for them. All those files are the ones we installed when the directory have more .h files that we don't want to install so they aren't using the LSUBDIR stuff. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D27612
* include: Tag the last includes files as part of the -dev packageEmmanuel Vadot2021-01-041-22/+22
| | | | | Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D27618
* [PowerPC64LE] Ensure nvram is built on powerpc64le.Brandon Bergren2020-09-131-1/+1
| | | | | | | | | | Fix some cases where conditionals that were trying to exclude powerpcspe were also excluding powerpc64le. Sponsored by: Tag1 Consulting, Inc. Notes: svn path=/head/; revision=365694
* Merge OpenZFS support in to HEAD.Matt Macy2020-08-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The primary benefit is maintaining a completely shared code base with the community allowing FreeBSD to receive new features sooner and with less effort. I would advise against doing 'zpool upgrade' or creating indispensable pools using new features until this change has had a month+ to soak. Work on merging FreeBSD support in to what was at the time "ZFS on Linux" began in August 2018. I first publicly proposed transitioning FreeBSD to (new) OpenZFS on December 18th, 2018. FreeBSD support in OpenZFS was finally completed in December 2019. A CFT for downstreaming OpenZFS support in to FreeBSD was first issued on July 8th. All issues that were reported have been addressed or, for a couple of less critical matters there are pull requests in progress with OpenZFS. iXsystems has tested and dogfooded extensively internally. The TrueNAS 12 release is based on OpenZFS with some additional features that have not yet made it upstream. Improvements include: project quotas, encrypted datasets, allocation classes, vectorized raidz, vectorized checksums, various command line improvements, zstd compression. Thanks to those who have helped along the way: Ryan Moeller, Allan Jude, Zack Welch, and many others. Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D25872 Notes: svn path=/head/; revision=364746
* Install extra TCP stack header files: They are needed to compile a userlandOlivier Cochard2020-07-081-0/+1
| | | | | | | | | | | component of TCP Blackbox Recorder as example. Approved by: rrs Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D25584 Notes: svn path=/head/; revision=363032
* Oops, I didn't notice the "cd" is needed for each install line.Rick Macklem2020-05-311-0/+1
| | | | Notes: svn path=/head/; revision=361682
* Update the Makefile to copy rpcsec_tls.h to /usr/include/rpc.Rick Macklem2020-05-311-1/+3
| | | | Notes: svn path=/head/; revision=361679