|
Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0 |
|
| #
685dc743 |
| 16-Aug-2023 |
Warner Losh <[email protected]> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| #
4d846d26 |
| 10-May-2023 |
Warner Losh <[email protected]> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0 |
|
| #
0a90043e |
| 14-Apr-2022 |
Mitchell Horne <[email protected]> |
Remove 12.x ABI compat for kernel dump ioctls
This code was marked gone_in(14), so it can now be removed.
The only consumer of this interface is dumpon(8). We do not maintain strict backwards compa
Remove 12.x ABI compat for kernel dump ioctls
This code was marked gone_in(14), so it can now be removed.
The only consumer of this interface is dumpon(8). We do not maintain strict backwards compatibility for this utility because a) it can't/shouldn't be used from a jail or chroot and b) it is highly specific interface unique to FreeBSD. The host's (presumably more up-to-date) copy of dumpon(8) should be used to configure kernel dump devices.
Reviewed by: markj, emaste MFC after: never Differential Revision: https://reviews.freebsd.org/D34914
show more ...
|
| #
9c90bfcd |
| 14-Apr-2022 |
Mitchell Horne <[email protected]> |
Remove 11.x ABI compat for kernel dump ioctls
This code was marked gone_in(13), so its time has passed.
The only consumer of this interface is dumpon(8). We do not maintain strict backwards compati
Remove 11.x ABI compat for kernel dump ioctls
This code was marked gone_in(13), so its time has passed.
The only consumer of this interface is dumpon(8). We do not maintain strict backwards compatibility for this utility because a) it can't/shouldn't be used from a jail or chroot and b) it is highly specific interface unique to FreeBSD. The host's (presumably more up-to-date) copy of dumpon(8) should be used to configure kernel dump devices.
Reviewed by: markj, emaste MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D34913
show more ...
|
|
Revision tags: release/12.3.0, release/13.0.0, release/12.2.0 |
|
| #
86e53c07 |
| 01-Sep-2020 |
Mateusz Guzik <[email protected]> |
null: clean up empty lines in .c and .h files
|
|
Revision tags: release/11.4.0, release/12.1.0, release/11.3.0 |
|
| #
6b6e2954 |
| 06-May-2019 |
Conrad Meyer <[email protected]> |
List-ify kernel dump device configuration
Allow users to specify multiple dump configurations in a prioritized list. This enables fallback to secondary device(s) if primary dump fails. E.g., one mi
List-ify kernel dump device configuration
Allow users to specify multiple dump configurations in a prioritized list. This enables fallback to secondary device(s) if primary dump fails. E.g., one might configure a preference for netdump, but fallback to disk dump as a second choice if netdump is unavailable.
This change does not list-ify netdump configuration, which is tracked separately from ordinary disk dumps internally; only one netdump configuration can be made at a time, for now. It also does not implement IPv6 netdump.
savecore(8) is already capable of scanning and iterating multiple devices from /etc/fstab or passed on the command line.
This change doesn't update the rc or loader variables 'dumpdev' in any way; it can still be set to configure a single dump device, and rc.d/savecore still uses it as a single device. Only dumpon(8) is updated to be able to configure the more complicated configurations for now.
As part of revving the ABI, unify netdump and disk dump configuration ioctl / structure, and leave room for ipv6 netdump as a future possibility. Backwards-compatibility ioctls are added to smooth ABI transition, especially for developers who may not keep kernel and userspace perfectly synced.
Reviewed by: markj, scottl (earlier version) Relnotes: maybe Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D19996
show more ...
|
|
Revision tags: release/12.0.0, release/11.2.0 |
|
| #
bd92e6b6 |
| 06-May-2018 |
Mark Johnston <[email protected]> |
Refactor some of the MI kernel dump code in preparation for netdump.
- Add clear_dumper() to complement set_dumper(). - Drain netdump's preallocated mbuf pool when clearing the dumper. - Don't do bo
Refactor some of the MI kernel dump code in preparation for netdump.
- Add clear_dumper() to complement set_dumper(). - Drain netdump's preallocated mbuf pool when clearing the dumper. - Don't do bounds checking for dumpers with mediasize 0. - Add dumper callbacks for initialization for writing out headers.
Reviewed by: sbruno MFC after: 1 month Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D15252
show more ...
|
| #
6469bdcd |
| 06-Apr-2018 |
Brooks Davis <[email protected]> |
Move most of the contents of opt_compat.h to opt_global.h.
opt_compat.h is mentioned in nearly 180 files. In-progress network driver compabibility improvements may add over 100 more so this is close
Move most of the contents of opt_compat.h to opt_global.h.
opt_compat.h is mentioned in nearly 180 files. In-progress network driver compabibility improvements may add over 100 more so this is closer to "just about everywhere" than "only some files" per the guidance in sys/conf/options.
Keep COMPAT_LINUX32 in opt_compat.h as it is confined to a subset of sys/compat/linux/*.c. A fake _COMPAT_LINUX option ensure opt_compat.h is created on all architectures.
Move COMPAT_LINUXKPI to opt_dontuse.h as it is only used to control the set of compiled files.
Reviewed by: kib, cem, jhb, jtl Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14941
show more ...
|
| #
718cf2cc |
| 27-Nov-2017 |
Pedro F. Giffuni <[email protected]> |
sys/dev: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error
sys/dev: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
show more ...
|
| #
64a16434 |
| 25-Oct-2017 |
Mark Johnston <[email protected]> |
Add support for compressed kernel dumps.
When using a kernel built with the GZIO config option, dumpon -z can be used to configure gzip compression using the in-kernel copy of zlib. This is useful o
Add support for compressed kernel dumps.
When using a kernel built with the GZIO config option, dumpon -z can be used to configure gzip compression using the in-kernel copy of zlib. This is useful on systems with large amounts of RAM, which require a correspondingly large dump device. Recovery of compressed dumps is also faster since fewer bytes need to be copied from the dump device.
Because we have no way of knowing the final size of a compressed dump until it is written, the kernel will always attempt to dump when compression is configured, regardless of the dump device size. If the dump is aborted because we run out of space, an error is reported on the console.
savecore(8) is modified to handle compressed dumps and save them to vmcore.<index>.gz, as it does when given the -z option.
A new rc.conf variable, dumpon_flags, is added. Its value is added to the boot-time dumpon(8) invocation that occurs when a dump device is configured in rc.conf.
Reviewed by: cem (earlier version) Discussed with: def, rgrimes Relnotes: yes Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D11723
show more ...
|
|
Revision tags: release/10.4.0, release/11.1.0 |
|
| #
480f31c2 |
| 10-Dec-2016 |
Konrad Witaszczyk <[email protected]> |
Add support for encrypted kernel crash dumps.
Changes include modifications in kernel crash dump routines, dumpon(8) and savecore(8). A new tool called decryptcore(8) was added.
A new DIOCSKERNELDU
Add support for encrypted kernel crash dumps.
Changes include modifications in kernel crash dump routines, dumpon(8) and savecore(8). A new tool called decryptcore(8) was added.
A new DIOCSKERNELDUMP I/O control was added to send a kernel crash dump configuration in the diocskerneldump_arg structure to the kernel. The old DIOCSKERNELDUMP I/O control was renamed to DIOCSKERNELDUMP_FREEBSD11 for backward ABI compatibility.
dumpon(8) generates an one-time random symmetric key and encrypts it using an RSA public key in capability mode. Currently only AES-256-CBC is supported but EKCD was designed to implement support for other algorithms in the future. The public key is chosen using the -k flag. The dumpon rc(8) script can do this automatically during startup using the dumppubkey rc.conf(5) variable. Once the keys are calculated dumpon sends them to the kernel via DIOCSKERNELDUMP I/O control.
When the kernel receives the DIOCSKERNELDUMP I/O control it generates a random IV and sets up the key schedule for the specified algorithm. Each time the kernel tries to write a crash dump to the dump device, the IV is replaced by a SHA-256 hash of the previous value. This is intended to make a possible differential cryptanalysis harder since it is possible to write multiple crash dumps without reboot by repeating the following commands: # sysctl debug.kdb.enter=1 db> call doadump(0) db> continue # savecore
A kernel dump key consists of an algorithm identifier, an IV and an encrypted symmetric key. The kernel dump key size is included in a kernel dump header. The size is an unsigned 32-bit integer and it is aligned to a block size. The header structure has 512 bytes to match the block size so it was required to make a panic string 4 bytes shorter to add a new field to the header structure. If the kernel dump key size in the header is nonzero it is assumed that the kernel dump key is placed after the first header on the dump device and the core dump is encrypted.
Separate functions were implemented to write the kernel dump header and the kernel dump key as they need to be unencrypted. The dump_write function encrypts data if the kernel was compiled with the EKCD option. Encrypted kernel textdumps are not supported due to the way they are constructed which makes it impossible to use the CBC mode for encryption. It should be also noted that textdumps don't contain sensitive data by design as a user decides what information should be dumped.
savecore(8) writes the kernel dump key to a key.# file if its size in the header is nonzero. # is the number of the current core dump.
decryptcore(8) decrypts the core dump using a private RSA key and the kernel dump key. This is performed by a child process in capability mode. If the decryption was not successful the parent process removes a partially decrypted core dump.
Description on how to encrypt crash dumps was added to the decryptcore(8), dumpon(8), rc.conf(5) and savecore(8) manual pages.
EKCD was tested on amd64 using bhyve and i386, mipsel and sparc64 using QEMU. The feature still has to be tested on arm and arm64 as it wasn't possible to run FreeBSD due to the problems with QEMU emulation and lack of hardware.
Designed by: def, pjd Reviewed by: cem, oshogbo, pjd Partial review: delphij, emaste, jhb, kib Approved by: pjd (mentor) Differential Revision: https://reviews.freebsd.org/D4712
show more ...
|
|
Revision tags: release/11.0.1, release/11.0.0, release/10.3.0, release/10.2.0, release/10.1.0 |
|
| #
5ebb15b9 |
| 11-Nov-2014 |
Pawel Jakub Dawidek <[email protected]> |
Add missing privilege check when setting the dump device. Before that change it was possible for a regular user to setup the dump device if he had write access to the given device. In theory it is a
Add missing privilege check when setting the dump device. Before that change it was possible for a regular user to setup the dump device if he had write access to the given device. In theory it is a security issue as user might get access to kernel's memory after provoking kernel crash, but in practise it is not recommended to give regular users direct access to storage devices.
Rework the code so that we do privileges check within the set_dumper() function to avoid similar problems in the future.
Discussed with: secteam
show more ...
|
|
Revision tags: release/9.3.0 |
|
| #
9ca1db65 |
| 30-Apr-2014 |
Eitan Adler <[email protected]> |
null.c: uio is unused
Mark another parameter as unused
Reported by: rpaulo
|
| #
7a07ae0a |
| 30-Apr-2014 |
Eitan Adler <[email protected]> |
null.c: fix ordering
Use a consistent ordering of full -> null -> zero (alphabetical) in null.c
Reported by: mjg
|
| #
a345aa59 |
| 30-Apr-2014 |
Eitan Adler <[email protected]> |
Add a /dev/full device.
/dev/full is similar to /dev/zero except it always returns ENOSPC when you attempt to write to it.
Reviewed by: jhibbits Discussed with: rpaulo
|
|
Revision tags: release/10.0.0, release/9.2.0, release/8.4.0, release/9.1.0 |
|
| #
bad7e7f3 |
| 01-Nov-2012 |
Alfred Perlstein <[email protected]> |
Provide a device name in the sysctl tree for programs to query the state of crashdump target devices.
This will be used to add a "-l" (ell) flag to dumpon(8) to list the currently configured dumpdev
Provide a device name in the sysctl tree for programs to query the state of crashdump target devices.
This will be used to add a "-l" (ell) flag to dumpon(8) to list the currently configured dumpdev.
Reviewed by: phk
show more ...
|
|
Revision tags: release/8.3.0_cvs, release/8.3.0 |
|
| #
844d43d9 |
| 11-Jan-2012 |
George V. Neville-Neil <[email protected]> |
Fix for PR 138526.
Add the ability for /dev/null and /dev/zero to accept being set into non blocking mode via fcntl(). This brings the code into compliance with IEEE Std 1003.1-2001 as referenced i
Fix for PR 138526.
Add the ability for /dev/null and /dev/zero to accept being set into non blocking mode via fcntl(). This brings the code into compliance with IEEE Std 1003.1-2001 as referenced in another PR, 94729.
Reviewed by: jhb MFC after: 1 week
show more ...
|
|
Revision tags: release/9.0.0 |
|
| #
cfb00e5a |
| 13-May-2011 |
Matthew D Fleming <[email protected]> |
Move the ZERO_REGION_SIZE to a machine-dependent file, as on many architectures (i386, for example) the virtual memory space may be constrained enough that 2MB is a large chunk. Use 64K for arches o
Move the ZERO_REGION_SIZE to a machine-dependent file, as on many architectures (i386, for example) the virtual memory space may be constrained enough that 2MB is a large chunk. Use 64K for arches other than amd64 and ia64, with special handling for sparc64 due to differing hardware.
Also commit the comment changes to kmem_init_zero_region() that I missed due to not saving the file. (Darn the unfamiliar development environment).
Arch maintainers, please feel free to adjust ZERO_REGION_SIZE as you see fit.
Requested by: alc MFC after: 1 week MFC with: r221853
show more ...
|
| #
89cb2a19 |
| 13-May-2011 |
Matthew D Fleming <[email protected]> |
Usa a globally visible region of zeros for both /dev/zero and the md device. There are likely other kernel uses of "blob of zeros" than can be converted.
Reviewed by: alc MFC after: 1 week
|
|
Revision tags: release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0 |
|
| #
f53444bc |
| 06-Aug-2010 |
Konstantin Belousov <[email protected]> |
Mark /dev/zero and /dev/null as eternal.
In collaboration with: pho MFC after: 1 month
|
|
Revision tags: release/8.1.0_cvs, release/8.1.0, release/7.3.0_cvs, release/7.3.0, release/8.0.0_cvs, release/8.0.0 |
|
| #
61c177bf |
| 06-Sep-2009 |
Ed Schouten <[email protected]> |
Remove unneeded minor numbers from /dev/null and /dev/zero.
|
|
Revision tags: release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0, release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0, release/6.2.0_cvs, release/6.2.0 |
|
| #
acd3428b |
| 06-Nov-2006 |
Robert Watson <[email protected]> |
Sweep kernel replacing suser(9) calls with priv(9) calls, assigning specific privilege names to a broad range of privileges. These may require some future tweaking.
Sponsored by: nCircle
Sweep kernel replacing suser(9) calls with priv(9) calls, assigning specific privilege names to a broad range of privileges. These may require some future tweaking.
Sponsored by: nCircle Network Security, Inc. Obtained from: TrustedBSD Project Discussed on: arch@ Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri, Alex Lyashkov <umka at sevcity dot net>, Skip Ford <skip dot ford at verizon dot net>, Antoine Brodin <antoine dot brodin at laposte dot net>
show more ...
|
|
Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0, release/5.4.0_cvs, release/5.4.0 |
|
| #
3f8bb25b |
| 27-Feb-2005 |
Poul-Henning Kamp <[email protected]> |
Use dynamic major number allocation.
|
|
Revision tags: release/4.11.0_cvs, release/4.11.0, release/5.3.0_cvs, release/5.3.0 |
|
| #
4ec450ce |
| 02-Aug-2004 |
Mark Murray <[email protected]> |
Go back to the historical minor numbers. Add a module version while I'm here.
Asked for minor numbers by: jhb
|
| #
228a86bf |
| 01-Aug-2004 |
Mark Murray <[email protected]> |
YA oops. Remove code that was being tested locally.
|