History log of /freebsd/sys/conf/kern.mk (Results 1 – 25 of 443)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 6e3875eb 10-Nov-2024 Ka Ho Ng <khng@FreeBSD.org>

sys: move SAN and COVERAGE options handling to kern.mk

This allows the flags to be picked up more easily when building external
modules.

Sponsored by: Juniper Networks, Inc.
Reviewed by: markj (ear

sys: move SAN and COVERAGE options handling to kern.mk

This allows the flags to be picked up more easily when building external
modules.

Sponsored by: Juniper Networks, Inc.
Reviewed by: markj (earlier)
Differential Revision: https://reviews.freebsd.org/D45563

show more ...


# d3916eac 31-Oct-2024 Ruslan Bukin <br@FreeBSD.org>

riscv/vmm: Initial import.

Add kernel code for 'H' — Hypervisor Extension[1] to support
virtualization on RISC-V ISA.

This comes with a separate userspace patch allowing us to boot
unmodified freeb

riscv/vmm: Initial import.

Add kernel code for 'H' — Hypervisor Extension[1] to support
virtualization on RISC-V ISA.

This comes with a separate userspace patch allowing us to boot
unmodified freebsd/riscv guest. Other operating systems are untested.

This also comes with a U-Boot port that is configured to run in bhyve
guest environment — in RISC-V virtual supervisor mode.
The vmm SBI code emulates RISC-V machine-mode for the guest, handling
SBI calls partly in vmm kernel and partly in bhyve userspace.

Developed in Spike simulator during short period of time, the support
is considered experimental. The first real hardware with hypervisor
spec included should have just reached the market, so this was tested
in Spike and QEMU only. Note that this depends on Sstc extension
presence in the hardware (both Spike and QEMU have it).

Note that booting multiple guests at the same time is not tested and
may require additional work. Some TODOs are indicated within the
code, and some listed in the project's home page[2].

Many thanks to Jessica Clarke, Mitchell Horne and Mark Johnston
for help with parts, test and review.

1. https://riscv.org/technical/specifications/
2. https://wiki.freebsd.org/riscv/bhyve

Sponsored by: UK Research and Innovation
Differential Revision: https://reviews.freebsd.org/D45553

show more ...


Revision tags: release/13.4.0
# 4ec5fbdd 12-Jul-2024 Andrew Turner <andrew@FreeBSD.org>

sys/conf: Remove LD_EMULATION_armv6

Armv6 support has been removed, we can remove LD_EMULATION for it.

Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D45959


# 973bbdab 22-Aug-2024 Jose Luis Duran <jlduran@gmail.com>

mk: Add a BTI-report linker feature

Add support for specifying how to report the missing Branch Target
Identification (BTI) linker feature on AArch64.

For:

Kernel: bti-report on when the linker

mk: Add a BTI-report linker feature

Add support for specifying how to report the missing Branch Target
Identification (BTI) linker feature on AArch64.

For:

Kernel: bti-report on when the linker supports it
Userspace: bti-report on when the linker supports it and
BTI_REPORT_ERROR is defined

Fixes: 43e8849bc294 ("conf: Enable BTI checking in the arm64 kernel")
Pull Request: https://github.com/freebsd/freebsd-src/pull/1393

show more ...


# 43e8849b 19-Aug-2024 Andrew Turner <andrew@FreeBSD.org>

conf: Enable BTI checking in the arm64 kernel

To ensure new code has BTI support make it an error to not have the
BTI ELF note when linking the kernel and kernel modules.

Reviewed by: kib, emaste
S

conf: Enable BTI checking in the arm64 kernel

To ensure new code has BTI support make it an error to not have the
BTI ELF note when linking the kernel and kernel modules.

Reviewed by: kib, emaste
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D45469

show more ...


# 12a6257a 19-Aug-2024 Andrew Turner <andrew@FreeBSD.org>

sys/conf: Introduce NOSAN_CFLAGS and NOSAN_C

To simplify disabling the kernel sanitizers in some files add
NOSAN_CFLAGS and NOSAN_C variables. These are CFLAGS and NORMAL_C with
the sanitizer flags

sys/conf: Introduce NOSAN_CFLAGS and NOSAN_C

To simplify disabling the kernel sanitizers in some files add
NOSAN_CFLAGS and NOSAN_C variables. These are CFLAGS and NORMAL_C with
the sanitizer flags removed.

While here add MSAN_CFLAGS to simplify keeping KMSAN in kern_kcov.c

Reviewed by: khng, brooks, imp, markj
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D45498

show more ...


# 361da405 04-Jun-2024 Andrew Turner <andrew@FreeBSD.org>

arm64: Disable outling atomics

We don't have the symbols for this. The virtio randon number driver
uses a C11 atomic operation. With inline atomics this is translated to
an Armv8.0 atomic operation,

arm64: Disable outling atomics

We don't have the symbols for this. The virtio randon number driver
uses a C11 atomic operation. With inline atomics this is translated to
an Armv8.0 atomic operation, with outling atomics this becomes a
function call to a handler. As we don't have the needed function the
kernel fails to link.

Fix by disabling outline atomics for now.

Reviewed by: brooks, imp
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D45301

show more ...


# 079d67b1 03-Jun-2024 Minsoo Choo <minsoochoo0122@proton.me>

sys: Disable C standards prior to C99 from kernel build

The kernel hasn't built with anything less than c99 for a long
time. Retire support in the build for it. In addition, retire the
translation

sys: Disable C standards prior to C99 from kernel build

The kernel hasn't built with anything less than c99 for a long
time. Retire support in the build for it. In addition, retire the
translation of c99 to -std=iso9899:1999, since all latter day C
compilers that we support have had this for maybe 15 years or so (gcc
since 4.5, clang since the earliest version) and it simplifies the code.

Reviewed-by: imp, emaste
Differential-Revision: https://reviews.freebsd.org/D44145

show more ...


Revision tags: release/14.1.0
# 56b40c28 21-Mar-2024 Richard Scheffenegger <rscheff@FreeBSD.org>

build: add -Wswitch to clang for more consistency with gcc

gcc12 and gcc13 appear to include Wswitch with Wall, while
clang doesn't. For switch() statements on enum, this forces
the use of at least

build: add -Wswitch to clang for more consistency with gcc

gcc12 and gcc13 appear to include Wswitch with Wall, while
clang doesn't. For switch() statements on enum, this forces
the use of at least a default: clause, in adherance with style(9).

Reviewed By: emaste
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D44092

show more ...


Revision tags: release/13.3.0
# 53fba3b9 11-Feb-2024 Mark Johnston <markj@FreeBSD.org>

build: Default to DWARF4 in the kernel

gcc 12 defaults to emitting DWARF 5, but this is not yet supported by
our libdwarf and thus by ctfconvert.

Reviewed by: emaste, imp
MFC after: 1 week
Differen

build: Default to DWARF4 in the kernel

gcc 12 defaults to emitting DWARF 5, but this is not yet supported by
our libdwarf and thus by ctfconvert.

Reviewed by: emaste, imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D43837

show more ...


# ede077bf 15-Nov-2023 John Baldwin <jhb@FreeBSD.org>

sys: Disable -Walloc-size-larger-than for GCC 9+

By default this warns about sizes larger than PTRDIFF_MAX passed to
malloc (rather than SIZE_MAX). This doesn't trigger
deterministically, but it do

sys: Disable -Walloc-size-larger-than for GCC 9+

By default this warns about sizes larger than PTRDIFF_MAX passed to
malloc (rather than SIZE_MAX). This doesn't trigger
deterministically, but it does trigger for kmalloc() of struct_size()
in iwlwifi's iwl_configure_rxq even when struct_size() is changed to
use PTRDIFF_MAX. NB: struct_size() in Linux caps the size at
SIZE_MAX, not PTRDIFF_MAX via size_mul().

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D42587

show more ...


Revision tags: release/14.0.0
# d09a64e1 02-Oct-2023 Andrew Turner <andrew@FreeBSD.org>

arm64: Enable kernel branch protection

Add the build flags to enable branch protection on arm64. This enable
the use of PAC and BTI in the kernel.

For PAC we already install the kernel keys when en

arm64: Enable kernel branch protection

Add the build flags to enable branch protection on arm64. This enable
the use of PAC and BTI in the kernel.

For PAC we already install the kernel keys when entering the kernel
from userspace so this will start using these to sign the stack.

For BTI we need to mark the kernel page tables with a new guarded page
field. As this will require all code that could be reached through a
function pointer with an appropriate branch target instruction we
are enabling this before setting the field.

As the pointer authentication support shouldn't be reached via a
function pointer it is safe to not enable the use of BTI there.

Reviewed by: markj
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D42079

show more ...


# e47381c9 29-Sep-2023 Stephen J. Kiernan <stevek@FreeBSD.org>

Allow for CSTD to be set kernel module Makefiles before inclusion

Use ?= when setting the default value for CSTD so it can be set by
Makefiles before inclusion and not be overridden by the .mk file.

Allow for CSTD to be set kernel module Makefiles before inclusion

Use ?= when setting the default value for CSTD so it can be set by
Makefiles before inclusion and not be overridden by the .mk file.

Reviewed by: imp, sjg
Obtained from: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D42019

show more ...


# 2befa269 01-Sep-2023 Brooks Davis <brooks@FreeBSD.org>

Add INIT_ALL build option

This option replaces WITH_INIT_ALL_PATTERN and WITH_INIT_ALL_ZERO with
INIT_ALL=pattern and INIT_ALL=zero respectively. As these are
relatively rarely used options no back

Add INIT_ALL build option

This option replaces WITH_INIT_ALL_PATTERN and WITH_INIT_ALL_ZERO with
INIT_ALL=pattern and INIT_ALL=zero respectively. As these are
relatively rarely used options no backwards compatibility is
implemented.

Reviewed by: emaste
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D41675

show more ...


# 031beb4e 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


# ec41a96d 01-Jul-2023 John Baldwin <jhb@FreeBSD.org>

sys: Switch the kernel's C standard from C99 to GNU99.

This matches the default used in userland, and the kernel already
depends on various GNU extensions to standard C that are supported by
both cl

sys: Switch the kernel's C standard from C99 to GNU99.

This matches the default used in userland, and the kernel already
depends on various GNU extensions to standard C that are supported by
both clang and GCC.

This should be a no-op for clang, but for GCC it enables some GNU
extensions that aren't otherwise enabled. It also enables GCC for
i386 to avoid the need for a floatundidf intrinsic in libkern.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D40646

show more ...


# 98d06eea 25-May-2023 John Baldwin <jhb@FreeBSD.org>

sys: Enable -Wunused-but-set-variable for clang 15+.

It was already enabled for older clang versions and GCC.


# 6c08fd3d 25-May-2023 John Baldwin <jhb@FreeBSD.org>

Enable -Wstrict-prototypes by default in the kernel for clang 15+.

PR: 271072 (exp-run)
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D39734


# 3741ffdb 23-May-2023 Dimitry Andric <dim@FreeBSD.org>

Fix typo in sys/conf/kern.mk's InitAll warning message

I missed this one in commit 3006f6df025f.

Fixes: 3006f6df025f
MFC after: 3 days


# 3006f6df 23-May-2023 Dimitry Andric <dim@FreeBSD.org>

Update -ftrivial-auto-var-init flags for clang >= 16

As of clang 16, the -ftrivial-auto-var-init=zero option no longer needs
-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang

Update -ftrivial-auto-var-init flags for clang >= 16

As of clang 16, the -ftrivial-auto-var-init=zero option no longer needs
-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
to enable the option. Only add it for older clang versions.

PR: 271047
Reviewed by: emaste
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D40208

show more ...


# c32b6c74 25-Apr-2023 Mitchell Horne <mhorne@FreeBSD.org>

riscv: retire the FPE kernel option

We always build the kernel floating point support. Now that the
riscv64sf userspace variant has been removed the option is required for
correct operation.

Review

riscv: retire the FPE kernel option

We always build the kernel floating point support. Now that the
riscv64sf userspace variant has been removed the option is required for
correct operation.

Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39851

show more ...


# 7aab8fc5 25-Apr-2023 John Baldwin <jhb@FreeBSD.org>

clang: Enable -Wdeprecated-non-prototype by default.

PR: 270919 (exp-run)
Reviewed by: dim, emaste
Differential Revision: https://reviews.freebsd.org/D39535


# 42140052 20-Apr-2023 Dimitry Andric <dim@FreeBSD.org>

kern.mk: clang >= 16 already infers ELFv2 for powerpc64

There is no need to pass -mabi=elfv2 explicitly anymore, and with clang
16 in fact results in a "unused argument" warning.

MFC after: 3 days


# 1ca12bd9 12-Apr-2023 John Baldwin <jhb@FreeBSD.org>

Remove the riscv64sf architecture.

Reviewed by: jrtc27, arichardson, br, kp, imp, emaste
Differential Revision: https://reviews.freebsd.org/D39496


# cd800d3c 11-Apr-2023 John Baldwin <jhb@FreeBSD.org>

Enable -Warray-parameter for clang.

I fixed many of these previously for GCC 12 and make tinderbox passes
with this enabled.

Differential Revision: https://reviews.freebsd.org/D39378


12345678910>>...18