opnsense-src/stand/libsa
Kyle Evans 0c9c8a4c64 stand: zfs: handle holes at the tail end correctly
This mirrors dmu_read_impl(), zeroing out the tail end of the buffer and
clipping the read to what's contained by the block that exists.

This fixes an issue that arose during the 13.1 release process; in
13.1-RC1 and later, setting up GELI+ZFS will result in a failure to
boot.  The culprit is this, which causes us to fail to load geom_eli.ko
as there's a residual portion after the single datablk that should be
zeroed out.

PR:		263407
Reviewed by:	tsoome

(cherry picked from commit 914dc91d12)
2022-04-23 22:51:38 -05:00
..
amd64 libsa: Remove conflicting .global/.weak directive 2021-04-10 14:01:05 +01:00
geli stand: Fix a common typo in source code comments 2022-04-02 15:33:19 +02:00
i386
mips libsa: mips: fix typo that had slipped into the diff on local machine 2019-08-22 21:49:13 +00:00
powerpc Add CFI start/end proc directives to arm64, i386, and ppc 2020-12-05 00:33:28 +00:00
x86 Add support for hypervisor check on x86 2019-10-24 20:02:48 +00:00
zfs stand: zfs: handle holes at the tail end correctly 2022-04-23 22:51:38 -05:00
__main.c
abort.c Regularize the Netflix copyright 2019-02-04 21:28:25 +00:00
arp.c The libstand's panic() appends its own '\n' to the message, so that users of the API 2018-11-29 18:37:48 +00:00
assert.c The libstand's panic() appends its own '\n' to the message, so that users of the API 2018-11-29 18:37:48 +00:00
bcd.c
bootp.c libsa: bootp is using pointers with different sign 2018-08-01 12:06:39 +00:00
bootp.h libsa: bootp is using pointers with different sign 2018-08-01 12:06:39 +00:00
bootparam.c Prefer uintXX_t to u_intXX_t 2018-03-13 16:33:00 +00:00
bootparam.h
bzipfs.c libsa: Fix a typo in a panic message 2022-04-23 08:56:02 +02:00
cd9660.c loader: implement mount/unmount rootfs 2022-01-13 08:58:21 +01:00
cd9660read.c loader: cd9660_open() warn: is 'buf' large enough for 'struct iso_primary_descriptor'? 2019-12-13 12:36:16 +00:00
close.c loader: open file list should be dynamic 2021-08-26 10:59:28 +03:00
closeall.c loader: open file list should be dynamic 2021-08-26 10:59:28 +03:00
crc32_libkern.c Separate kernel crc32() implementation to its own header (gsb_crc32.h) and 2019-06-17 19:49:08 +00:00
dev.c ANSIify libsa functions 2021-12-06 08:55:54 -07:00
dosfs.c loader: implement mount/unmount rootfs 2022-01-13 08:58:21 +01:00
dosfs.h Prefer uintXX_t to u_intXX_t 2018-03-13 16:33:00 +00:00
environment.c libsa: remove leftover whitespace 2020-08-19 20:41:22 +00:00
ether.c
ext2fs.c libsa: Fix a typo in source code comments 2021-09-01 06:34:20 +02:00
fstat.c loader: open file list should be dynamic 2021-08-26 10:59:28 +03:00
getopt.c
gets.c libsa: exit on EOF in ngets 2018-08-09 02:55:48 +00:00
globals.c
gpt.c loader: remove libsa/crc32.c and use version from zlib 2020-03-19 21:05:11 +00:00
gpt.h Eliminate unused uuid parameters from gptread and gptread_table. We 2019-06-05 02:34:58 +00:00
gzipfs.c libsa: Fix infinite loop in bzipfs & gzipfs 2021-06-09 11:11:01 -05:00
hexdump.c zalloc_malloc:Free hexdump preceeding buffer when we detect overflow 2020-08-29 21:05:43 +00:00
in_cksum.c ANSIify libsa functions 2021-12-06 08:55:54 -07:00
inet_ntoa.c ANSIify libsa functions 2021-12-06 08:55:54 -07:00
ioctl.c loader: open file list should be dynamic 2021-08-26 10:59:28 +03:00
iodesc.h loader: open file list should be dynamic 2021-08-26 10:59:28 +03:00
ip.c Remove unnecessary include from libstand. 2018-10-31 19:59:20 +00:00
libsa.3 libsa(3): Correct statement about FS Write-support, name change 2018-06-09 14:24:16 +00:00
lseek.c loader: open file list should be dynamic 2021-08-26 10:59:28 +03:00
Makefile WITHOUT_BOOT build option appears to include stand, failing on libsa 2022-03-19 01:10:36 +02:00
Makefile.depend Enable veriexec for loader 2019-02-26 06:22:10 +00:00
mount.c loader: implement mount/unmount rootfs 2022-01-13 08:58:21 +01:00
net.c loader: ip: Do not call getsecs so much 2022-01-13 08:56:00 +01:00
net.h loader: open file list should be dynamic 2021-08-26 10:59:28 +03:00
netif.c loader: implement mount/unmount rootfs 2022-01-13 08:58:21 +01:00
netif.h
nfs.c Logging improvements to loader::nfs 2019-11-13 03:56:51 +00:00
nfsv2.h
nullfs.c libsa: replace remaining _write callbacks by null_write 2018-02-27 12:53:25 +00:00
open.c MFC loader+userland TSLOG support 2021-12-29 14:53:18 -08:00
pager.c
panic.c Split panic routine 2018-01-26 17:13:00 +00:00
pkgfs.c pkgfs_open: follow symlinks 2021-01-14 17:33:05 -08:00
preload.c loader: Add preload operation to fs_ops 2022-01-13 08:58:31 +01:00
printf.c MFC: Add TSLOG to loader sprintf 2021-12-29 14:53:19 -08:00
random.c Fix random() and srandom() prototypes to match the standard. 2017-12-02 00:07:19 +00:00
rarp.c libsa: Consolidate tftp sendrecv into net.c sendrecv 2018-02-15 19:49:15 +00:00
read.c MFC loader+userland TSLOG support 2021-12-29 14:53:18 -08:00
readdir.c loader: open file list should be dynamic 2021-08-26 10:59:28 +03:00
rpc.c Prefer uintXX_t to u_intXX_t 2018-03-13 16:33:00 +00:00
rpc.h
rpcv2.h
saioctl.h
sbrk.c The libstand's panic() appends its own '\n' to the message, so that users of the API 2018-11-29 18:37:48 +00:00
smbios.c libsa: smbios: Parse the chassis type and export it as smbios.chassis.type 2020-08-20 12:50:49 +00:00
smbios.h Move smbios.c to libsa. 2020-02-20 00:46:22 +00:00
splitfs.c
stand.h loader: tslog: Add more log for module loading 2022-01-27 11:06:43 +01:00
stat.c ANSIify libsa functions 2021-12-06 08:55:54 -07:00
strcasecmp.c ANSIify libsa functions 2021-12-06 08:55:54 -07:00
strdup.c ANSIify libsa functions 2021-12-06 08:55:54 -07:00
strerror.c
tftp.c loader: tftp: Copy the first block into the cache 2022-01-13 08:59:03 +01:00
tftp.h
time.c Implement some time variables from kernel 2020-09-29 16:29:50 +00:00
tslog.c MFC: Add TSLOG to loader sprintf 2021-12-29 14:53:19 -08:00
twiddle.c loader: Set twiddle globaldiv to 16 by default 2021-12-29 14:53:19 -08:00
udp.c Remove unnecessary include from libstand. 2018-10-31 19:59:20 +00:00
ufs.c loader: implement mount/unmount rootfs 2022-01-13 08:58:21 +01:00
ufsread.c
uuid_from_string.c Regularize my copyright notice 2019-12-04 16:56:11 +00:00
uuid_to_string.c Regularize my copyright notice 2019-12-04 16:56:11 +00:00
write.c loader: open file list should be dynamic 2021-08-26 10:59:28 +03:00
xlocale_private.h Regularize the Netflix copyright 2019-02-04 21:28:25 +00:00
zalloc.c loader: fix typo in zalloc. 2019-09-20 05:22:34 +00:00
zalloc_defs.h loader: cstyle cleanup libsa zalloc sources 2019-09-17 11:35:53 +00:00
zalloc_malloc.c zalloc_malloc:Free hexdump preceeding buffer when we detect overflow 2020-08-29 21:05:43 +00:00
zalloc_mem.h loader: cstyle cleanup libsa zalloc sources 2019-09-17 11:35:53 +00:00
zalloc_protos.h loader: add memalign() to libsa 2019-09-17 13:15:27 +00:00