Go to file
Warner Losh d650c3efb6 kboot: hostfs -- check for llseek failure correctly
The host_* syscalls are all raw Linux system calls, not the POSIX
wrappers that glibc / musl create. So we have to ranage change the
return value of host_llseek correctly to use the negative value hack
that all Linux system calls use.

This fixes a false positive error detection when we do something like
lseek(fd, 0xf1234567, ...); This returns 0xf1234567, which is a negative
value which used to trigger the error path.  Instead, we check using the
is_linux_error() and store the return value in a long. Translate that
errno to a host errno and set the global errno to that and return
-1. lseek can't otherwise return a negative number, since it's the
offset after seeking into the file, which by definition is positive.

This kept the 'read the UEFI memory map out of physical memory' from
working on aarch64 (whose boot loader falls back to reading it since
there are restrictive kernel options that can also prevent it), since
the physical address the memory map was at on my platform was like
0xfa008018.

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D44286
2024-03-11 15:21:51 -06:00
.cirrus-ci
.github .github: Switch to v4 of actions/checkout 2024-03-04 21:52:09 -08:00
bin tests: Fixing incomplete atf_skip if missing jail condition 2024-02-23 13:08:09 +01:00
cddl zfs: merge openzfs/zfs@8f2f6cd2a 2024-03-07 10:52:19 +01:00
contrib Add 'contrib/libdiff/' from commit '9eb461aa4b61ab47855b2cee9e5b626a76888b5e' 2024-03-11 14:48:08 +01:00
crypto heimdal: don't try to expose nonexistant symbols 2024-03-07 00:55:11 +00:00
etc lorder: Add unit tests. 2024-02-28 16:37:41 +01:00
gnu misc: Remove ancient SCCS tags. 2023-11-26 22:23:27 -07:00
include Vendor import of diff from OpenBSD's Game of Trees 2024-03-07 12:32:03 +01:00
kerberos5 kerberos5: Mitigate the possibility of using an old libcrypto 2024-01-18 07:12:14 -08:00
lib libc/i386: don't attempt to export alloca 2024-03-07 20:14:55 +00:00
libexec rtld: use generated map file to check for some leaks from libc into rtld 2024-02-29 03:49:02 +02:00
release release/tools: Add support for building armv7 vm 2024-02-19 00:49:52 +01:00
rescue rescue: Stop using LDADD_zstd 2024-02-22 20:56:05 +00:00
sbin mount_nullfs(8): fix typo 2024-03-09 23:18:39 +02:00
secure caroot: routine update 2024-02-11 00:35:16 -06:00
share vmm.4: Add verbiage about need to load module from loader.conf 2024-03-06 16:50:24 +01:00
stand kboot: hostfs -- check for llseek failure correctly 2024-03-11 15:21:51 -06:00
sys Revert "Update to bring the rack stack with all its fixes in." 2024-03-11 20:28:24 +00:00
targets Merge llvm-project main llvmorg-17-init-19304-gd0b54bb50e51 2023-12-08 18:34:50 +01:00
tests tests/unix_seqpacket: mk_pair_of_sockets() requires a valid argument 2024-03-11 07:50:29 -07:00
tools lib{c,sys}: fix incremental builds 2024-03-08 19:14:24 +00:00
usr.bin awk: Fix the tests 2024-03-07 22:52:56 -07:00
usr.sbin crunchgen: slap a dependency on the generated makefile for .lo 2024-03-08 20:01:25 -06:00
.arcconfig arcanist: use FreeBSD/git project repository instead of FreeBSD/svn 2022-08-23 14:16:41 +00:00
.arclint
.cirrus.yml Cirrus-CI: Add manual Clang 18 jobs 2024-03-01 11:44:09 -05:00
.clang-format Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
.git-blame-ignore-revs git-blame-ignore-revs: OptionalObsoleteFiles.inc sorting commits 2023-11-15 17:47:02 +00:00
.gitattributes Remove SVN related Git attributes 2023-12-26 10:28:28 -07:00
.gitignore Vendor import of diff from OpenBSD's Game of Trees 2024-03-07 12:32:03 +01:00
.mailmap mailmap: Translate olce's personal address to olce@FreeBSD.org 2024-01-04 15:59:01 +01:00
CONTRIBUTING.md CONTRIBUTING.md: fix typo from commmit to commit 2023-12-28 10:01:03 -05:00
COPYRIGHT copyright: Bump the copyright date. 2023-12-31 23:15:43 -07:00
LOCKS Update LOCKS for Git 2023-12-26 10:28:25 -07:00
MAINTAINERS MAINTAINERS: change linuxkpi review Phabricator group. 2024-01-16 19:23:39 +00:00
Makefile pkgbase: Create two new rules for creating repo 2024-01-29 19:24:03 +01:00
Makefile.inc1 libc: link libsys as a auxiliary filter library 2024-02-05 20:34:56 +00:00
Makefile.libcompat build{libcompat}: Pass UNIVERSE_TOOLCHAIN_PATH to the _lc_build-tools submake 2023-08-21 21:00:45 -07:00
Makefile.sys.inc Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
ObsoleteFiles.inc Add space before 20240211 entry in ObsoleteFiles.inc 2024-03-10 12:36:28 +01:00
README.md README.md: link to the list of supported platforms 2022-11-01 12:20:55 -03:00
RELNOTES RELNOTES: fix my poor english 2024-02-29 18:35:41 +01:00
UPDATING libc: link libsys as a auxiliary filter library 2024-02-05 20:34:56 +00:00

FreeBSD Source:

This is the top level of the FreeBSD source directory.

FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms. A large community has continually developed it for more than thirty years. Its advanced networking, security, and storage features have made FreeBSD the platform of choice for many of the busiest web sites and most pervasive embedded networking and storage devices.

For copyright information, please see the file COPYRIGHT in this directory. Additional copyright information also exists for some sources in this tree - please see the specific source directories for more information.

The Makefile in this directory supports a number of targets for building components (or all) of the FreeBSD source tree. See build(7), config(8), FreeBSD handbook on building userland, and Handbook for kernels for more information, including setting make(1) variables.

For information on the CPU architectures and platforms supported by FreeBSD, see the FreeBSD website's Platforms page.

Source Roadmap:

Directory Description
bin System/user commands.
cddl Various commands and libraries under the Common Development and Distribution License.
contrib Packages contributed by 3rd parties.
crypto Cryptography stuff (see crypto/README).
etc Template files for /etc.
gnu Commands and libraries under the GNU General Public License (GPL) or Lesser General Public License (LGPL). Please see gnu/COPYING and gnu/COPYING.LIB for more information.
include System include files.
kerberos5 Kerberos5 (Heimdal) package.
lib System libraries.
libexec System daemons.
release Release building Makefile & associated tools.
rescue Build system for statically linked /rescue utilities.
sbin System commands.
secure Cryptographic libraries and commands.
share Shared resources.
stand Boot loader sources.
sys Kernel sources (see sys/README.md).
targets Support for experimental DIRDEPS_BUILD
tests Regression tests which can be run by Kyua. See tests/README for additional information.
tools Utilities for regression testing and miscellaneous tasks.
usr.bin User commands.
usr.sbin System administration commands.

For information on synchronizing your source tree with one or more of the FreeBSD Project's development branches, please see FreeBSD Handbook.