zephyr/cmake
Keith Packard cdc686eecc compiler/gcc: _FORTIFY_SOURCE=1 doesn't mean compile-time only checks
_FORTIFY_SOURCE=1 differs from _FORTIFY_SOURCE=2 only in the bounds
checking mode that it uses.

With _FORTIFY_SOURCE=1, bounds checks are 'loose', allowing access to the
whole underlying object, not just the subset referenced in the expression
(e.g, the bounds of a struct member is the whole struct, not just the
member).

With _FORTIFY_SOURCE=2, bounds checks are strict, meaning that the bounds
of an expression are limited to the referenced value.

Both of these perform their checks at runtime, calling _chk_fail if the
bounds check fails. That's done in the __*_chk functions included in the C
library. These are always called when _FORTIFY_SOURCE > 0, unless the
compiler replaces the call with inline code.

GCC already does all of the compile-time bounds checking for string and mem
functions when not using -ffreestanding, so there's nothing we need to add
for that to work. That means the security_fortify_compile_time property
should be empty.

Signed-off-by: Keith Packard <keithp@keithp.com>
2024-01-10 20:50:51 -05:00
..
app
bintools llvm: Allow llvm-readelf 2023-12-07 10:35:44 +00:00
compiler compiler/gcc: _FORTIFY_SOURCE=1 doesn't mean compile-time only checks 2024-01-10 20:50:51 -05:00
emu config: qemu: Add QEMU_EXTRA_FLAGS config option 2023-10-20 15:03:55 +02:00
flash west runner: Add exe file to configuration 2023-10-10 15:26:09 +02:00
ide
linker cmake: safeguard path of SOC_LINKER_SCRIPT 2023-11-03 14:47:34 +00:00
linker_script zbus: add priority boost feature 2024-01-04 09:41:54 +01:00
makefile_exports
modules cmake: modules: shields: Process shields in order 2024-01-09 10:03:15 +01:00
reports
sca cmake: sca: codechecker: Support storing results 2023-08-23 14:45:03 +02:00
toolchain toolchain: esp32: fix cmake build issue with 'espressif' toolchain 2023-11-22 09:52:29 +01:00
usage cmake: add initlevels to usage 2023-11-24 11:39:21 +01:00
util
cfb.cmake
extra_flags.cmake cmake: extra_flags: Use zephyr_get 2023-10-24 11:35:27 +02:00
gcc-m-cpu.cmake soc: arm64: Add agilex5 soc folder and its configurations 2023-07-25 16:58:01 +00:00
gcc-m-fpu.cmake
gen_version_h.cmake cmake: generalize VERSION infrastructure for better reuse 2023-05-17 13:56:58 +02:00
hex.cmake
kobj.cmake
mcuboot.cmake kconfig: mcuboot: Add MCUBOOT_IMGTOOL_OVERWRITE_ONLY option 2023-11-23 09:59:36 +01:00
package_helper.cmake cmake: stub zephyr_set(... SCOPE ...) function in package helper 2023-10-05 09:43:28 +01:00
pristine.cmake
target_toolchain_flags.cmake
verify-toolchain.cmake
vif.cmake USB-C: genVIF: Cleanup and add support to pick static data from input 2023-05-26 13:54:43 -04:00