From: Kees Cook <kees@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
Alex Hung <alex.hung@amd.com>,
Alison Schofield <alison.schofield@intel.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Arnd Bergmann <arnd@arndb.de>, Bill Wendling <morbo@google.com>,
Christoph Hellwig <hch@infradead.org>,
Dave Jiang <dave.jiang@intel.com>,
Dennis Chen <dechen@redhat.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Johannes Berg <johannes@sipsolutions.net>,
Justin Stitt <justinstitt@google.com>,
Kees Cook <kees@kernel.org>, Kees Cook <kees+treewide@kernel.org>,
Kusaram Devineni <kusaram@devineni.in>, Leo Yan <leo.yan@arm.com>,
Mahad Ibrahim <mahad.ibrahim.dev@gmail.com>,
Mariia Nikitash <nikitash.mariiaw@gmail.com>,
Mike Leach <mike.leach@arm.com>, Mike Rapoport <rppt@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Oleg Nesterov <oleg@redhat.com>,
Randy Dunlap <rdunlap@infradead.org>,
stable@kernel.org,
syzbot+0a4c46806941297fecb9@syzkaller.appspotmail.com,
Vlastimil Babka <vbabka@kernel.org>, Zi Yan <ziy@nvidia.com>
Subject: [GIT PULL] hardening updates for v7.4-rc1
Date: Thu, 22 Oct 2026 11:25:02 -0700 [thread overview]
Message-ID: <202610221123.F2DE370AB5@keescook> (raw)
Hi Linus,
Please pull these hardening updates for v7.4-rc1. There are 2 topics
that stand out: the kmalloc_obj*-style API for devm_kmalloc() (for which
I'll be sending a separate tree-wide patch near the end of -rc1), and the
seq_buf API clean-ups and improvements (which is expected to have a small
follow-up fix coming). The things scattered around the tree outside of
normal areas are mainly clean-ups and fixes related to both those topics.
Thanks!
-Kees
The following changes since commit df2908090cda368b01ff43709f51890076c56157:
Linux 7.3-rc2 (2026-09-06 15:07:20 -0700)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/hardening-v7.4-rc1
for you to fetch changes up to 2f70a9b7e9c74b92a85a2584090f0f5c4cbaa4be:
overflow: Match arithmetic in both parts of __builtin_choose_expr (2026-10-14 18:05:52 -0700)
----------------------------------------------------------------
hardening updates for v7.4-rc1
- Provide kmalloc_obj*-style API for devm_kmalloc()
- Improve seq_buf API for saner C String handling with several bug
fixes along the way (Kees Cook, Bill Wendling)
- Overflow helper readability improvements (Bill Wendling)
- Unexport native_write_cr4() (Dennis Chen)
- um: fix CONFIG_GCOV for built-in code (Johannes Berg)
- Improve stackinit test coverage (Justin Stitt)
- KMSAN: fix memset() when using fortify-source, again (Arnd Bergmann)
- lkdtm: use kmalloc() instead of __get_free_page (Mahad Ibrahim)
- signalfd: don't dequeue the forced fatal signals (Oleg Nesterov)
- Fix randstruct to recognize new container_of() behavior
- coccinelle: kmalloc_obj: Convert multi-byte integral allocations too
- Fix a couple remaining allocation return type mismatches
----------------------------------------------------------------
Arnd Bergmann (1):
KMSAN: fix memset() when using fortify-source, again
Bill Wendling (2):
seq_buf: Add seq_buf_init_append()
overflow: Match arithmetic in both parts of __builtin_choose_expr
Dennis Chen (1):
lkdtm: Make UNSET_SMEP built-in-only and unexport native_write_cr4()
Johannes Berg (1):
um: fix CONFIG_GCOV for built-in code
Justin Stitt (2):
MAINTAINERS: Add stackinit KUnit test to HARDENING
kunit/stackinit: Cover declarations bypassed by goto and switch
Kees Cook (20):
randstruct: fix container_of() false positives after __mptr removal
randstruct: report bad casts as warnings rather than notes
coccinelle: kmalloc_obj: Convert multi-byte integral allocations
kunit/stackinit: Clean up XFAIL under instrumentation
mm: Move default_gfp() into gfp_types.h
devres: Provide kmalloc_obj*-style API for devm_kmalloc
.get_maintainer.ignore: Add Kees Cook
seq_buf: Do not print an empty line from an overflowed seq_buf_do_printk()
seq_buf: Do not pop from an overflowed seq_buf
scsi: lpfc: Print rx monitor records straight into the seq_buf
seq_buf: Copy what fits when seq_buf_puts() and seq_buf_putmem() overflow
seq_buf: Clear what a writer did not claim when a seq_buf overflows
seq_buf: Add seq_buf_strlen()
seq_buf: Add seq_buf_terminate()
bpf: Remove dead newline stripping from format_disasm_line()
powerpc/papr_scm: Return the string length from the sysfs show functions
nvdimm: ndtest: Return the string length from flags_show()
docs: core-api: Document the seq_buf API
coresight: cti: Add const to con_groups allocation type
extcon: realtek: Remove const from type_c_cfg allocation type
Mahad Ibrahim (1):
lkdtm: use kmalloc() instead of __get_free_page
Oleg Nesterov (1):
signalfd: don't dequeue the forced fatal signals
scripts/coccinelle/api/kmalloc_objs.cocci | 161 +++++--
scripts/gcc-plugins/randomize_layout_plugin.c | 63 ++-
Documentation/core-api/kernel-api.rst | 9 +
include/linux/device/devres.h | 102 ++++
include/linux/fortify-string.h | 2 -
include/linux/gfp.h | 4 -
include/linux/gfp_types.h | 4 +
include/linux/overflow.h | 2 +-
include/linux/seq_buf.h | 141 +++++-
include/linux/trace_seq.h | 5 +-
arch/um/include/asm/common.lds.S | 1 +
drivers/misc/lkdtm/core.c | 16 +-
arch/powerpc/platforms/pseries/papr_scm.c | 6 +-
arch/x86/kernel/cpu/common.c | 3 -
drivers/extcon/extcon-rtk-type-c.c | 3 +-
drivers/hwtracing/coresight/coresight-cti-sysfs.c | 2 +-
drivers/misc/lkdtm/bugs.c | 4 +-
drivers/scsi/lpfc/lpfc_sli.c | 45 +-
fs/signalfd.c | 28 +-
kernel/bpf/diagnostics.c | 8 +-
kernel/trace/trace_events.c | 4 +-
kernel/trace/trace_events_hist.c | 6 +-
lib/seq_buf.c | 37 +-
lib/tests/seq_buf_kunit.c | 537 +++++++++++++++++++++-
lib/tests/stackinit_kunit.c | 93 ++--
tools/testing/nvdimm/test/ndtest.c | 2 +-
.get_maintainer.ignore | 1 +
MAINTAINERS | 1 +
28 files changed, 1145 insertions(+), 145 deletions(-)
--
Kees Cook
next reply other threads:[~2026-10-22 18:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 18:25 Kees Cook [this message]
2026-10-23 1:10 ` [GIT PULL] hardening updates for v7.4-rc1 pr-tracker-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202610221123.F2DE370AB5@keescook \
--to=kees@kernel.org \
--cc=alex.hung@amd.com \
--cc=alison.schofield@intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=arnd@arndb.de \
--cc=ast@kernel.org \
--cc=dave.jiang@intel.com \
--cc=dechen@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=hch@infradead.org \
--cc=johannes@sipsolutions.net \
--cc=justinstitt@google.com \
--cc=kees+treewide@kernel.org \
--cc=kusaram@devineni.in \
--cc=leo.yan@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mahad.ibrahim.dev@gmail.com \
--cc=mike.leach@arm.com \
--cc=morbo@google.com \
--cc=ndesaulniers@google.com \
--cc=nikitash.mariiaw@gmail.com \
--cc=oleg@redhat.com \
--cc=rdunlap@infradead.org \
--cc=rppt@kernel.org \
--cc=stable@kernel.org \
--cc=syzbot+0a4c46806941297fecb9@syzkaller.appspotmail.com \
--cc=torvalds@linux-foundation.org \
--cc=vbabka@kernel.org \
--cc=ziy@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.