[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250207005832.work.324-kees@kernel.org>
Date: Thu, 6 Feb 2025 17:00:09 -0800
From: Kees Cook <kees@...nel.org>
To: Andy Shevchenko <andy@...nel.org>
Cc: Kees Cook <kees@...nel.org>,
Sathya Prakash <sathya.prakash@...adcom.com>,
Sreekanth Reddy <sreekanth.reddy@...adcom.com>,
Suganath Prabu Subramani <suganath-prabu.subramani@...adcom.com>,
Kashyap Desai <kashyap.desai@...adcom.com>,
Sumit Saxena <sumit.saxena@...adcom.com>,
"James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Nilesh Javali <njavali@...vell.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>,
Alexey Dobriyan <adobriyan@...il.com>,
Sven Eckelmann <sven@...fation.org>,
Tadeusz Struk <tadeusz.struk@...aro.org>,
kernel test robot <lkp@...el.com>,
Erick Archer <erick.archer@...look.com>,
Dmitry Antipov <dmantipov@...dex.ru>,
Ryusuke Konishi <konishi.ryusuke@...il.com>,
Luc Van Oostenryck <luc.vanoostenryck@...il.com>,
linux-kernel@...r.kernel.org,
MPT-FusionLinux.pdl@...adcom.com,
linux-scsi@...r.kernel.org,
mpi3mr-linuxdrv.pdl@...adcom.com,
GR-QLogic-Storage-Upstream@...vell.com,
linux-hardening@...r.kernel.org,
x86@...nel.org,
linux-coco@...ts.linux.dev,
linux-nilfs@...r.kernel.org
Subject: [PATCH 00/10] Annotate arguments of memtostr/strtomem with __nonstring
Hi,
The memtostr*() and strtomem*() helpers are designed to move between C
strings (NUL-terminated) and byte arrays (that may just be zero padded and
may not be NUL-terminated). The "nonstring" attribute is used to annotated
these kinds of byte arrays, and we can validate the annotation on the
arguments of the helpers. Add the the infrastructure to do this, and
then update all the places where these annotations are currently missing.
-Kees
Kees Cook (10):
scsi: mptfusion: Mark device strings as nonstring
scsi: mpi3mr: Mark device strings as nonstring
scsi: mpt3sas: Mark device strings as nonstring
scsi: qla2xxx: Mark device strings as nonstring
string: kunit: Mark nonstring test strings as __nonstring
x86/tdx: Mark message.str as nonstring
uapi: stddef.h: Introduce __kernel_nonstring
nilfs2: Mark on-disk strings as nonstring
compiler.h: Introduce __must_be_noncstr()
string.h: Validate memtostr*()/strtomem*() arguments more carefully
arch/x86/coco/tdx/tdx.c | 2 +-
drivers/message/fusion/mptsas.c | 8 ++++----
drivers/scsi/mpi3mr/mpi3mr_transport.c | 8 ++++----
drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h | 2 +-
drivers/scsi/mpt3sas/mpt3sas_transport.c | 8 ++++----
drivers/scsi/qla2xxx/qla_mr.h | 4 ++--
include/linux/compiler.h | 18 +++++++++++++++++-
include/linux/string.h | 16 ++++++++++++----
include/uapi/linux/nilfs2_ondisk.h | 3 ++-
include/uapi/linux/stddef.h | 6 ++++++
lib/string_kunit.c | 4 ++--
11 files changed, 55 insertions(+), 24 deletions(-)
--
2.34.1
Powered by blists - more mailing lists