Skip to content

Commit

Permalink
Merge branch 'for-next/kspp' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/kees/linux.git
  • Loading branch information
Stephen Rothwell committed Jul 21, 2023
2 parents 04241f3 + 8453e79 commit e19eb22
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions drivers/soc/fsl/qe/qe.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ int qe_upload_firmware(const struct qe_firmware *firmware)
* saved microcode information and put in the new.
*/
memset(&qe_firmware_info, 0, sizeof(qe_firmware_info));
strlcpy(qe_firmware_info.id, firmware->id, sizeof(qe_firmware_info.id));
strscpy(qe_firmware_info.id, firmware->id, sizeof(qe_firmware_info.id));
qe_firmware_info.extended_modes = be64_to_cpu(firmware->extended_modes);
memcpy(qe_firmware_info.vtraps, firmware->vtraps,
sizeof(firmware->vtraps));
Expand Down Expand Up @@ -599,7 +599,7 @@ struct qe_firmware_info *qe_get_firmware_info(void)
/* Copy the data into qe_firmware_info*/
sprop = of_get_property(fw, "id", NULL);
if (sprop)
strlcpy(qe_firmware_info.id, sprop,
strscpy(qe_firmware_info.id, sprop,
sizeof(qe_firmware_info.id));

of_property_read_u64(fw, "extended-modes",
Expand Down
10 changes: 9 additions & 1 deletion lib/Kconfig.ubsan
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ menuconfig UBSAN
if UBSAN

config UBSAN_TRAP
bool "On Sanitizer warnings, abort the running kernel code"
bool "Abort on Sanitizer warnings (smaller kernel but less verbose)"
depends on !COMPILE_TEST
help
Building kernels with Sanitizer features enabled tends to grow
Expand All @@ -26,6 +26,14 @@ config UBSAN_TRAP
the system. For some system builders this is an acceptable
trade-off.

Also note that selecting Y will cause your kernel to Oops
with an "illegal instruction" error with no further details
when a UBSAN violation occurs. (Except on arm64, which will
report which Sanitizer failed.) This may make it hard to
determine whether an Oops was caused by UBSAN or to figure
out the details of a UBSAN violation. It makes the kernel log
output less useful for bug reports.

config CC_HAS_UBSAN_BOUNDS_STRICT
def_bool $(cc-option,-fsanitize=bounds-strict)
help
Expand Down

0 comments on commit e19eb22

Please sign in to comment.