7485684f | 03-Mar-2024 |
Aaron LI <aly@aaronly.me> |
Whitespace cleanups |
30152012 | 03-Mar-2024 |
Aaron LI <aly@aaronly.me> |
netinet6: Improve flexibility of receiving Router Advertisement
Convert the sysctl 'net.inet6.ip6.accept_rtadv' to be the default value of the per-interface flag 'ND6_IFF_ACCEPT_RTADV', making it no
netinet6: Improve flexibility of receiving Router Advertisement
Convert the sysctl 'net.inet6.ip6.accept_rtadv' to be the default value of the per-interface flag 'ND6_IFF_ACCEPT_RTADV', making it no longer a global knob. Now the receiving RA is allowed if ip6_forwarding==0 *and* 'ND6_IFF_ACCEPT_RTADV' is set on that interface.
ndp(8) already supports to toggle the 'ND6_IFF_ACCEPT_RTADV' flag via the 'accept_rtadv' option.
Derived from FreeBSD.
show more ...
|
fca046ff | 02-Mar-2024 |
Aaron LI <aly@aaronly.me> |
netinet6: Improve handling of auto link-local address configuration
Add a new per-interface flag 'ND6_IFF_AUTO_LINKLOCAL' and convert the sysctl 'net.inet6.ip6.auto_linklocal' to be the default valu
netinet6: Improve handling of auto link-local address configuration
Add a new per-interface flag 'ND6_IFF_AUTO_LINKLOCAL' and convert the sysctl 'net.inet6.ip6.auto_linklocal' to be the default value of this new per-interface flag. This allows to fine control the automatic link-local address configuration on a per-interface basis.
Update ndp(8) to support to toggle the 'ND6_IFF_AUTO_LINKLOCAL' flag by adding the 'auto_linklocal' option.
Document the 'IPV6CTL_AUTO_LINKLOCAL' option in the inet6(4) man page.
Derived from FreeBSD.
show more ...
|
35e996c9 | 01-Mar-2024 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
usr.sbin/makefs/msdos: Fix broken extra-directory case
Same fix as d541bdf518b24b3f6deb5a62fab0ca6492be4470 for HAMMER2. |
03517d4e | 17-Jan-2024 |
Sascha Wildner <saw@online.de> |
config.8: Remove markup in the -width, also make it non-compact. |
764bf12e | 01-Dec-2023 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
usr.sbin/makefs/hammer2: Properly support block device for image creation
Unlike regular file image, block device image creation fails if estimated image size exceeds the device size.
Sparse file o
usr.sbin/makefs/hammer2: Properly support block device for image creation
Unlike regular file image, block device image creation fails if estimated image size exceeds the device size.
Sparse file option is ignored. The block device blocks aren't zero cleared.
show more ...
|
096d2ac4 | 30-Nov-2023 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
sys/vfs/hammer2: Remove unused local variable *pmp
No longer used since 34fb48c236fd17fbe558c7b2cf21b4e50f38153e. makefs code warned on Linux. |
6b47f3ea | 29-Nov-2023 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
usr.sbin/makefs: Sync with sys/vfs/hammer2
Sync with following sys/vfs/hammer2 commits. Also remove unused makefs specific function hammer2_pfs_inode_count().
$ git log --pretty="%h %s" 961db90e96d
usr.sbin/makefs: Sync with sys/vfs/hammer2
Sync with following sys/vfs/hammer2 commits. Also remove unused makefs specific function hammer2_pfs_inode_count().
$ git log --pretty="%h %s" 961db90e96d4d039edbd15dd78ecc822445405ec.. -- sys/vfs/hammer2/ bb70b93b8e sys/vfs/hammer2: Rename HAMMER2_INODE_ONRBTREE -> HAMMER2_INODE_ONHASH ad82725233 sys/vfs/hammer2: Remove REGFILE/SOFTLINK test in hammer2_inode_create_pfs() 258074ba74 sys/vfs/hammer2: Minor cleanup 0130729cda sys/vfs/hammer2: Fix comments on comp|check macros 9046282cb0 hammer2: Use HAMMER2_CHECK_DEFAULT when creating inode a071436b39 hammer2: Rename HAMMER2_COMP_NEWFS_DEFAULT -> HAMMER2_COMP_DEFAULT da9dedd0a7 sys/vfs/hammer2: Remove unused lbase local variables for hammer2_calc_logical() caf661fcf8 hammer2 - Try to reduce no-activity stalls during complex flushes 34fb48c236 hammer2 - Multitude of SMP contention fixes, work on flush 34a86030d9 sys/vfs/hammer2: Remove obsolete comments on common parent 74fa7b92b4 sys/vfs/hammer2: Remove obsolete comments on hidden inode 3a3a7c0e9c sys/vfs/hammer2: vnops need to return unix errno 2b3f93ea6d kernel - Add per-process capability-based restrictions eeb5b5dd2c sys/vfs/hammer2: Use hammer2_off_t in hammer2_io_alloc() 68e37e5676 sys/vfs/hammer2: Fix double count of hammer2_iod_file_{read,write} 7cf689a5ea sys/vfs/hammer2: Don't fail to lockinit diolk for fchain / vchain 73da171931 sys/vfs/hammer2: Use HAMMER2_VOLUME_BYTES for volume header size 41fa929b83 sys/vfs/hammer2: Fix XOP structure used in hammer2_inode_chain_flush() 4fe5868fa3 usr.sbin/makefs/hammer2: Fix -Wunused-but-set-variable warnings on Linux
show more ...
|
9046282c | 05-Nov-2023 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
hammer2: Use HAMMER2_CHECK_DEFAULT when creating inode
There are a few cases where inode check type is explicitly specified (usually derived from parent directory inode).
These cases should use HAM
hammer2: Use HAMMER2_CHECK_DEFAULT when creating inode
There are a few cases where inode check type is explicitly specified (usually derived from parent directory inode).
These cases should use HAMMER2_CHECK_DEFAULT rather than HAMMER2_CHECK_XXHASH64, in the same way HAMMER2_COMP_DEFAULT is being used.
show more ...
|
a071436b | 05-Nov-2023 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
hammer2: Rename HAMMER2_COMP_NEWFS_DEFAULT -> HAMMER2_COMP_DEFAULT
This was originally only used within newfs_hammer2(8) when first appeared in f481450ffccdbf50f8c9604067c25eb642a0c562 in 2013, but
hammer2: Rename HAMMER2_COMP_NEWFS_DEFAULT -> HAMMER2_COMP_DEFAULT
This was originally only used within newfs_hammer2(8) when first appeared in f481450ffccdbf50f8c9604067c25eb642a0c562 in 2013, but it's now always used when creating a new inode (e.g. ioctl).
The check version of this is HAMMER2_CHECK_DEFAULT without "NEWFS_".
show more ...
|
43778e29 | 02-Nov-2023 |
Aaron LI <aly@aaronly.me> |
jail.8: Order the sysctl MIBs a bit to look more logical |
60e242c5 | 02-Nov-2023 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
usr.sbin/makefs: Add -o c|C option to specify comp|check type
mainly for debugging purpose to use "none" by default. These options aren't available in newfs_hammer2(8) atm.
Note that level specific
usr.sbin/makefs: Add -o c|C option to specify comp|check type
mainly for debugging purpose to use "none" by default. These options aren't available in newfs_hammer2(8) atm.
Note that level specification for "-o c" is currently unsupported, and "sha192" for "-o C" is currently unsupported at runtime.
show more ...
|
2b3f93ea | 13-Oct-2023 |
Matthew Dillon <dillon@apollo.backplane.com> |
kernel - Add per-process capability-based restrictions
* This new system allows userland to set capability restrictions which turns off numerous kernel features and root accesses. These restricti
kernel - Add per-process capability-based restrictions
* This new system allows userland to set capability restrictions which turns off numerous kernel features and root accesses. These restrictions are inherited by sub-processes recursively. Once set, restrictions cannot be removed.
Basic restrictions that mimic an unadorned jail can be enabled without creating a jail, but generally speaking real security also requires creating a chrooted filesystem topology, and a jail is still needed to really segregate processes from each other. If you do so, however, you can (for example) disable mount/umount and most global root-only features.
* Add new system calls and a manual page for syscap_get(2) and syscap_set(2)
* Add sys/caps.h
* Add the "setcaps" userland utility and manual page.
* Remove priv.9 and the priv_check infrastructure, replacing it with a newly designed caps infrastructure.
* The intention is to add path restriction lists and similar features to improve jailess security in the near future, and to optimize the priv_check code.
show more ...
|
556932ec | 30-Sep-2023 |
Matthew Dillon <dillon@apollo.backplane.com> |
makefs - Deconflict hammer2 function
* Deconflict and fix build |
93bffd46 | 04-Jul-2023 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
usr.sbin/makefs/hammer2: Allow "-o I" setcheck|setcomp against PFS root
It's been returning error for "/" which is PFS root inode. |
2db6f39c | 03-Jul-2023 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
usr.sbin/makefs/hammer2: Fix link count handling in "-o R" option
Sanity check in hammer2_linkq_cleanup() is valid only when "-o R=/". If a non-root directory was specified, not all links may exist
usr.sbin/makefs/hammer2: Fix link count handling in "-o R" option
Sanity check in hammer2_linkq_cleanup() is valid only when "-o R=/". If a non-root directory was specified, not all links may exist under that directory, and as a result unused linkq element remains.
While here change calloc to ecalloc and fix goto label name.
show more ...
|
d541bdf5 | 02-Jul-2023 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
usr.sbin/makefs/hammer2: Fix broken extra-directory case
-t hammer2 has been broken when [extra-directory ...] was specified. (Looks like -t msdos is broken as well with extra-directory.)
Construct
usr.sbin/makefs/hammer2: Fix broken extra-directory case
-t hammer2 has been broken when [extra-directory ...] was specified. (Looks like -t msdos is broken as well with extra-directory.)
Constructing a path via "dir + cur->name" was not same as "cur->root + cur->path + cur->name" for extra-directory files as extra-directory files don't exist under dir.
show more ...
|
2d0322db | 01-Jul-2023 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
usr.sbin/makefs/hammer2: Support hardlink creation in "-o R" option
which was missing part in 5e8b0eb766966577a1da788053d7ccaa443fa222.
If the underlying file system of destination files doesn't su
usr.sbin/makefs/hammer2: Support hardlink creation in "-o R" option
which was missing part in 5e8b0eb766966577a1da788053d7ccaa443fa222.
If the underlying file system of destination files doesn't support hardlink and/or creation fails, the failure is simply ignored. It falls back on previous behavior (create different inodes with the same file contents).
show more ...
|
6da97f51 | 01-Jul-2023 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
usr.sbin/makefs/hammer2: Support inode timestamp in "-o R" option
which was missing part in 5e8b0eb766966577a1da788053d7ccaa443fa222.
Get timestamp from source inode within image file, and use that
usr.sbin/makefs/hammer2: Support inode timestamp in "-o R" option
which was missing part in 5e8b0eb766966577a1da788053d7ccaa443fa222.
Get timestamp from source inode within image file, and use that to update newly created directory and regular file.
If the underlying file system of destination files doesn't support timestamp and/or updating fails, the failure is simply ignored.
show more ...
|
daa1a189 | 30-Jun-2023 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
usr.sbin/makefs/hammer2: Fix memory leak from retired xops
Add missing kfrees from 9d036237cbc59969257aaea138ddec5dbd8e181b. |
5e8b0eb7 | 27-Jun-2023 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
usr.sbin/makefs/hammer2: Support recursive read for "-o R" option
"-o R" option currently creates 0 byte file if a given path is a directory, as directory inode size is set to 0.
Change this to rec
usr.sbin/makefs/hammer2: Support recursive read for "-o R" option
"-o R" option currently creates 0 byte file if a given path is a directory, as directory inode size is set to 0.
Change this to recursively walk directories, and retrieve directories and regular files under that directory. Specifying "-o R=/" does the reverse of what makefs(8) does.
It currently has following limitations. - Only directory and regular file are supported, other types are ignored. - Hard links are not ignored, but files are retrieved as different inodes and link count is not preserved. - Inode timestamp is not preserved. - Anything that HAMMER2 and this option support, but underlying file system doesn't is unsupported.
show more ...
|
9d036237 | 27-Jun-2023 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
usr.sbin/makefs/hammer2: Introduce XOP fifo realloc
Since makefs HAMMER2 used a serialized single threaded xops, it was not possible to have more than HAMMER2_XOPFIFO fifo entries.
Change this to r
usr.sbin/makefs/hammer2: Introduce XOP fifo realloc
Since makefs HAMMER2 used a serialized single threaded xops, it was not possible to have more than HAMMER2_XOPFIFO fifo entries.
Change this to realloc XOP fifo whenever it hits current limit. This is also what Free|Net|OpenBSD HAMMER2 currently do until they support multi-threaded xops.
This makes possible to support VOP_READDIR, and that makes possible to support recursive read for "-o R" option.
show more ...
|
9a393dfb | 25-Jun-2023 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
usr.sbin/makefs/hammer2: Avoid overlapped snprintf buffer
When "-o R" path argument contained symlink, the output path was partly copying from/to the same buffer in stack. Use a different buffer.
W
usr.sbin/makefs/hammer2: Avoid overlapped snprintf buffer
When "-o R" path argument contained symlink, the output path was partly copying from/to the same buffer in stack. Use a different buffer.
While here, move 64KB buffer for reading from stack to heap.
show more ...
|
fc4148fe | 24-Jun-2023 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
usr.sbin/makefs: Add HAMMER2 offline read / VOP_READ support
The offline read takes HAMMER2 specific "-o R" option. `image-file` argument is a valid HAMMER2 image file or block device. Unlike other
usr.sbin/makefs: Add HAMMER2 offline read / VOP_READ support
The offline read takes HAMMER2 specific "-o R" option. `image-file` argument is a valid HAMMER2 image file or block device. Unlike other offline commands, `directory` must be a valid directory.
e.g. $ makefs -t hammer2 -o R=/path/to/file /dev/adx /a/b/c $ makefs -t hammer2 -o R=/path/to/file /path/to/hammer2.img /a/b/c
The "-o R" option requires file path argument. The file is retrieved from `image-file` and written to a file under `directory`. In the examples above, /path/to/file is retrieved as /a/b/c/file on success.
show more ...
|
89a3eb16 | 23-Jun-2023 |
Tomohiro Kusumi <tkusumi@netbsd.org> |
usr.sbin/makefs/hammer2: Support VOP_READLINK
This makes possible for path component lookup against HAMMER2 image to handle symlinks with limitations below.
1. It can't support symlink with absolut
usr.sbin/makefs/hammer2: Support VOP_READLINK
This makes possible for path component lookup against HAMMER2 image to handle symlinks with limitations below.
1. It can't support symlink with absolute path destination by design, unless you can assume a given image is to be mounted at /. 2. It currently doesn't support "..". This is another non obvious case where a path could reach to outside of the image.
The regular HAMMER2 image creation doesn't use this (instead makefs uses real readlink(2) when scanning a source directory).
show more ...
|