Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'hardening-v6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux

Pull hardening updates from Kees Cook:

- string: Add missing kernel-doc return descriptions (Kriish Sharma)

- Update some mis-typed allocations

These correct some accidentally wrong types used in allocations (that
didn't affect the resulting size) that never got picked up from the
batch I sent a few months ago.

- Enable GCC diagnostic context for value-tracking warnings

This results in better GCC diagnostics for the value range tracking,
so we can get better visibility into where those values are coming
from when we get out-of-bounds warnings at compile time.

* tag 'hardening-v6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
kbuild: Enable GCC diagnostic context for value-tracking warnings
string: Add missing kernel-doc return descriptions
media: iris: Cast iris_hfi_gen2_get_instance() allocation type
drm/plane: Remove const qualifier from plane->modifiers allocation type
comedi: Adjust range_table_list allocation type

+13 -3
+3
Makefile
··· 940 940 # for the randomize_kstack_offset feature. Disable it for all compilers. 941 941 KBUILD_CFLAGS += $(call cc-option, -fno-stack-clash-protection) 942 942 943 + # Get details on warnings generated due to GCC value tracking. 944 + KBUILD_CFLAGS += $(call cc-option, -fdiagnostics-show-context=2) 945 + 943 946 # Clear used registers at func exit (to reduce data lifetime and ROP gadgets). 944 947 ifdef CONFIG_ZERO_CALL_USED_REGS 945 948 KBUILD_CFLAGS += -fzero-call-used-regs=used-gpr
+1 -1
drivers/comedi/drivers/ni_670x.c
··· 199 199 const struct comedi_lrange **range_table_list; 200 200 201 201 range_table_list = kmalloc_array(32, 202 - sizeof(struct comedi_lrange *), 202 + sizeof(*range_table_list), 203 203 GFP_KERNEL); 204 204 if (!range_table_list) 205 205 return -ENOMEM;
+1 -1
drivers/gpu/drm/drm_plane.c
··· 425 425 426 426 plane->modifier_count = format_modifier_count; 427 427 plane->modifiers = kmalloc_array(format_modifier_count, 428 - sizeof(format_modifiers[0]), 428 + sizeof(*plane->modifiers), 429 429 GFP_KERNEL); 430 430 431 431 if (format_modifier_count && !plane->modifiers) {
+1 -1
drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c
··· 1212 1212 1213 1213 struct iris_inst *iris_hfi_gen2_get_instance(void) 1214 1214 { 1215 - return kzalloc(sizeof(struct iris_inst_hfi_gen2), GFP_KERNEL); 1215 + return (struct iris_inst *)kzalloc(sizeof(struct iris_inst_hfi_gen2), GFP_KERNEL); 1216 1216 }
+7
include/linux/string.h
··· 371 371 * kbasename - return the last part of a pathname. 372 372 * 373 373 * @path: path to extract the filename from. 374 + * 375 + * Returns: 376 + * Pointer to the filename portion inside @path. If no '/' exists, 377 + * returns @path unchanged. 374 378 */ 375 379 static inline const char *kbasename(const char *path) 376 380 { ··· 560 556 * strstarts - does @str start with @prefix? 561 557 * @str: string to examine 562 558 * @prefix: prefix to look for. 559 + * 560 + * Returns: 561 + * True if @str begins with @prefix. False in all other cases. 563 562 */ 564 563 static inline bool strstarts(const char *str, const char *prefix) 565 564 {