Re: [PATCH v2 00/10] lib/string_choices: Add new helpers

2025-03-03 Thread Andy Shevchenko
On Tue, Mar 4, 2025 at 8:53 AM Kuninori Morimoto wrote: ... > > > passed / failed > > > succeed/ failed > > > success/ failed > > > successful / failed > > > succeeded / failed > > > worked / failed > > > > It looks like something

Re: [PATCH v2 00/10] lib/string_choices: Add new helpers

2025-03-03 Thread Kuninori Morimoto
Hi Andy Thank you for the reply > First of all, please rebase your series against the top of the Kees' > branch: Also use --base when preparing the patch series. > > When you do that, you will note that the helpers now are ordered > alphabetically (which your series doesn't follow). So, you wi

Re: [PATCH v2 00/10] lib/string_choices: Add new helpers

2025-03-03 Thread Andy Shevchenko
On Tue, Mar 4, 2025 at 4:12 AM Kuninori Morimoto wrote: > > > Hi Kees, Andy > > This is v2 patch-set of "add new helpers". First of all, please rebase your series against the top of the Kees' branch: https://web.git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/log/?h=for-next/hardening. Al

[PATCH v1 2/2] arm64: dts: qcom: sm6125: Initial support for xiaomi-ginkgo

2025-03-03 Thread Gabriel Gonzales
Add support for the Xiaomi Redmi Note 8 based on the SM6125 SoC. Defined features: - dmesg output to bootloader preconfigured display - USB - eMMC - SD card - SMD RPM regulators - Volume Up, Down and Power buttons Signed-off-by: Gabriel Gonzales --- arch/arm64/boot/dts/qcom/Makefile

[SAMPLE] gpio: xra1403: use string choices helper

2025-03-03 Thread Kuninori Morimoto
Signed-off-by: Kuninori Morimoto --- drivers/gpio/gpio-xra1403.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-xra1403.c b/drivers/gpio/gpio-xra1403.c index dc2710c21c50..ad6b86941307 100644 --- a/drivers/gpio/gpio-xra1403.c +++ b/drivers/gpio/gpio-xra1

[PATCH v2 04/10] lib/string_choices: Add str_input_output() helper

2025-03-03 Thread Kuninori Morimoto
Add str_input_output() helper to return "input" or "output" string literal. Signed-off-by: Kuninori Morimoto --- include/linux/string_choices.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/string_choices.h b/include/linux/string_choices.h index 96b54874dc3a..cc7c771f4e

Re: [PATCH v2] scsi: target: Replace deprecated strncpy() with strscpy()

2025-03-03 Thread Martin K. Petersen
Thorsten, > strncpy() is deprecated for NUL-terminated destination buffers; use > strscpy() instead. The destination buffer db_root is only used with > "%s" format strings and must therefore be NUL-terminated, but not > NUL-padded. Applied to 6.15/scsi-staging, thanks! -- Martin K. Petersen

[PATCH v2 10/10] lib/string_choices: Add str_attach_detach() helper

2025-03-03 Thread Kuninori Morimoto
Add str_attach_detach() helper to return "attach" or "detach" string literal. Signed-off-by: Kuninori Morimoto --- include/linux/string_choices.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/linux/string_choices.h b/include/linux/string_choices.h index 82c5927d50a9..12b26cb

[SAMPLE] extcon: rtk-type-c: use string choices helper

2025-03-03 Thread Kuninori Morimoto
Signed-off-by: Kuninori Morimoto --- drivers/extcon/extcon-rtk-type-c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/extcon/extcon-rtk-type-c.c b/drivers/extcon/extcon-rtk-type-c.c index 82b60b927e41..0c4ecc897a2f 100644 --- a/drivers/extcon/extcon-rtk-type-c

[SAMPLE] microblaze: kernel: use string choices helper

2025-03-03 Thread Kuninori Morimoto
Signed-off-by: Kuninori Morimoto --- arch/microblaze/kernel/exceptions.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/microblaze/kernel/exceptions.c b/arch/microblaze/kernel/exceptions.c index fd153d5fab98..d287a324bdee 100644 --- a/arch/microblaze/kernel/exceptio

[SAMPLE] acpi: pci_irq: use string choices helper

2025-03-03 Thread Kuninori Morimoto
Signed-off-by: Kuninori Morimoto --- drivers/acpi/pci_irq.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c index 630fe0a34bc6..c193f25f3c56 100644 --- a/drivers/acpi/pci_irq.c +++ b/drivers/acpi/pci_irq.c @@ -21,6 +21,7 @@

[SAMPLE] blutooth: btmrvl_main: use string choices helper

2025-03-03 Thread Kuninori Morimoto
Signed-off-by: Kuninori Morimoto --- drivers/bluetooth/btmrvl_main.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c index e26b07a9387d..5ec93749531d 100644 --- a/drivers/bluetooth/btmrvl_main.c +++ b

[SAMPLE] dma: amba-pl08x: use string choices helper

2025-03-03 Thread Kuninori Morimoto
Signed-off-by: Kuninori Morimoto --- drivers/dma/amba-pl08x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c index 38cdbca59485..bdabbc2ff7f8 100644 --- a/drivers/dma/amba-pl08x.c +++ b/drivers/dma/amba-pl08x.c @@ -2094,7 +2

[SAMPLE] arm64: kernel: reloc_test_core: use string choices helper

2025-03-03 Thread Kuninori Morimoto
Signed-off-by: Kuninori Morimoto --- arch/arm64/kernel/reloc_test_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/reloc_test_core.c b/arch/arm64/kernel/reloc_test_core.c index 5b0891146054..81d80dd958c4 100644 --- a/arch/arm64/kernel/reloc_test_core

[SAMPLE] accel: habanalabs: gaudi: use string choices helper

2025-03-03 Thread Kuninori Morimoto
Signed-off-by: Kuninori Morimoto --- drivers/accel/habanalabs/gaudi/gaudi.c | 12 ++-- drivers/accel/habanalabs/gaudi/gaudi_coresight.c | 8 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/accel/habanalabs/gaudi/gaudi.c b/drivers/accel/habanal

[SAMPLE] crypto: nx: pseries: use string choices helper

2025-03-03 Thread Kuninori Morimoto
Signed-off-by: Kuninori Morimoto --- drivers/crypto/nx/nx-common-pseries.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/nx/nx-common-pseries.c b/drivers/crypto/nx/nx-common-pseries.c index 1660c5cf3641..1f8a73fb6bdd 100644 --- a/drivers/crypto/nx/nx

[SAMPLE] usb: musb: tusb6010: use string choices helper

2025-03-03 Thread Kuninori Morimoto
Signed-off-by: Kuninori Morimoto --- drivers/usb/musb/tusb6010_omap.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/usb/musb/tusb6010_omap.c b/drivers/usb/musb/tusb6010_omap.c index 60a93b8bbe3c..15d37aff5856 100644 --- a/drivers/usb/musb/tusb6010_omap

[SAMPLE] fpga: altera-fpga2sdram: use string choices helper

2025-03-03 Thread Kuninori Morimoto
Signed-off-by: Kuninori Morimoto --- drivers/fpga/altera-fpga2sdram.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/fpga/altera-fpga2sdram.c b/drivers/fpga/altera-fpga2sdram.c index e41492988dd6..720696401044 100644 --- a/drivers/fpga/altera-fpga2sdram.c +++ b/driv

[PATCH v2 08/10] lib/string_choices: Add str_level_edge() helper

2025-03-03 Thread Kuninori Morimoto
Add str_level_edge() helper to return "level" or "edge" string literal. Signed-off-by: Kuninori Morimoto --- include/linux/string_choices.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/string_choices.h b/include/linux/string_choices.h index e07a9a5e403e..1965d3a5976b 1

[PATCH v2 02/10] lib/string_choices: Add str_enabling_disabling() helper

2025-03-03 Thread Kuninori Morimoto
Add str_enabling_disabling() helper to return "enabling" or "disabling" string literal. Signed-off-by: Kuninori Morimoto --- include/linux/string_choices.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/string_choices.h b/include/linux/string_choices.h index fbbf1e657806

[PATCH v2 09/10] lib/string_choices: Add str_kernel_user() helper

2025-03-03 Thread Kuninori Morimoto
Add str_kernel_user() helper to return "kernel" or "user" string literal. Signed-off-by: Kuninori Morimoto --- include/linux/string_choices.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/string_choices.h b/include/linux/string_choices.h index 1965d3a5976b..82c5927d50a9

[PATCH v2 06/10] lib/string_choices: Add str_pass_fail() helper

2025-03-03 Thread Kuninori Morimoto
Add str_pass_fail() helper to return "pass" or "fail" string literal. Signed-off-by: Kuninori Morimoto --- include/linux/string_choices.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/string_choices.h b/include/linux/string_choices.h index 615ddbde4743..d52ced93e21e 100

[PATCH v2 07/10] lib/string_choices: Add str_to_from() helper

2025-03-03 Thread Kuninori Morimoto
Add str_to_from() helper to return "to" or "from" string literal. Signed-off-by: Kuninori Morimoto --- include/linux/string_choices.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/string_choices.h b/include/linux/string_choices.h index d52ced93e21e..e07a9a5e403e 100644

[PATCH v2 03/10] lib/string_choices: Add str_in_out() helper

2025-03-03 Thread Kuninori Morimoto
Add str_in_out() helper to return "in" or "out" string literal. Signed-off-by: Kuninori Morimoto --- include/linux/string_choices.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/string_choices.h b/include/linux/string_choices.h index 2a6c8df585ea..96b54874dc3a 100644 --

[PATCH v2 01/10] lib/string_choices: Add str_tx_rx() helper

2025-03-03 Thread Kuninori Morimoto
Add str_tx_rx() helper to return "tx" or "rx" string literal. Signed-off-by: Kuninori Morimoto --- include/linux/string_choices.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/string_choices.h b/include/linux/string_choices.h index 120ca0f28e95..fbbf1e657806 100644 ---

[PATCH v2 05/10] lib/string_choices: Add str_Y_N() helper

2025-03-03 Thread Kuninori Morimoto
Add str_Y_N() helper to return "Y" or "N" string literal. Signed-off-by: Kuninori Morimoto --- include/linux/string_choices.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/string_choices.h b/include/linux/string_choices.h index cc7c771f4e84..615ddbde4743 100644 --- a/in

[PATCH v2 00/10] lib/string_choices: Add new helpers

2025-03-03 Thread Kuninori Morimoto
Hi Kees, Andy This is v2 patch-set of "add new helpers". I would like to use string_choices helper to cleanup the code, but it is missing some of well used string pair in kernel. This patch-set adds it. Step1 Add new helpers (This patch-set) Step2 Each driver/framework use new h

Re: [PATCH 00/10] lib/string_choices: Add new helpers

2025-03-03 Thread Kuninori Morimoto
Hi Kees, Andy Thank you for your feedback > > > > Do you have some Coccinelle scripts or other patches that show the use > > > > of these helpers? We tend to avoid adding new helpers to the kernel > > > > unless there are active uses of them. (snip) > > I am not Kees, but my point of view on th

Re: [PATCH] kbuild: clang: Support building UM with SUBARCH=i386

2025-03-03 Thread Thomas Weißschuh
On 2025-03-03 13:52:41-0800, Kees Cook wrote: > The UM builds distinguish i386 from x86_64 via SUBARCH, but we don't > support building i386 directly with Clang. To make SUBARCH work for > i386 UM, we need to explicitly test for it. > > This lets me run i386 KUnit tests with Clang: > > $ ./tools/

[PATCH] kbuild: clang: Support building UM with SUBARCH=i386

2025-03-03 Thread Kees Cook
The UM builds distinguish i386 from x86_64 via SUBARCH, but we don't support building i386 directly with Clang. To make SUBARCH work for i386 UM, we need to explicitly test for it. This lets me run i386 KUnit tests with Clang: $ ./tools/testing/kunit/kunit.py run \ --make_options LLVM=1 \

[PATCH] hardening: Enable i386 FORTIFY_SOURCE on Clang 16+

2025-03-03 Thread Kees Cook
The i386 regparm bug exposed with FORTIFY_SOURCE with Clang was fixed in Clang 16[1]. Link: https://github.com/llvm/llvm-project/commit/c167c0a4dcdb998affb2756ce76903a12f7d8ca5 [1] Signed-off-by: Kees Cook --- Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Bill Wendling Cc: Justin Stitt Cc:

Re: [RFC] Type-Partitioned vmalloc (with sample *.ko code)

2025-03-03 Thread Kees Cook
On Fri, Feb 28, 2025 at 02:57:40PM -0600, Maxwell Bland wrote: > Dear Linux Hardening, Security, and Memory Management Mailing Lists, > > This is primarily an FYI and an RFC. I have some code, included below, > that could be dropped into a *.ko for the 6.1.X kernel, but really this > mail is to qu

Re: [PATCH v8 7/7] selftest: test system mappings are sealed.

2025-03-03 Thread Jeff Xu
On Mon, Mar 3, 2025 at 9:01 AM Kees Cook wrote: > > On Mon, Mar 03, 2025 at 05:09:21AM +, jef...@chromium.org wrote: > > From: Jeff Xu > > > > Add sysmap_is_sealed.c to test system mappings are sealed. > > > > Note: CONFIG_MSEAL_SYSTEM_MAPPINGS must be set, as indicated in > > config file. >

Re: [PATCH v8 7/7] selftest: test system mappings are sealed.

2025-03-03 Thread Jeff Xu
On Mon, Mar 3, 2025 at 8:43 AM Lorenzo Stoakes wrote: > > On Mon, Mar 03, 2025 at 12:08:49PM +, Lorenzo Stoakes wrote: > > > > On Mon, Mar 03, 2025 at 05:09:21AM +, jef...@chromium.org wrote: > > > From: Jeff Xu > > > > > > Add sysmap_is_sealed.c to test system mappings are sealed. > > >

Re: NEW GCC EXTENSION for kernel memory management.

2025-03-03 Thread Kees Cook
On Thu, Feb 20, 2025 at 07:26:10PM -0500, Aravind Ceyardass wrote: > Hello Kernel People, > > I have developed a new GCC extension called reftrack that could be used for > reference counting. Instead of manually adding code for > add()/dec() the reference count, it could be generated by this exte

Re: [PATCH v8 3/7] mseal sysmap: enable x86-64

2025-03-03 Thread Jeff Xu
On Mon, Mar 3, 2025 at 4:01 AM Lorenzo Stoakes wrote: > > I tried b4 shazam'ing this and there's a problem applying the patch, seems > maybe a conflict? > > Not sure if Andrew can resolve or if something needs to be done here? > > Seems to be commit d77a800944d8 ("mm: make DEBUG_@WX dependent on >

Re: [PATCH v8 1/7] mseal sysmap: kernel config and header change

2025-03-03 Thread Jeff Xu
On Mon, Mar 3, 2025 at 8:37 AM Kees Cook wrote: > > On Mon, Mar 03, 2025 at 05:09:15AM +, jef...@chromium.org wrote: > > From: Jeff Xu > > > > Provide infrastructure to mseal system mappings. Establish > > two kernel configs (CONFIG_MSEAL_SYSTEM_MAPPINGS, > > ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPIN

Re: [PATCH v2] scsi: target: Replace deprecated strncpy() with strscpy()

2025-03-03 Thread Kees Cook
On Sun, Mar 02, 2025 at 11:56:41PM +0100, Thorsten Blum wrote: > strncpy() is deprecated for NUL-terminated destination buffers; use > strscpy() instead. The destination buffer db_root is only used with "%s" > format strings and must therefore be NUL-terminated, but not NUL-padded. > > Use scnprin

Re: [RESEND PATCH] mux: Convert mux_control_ops to a flex array member in mux_chip

2025-03-03 Thread Kees Cook
On Mon, Mar 03, 2025 at 12:02:22AM +0100, Thorsten Blum wrote: > Convert mux_control_ops to a flexible array member at the end of the > mux_chip struct and add the __counted_by() compiler attribute to > improve access bounds-checking via CONFIG_UBSAN_BOUNDS and > CONFIG_FORTIFY_SOURCE. > > Use str

Re: [PATCH v2] compiler.h: Introduce __must_be_noncstr()

2025-03-03 Thread Kees Cook
On Sat, Mar 01, 2025 at 05:46:24AM +, Michael Kelley wrote: > From: Kees Cook Sent: Friday, February 28, 2025 9:42 AM > > > > In preparation for adding more type checking to the memtostr/strtomem*() > > helpers, introduce the ability to check for the "nonstring" attribute. > > This is the rev

Re: [PATCH 00/10] lib/string_choices: Add new helpers

2025-03-03 Thread Kees Cook
On Fri, Feb 28, 2025 at 10:24:22PM +0200, Andy Shevchenko wrote: > On Fri, Feb 28, 2025 at 9:44 PM Kees Cook wrote: > > > > On Wed, Feb 26, 2025 at 05:34:48AM +, Kuninori Morimoto wrote: > > > I would like to use string_choices helper to cleanup the code, but it > > > missing > > > some of we

Re: [PATCH 00/10] lib/string_choices: Add new helpers

2025-03-03 Thread Andy Shevchenko
On Mon, Mar 3, 2025 at 7:18 PM Kees Cook wrote: > On Fri, Feb 28, 2025 at 10:24:22PM +0200, Andy Shevchenko wrote: > > On Fri, Feb 28, 2025 at 9:44 PM Kees Cook wrote: ... > > Kees, what is the status of the > > https://lore.kernel.org/linux-kernel/20241119021719.7659-1-prosunoffic...@gmail.com

Re: (subset) [PATCH v2 linux-next 1/2] lib/string_choices: Rearrange functions in sorted order

2025-03-03 Thread Kees Cook
On Tue, 19 Nov 2024 07:47:18 +0530, R Sundar wrote: > Rearrange misplaced functions in sorted order. > > Applied to for-next/hardening, thanks! [1/2] lib/string_choices: Rearrange functions in sorted order https://git.kernel.org/kees/c/e8cd61e403ea Take care, -- Kees Cook

Re: [PATCH 00/10] lib/string_choices: Add new helpers

2025-03-03 Thread Kees Cook
On Mon, Mar 03, 2025 at 08:20:20AM +0200, Andy Shevchenko wrote: > On Mon, Mar 3, 2025 at 1:16 AM Kuninori Morimoto > wrote: > > > > > > Hi Kees > > > > Thank you for your feedback > > > > > > I would like to use string_choices helper to cleanup the code, but it > > > > missing > > > > some of we

Re: [PATCH v8 7/7] selftest: test system mappings are sealed.

2025-03-03 Thread Lorenzo Stoakes
On Mon, Mar 03, 2025 at 08:47:13AM -0800, Kees Cook wrote: > On Mon, Mar 03, 2025 at 12:08:49PM +, Lorenzo Stoakes wrote: > > > > On Mon, Mar 03, 2025 at 05:09:21AM +, jef...@chromium.org wrote: > > > From: Jeff Xu > > > > > > Add sysmap_is_sealed.c to test system mappings are sealed. > >

Re: [PATCH v8 7/7] selftest: test system mappings are sealed.

2025-03-03 Thread Kees Cook
On Mon, Mar 03, 2025 at 05:09:21AM +, jef...@chromium.org wrote: > From: Jeff Xu > > Add sysmap_is_sealed.c to test system mappings are sealed. > > Note: CONFIG_MSEAL_SYSTEM_MAPPINGS must be set, as indicated in > config file. > > Signed-off-by: Jeff Xu > --- > .../mseal_system_mappings/.

Re: [PATCH v8 7/7] selftest: test system mappings are sealed.

2025-03-03 Thread Kees Cook
On Mon, Mar 03, 2025 at 04:43:47PM +, Lorenzo Stoakes wrote: > On Mon, Mar 03, 2025 at 12:08:49PM +, Lorenzo Stoakes wrote: > > > > On Mon, Mar 03, 2025 at 05:09:21AM +, jef...@chromium.org wrote: > > > From: Jeff Xu > > > > > > Add sysmap_is_sealed.c to test system mappings are sealed

Re: [PATCH v8 7/7] selftest: test system mappings are sealed.

2025-03-03 Thread Kees Cook
On Mon, Mar 03, 2025 at 12:08:49PM +, Lorenzo Stoakes wrote: > > On Mon, Mar 03, 2025 at 05:09:21AM +, jef...@chromium.org wrote: > > From: Jeff Xu > > > > Add sysmap_is_sealed.c to test system mappings are sealed. > > > > Note: CONFIG_MSEAL_SYSTEM_MAPPINGS must be set, as indicated in >

Re: [PATCH v8 4/7] mseal sysmap: enable arm64

2025-03-03 Thread Kees Cook
On Mon, Mar 03, 2025 at 05:09:18AM +, jef...@chromium.org wrote: > From: Jeff Xu > > Provide support for CONFIG_MSEAL_SYSTEM_MAPPINGS on arm64, covering > the vdso, vvar, and compat-mode vectors and sigpage mappings. > > Production release testing passes on Android and Chrome OS. > > Signed

Re: [PATCH v8 5/7] mseal sysmap: uprobe mapping

2025-03-03 Thread Kees Cook
On Mon, Mar 03, 2025 at 05:09:19AM +, jef...@chromium.org wrote: > From: Jeff Xu > > Provide support to mseal the uprobe mapping. > > Unlike other system mappings, the uprobe mapping is not > established during program startup. However, its lifetime is the same > as the process's lifetime. I

Re: [PATCH v8 7/7] selftest: test system mappings are sealed.

2025-03-03 Thread Lorenzo Stoakes
On Mon, Mar 03, 2025 at 12:08:49PM +, Lorenzo Stoakes wrote: > > On Mon, Mar 03, 2025 at 05:09:21AM +, jef...@chromium.org wrote: > > From: Jeff Xu > > > > Add sysmap_is_sealed.c to test system mappings are sealed. > > > > Note: CONFIG_MSEAL_SYSTEM_MAPPINGS must be set, as indicated in > >

Re: [PATCH v8 3/7] mseal sysmap: enable x86-64

2025-03-03 Thread Kees Cook
On Mon, Mar 03, 2025 at 05:09:17AM +, jef...@chromium.org wrote: > From: Jeff Xu > > Provide support for CONFIG_MSEAL_SYSTEM_MAPPINGS on x86-64, > covering the vdso, vvar, vvar_vclock. > > Production release testing passes on Android and Chrome OS. > > Signed-off-by: Jeff Xu Short and to

Re: [PATCH v8 1/7] mseal sysmap: kernel config and header change

2025-03-03 Thread Kees Cook
On Mon, Mar 03, 2025 at 05:09:15AM +, jef...@chromium.org wrote: > From: Jeff Xu > > Provide infrastructure to mseal system mappings. Establish > two kernel configs (CONFIG_MSEAL_SYSTEM_MAPPINGS, > ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS) and VM_SEALED_SYSMAP > macro for future patches. > > Sign

Re: [PATCH v8 0/7] mseal system mappings

2025-03-03 Thread Kees Cook
On Mon, Mar 03, 2025 at 09:59:13AM -0500, Liam R. Howlett wrote: > * jef...@chromium.org [250303 00:09]: > > ... > > > > > Link: > > https://lore.kernel.org/all/20240415163527.626541-1-jef...@chromium.org/ [1] > > Link: Documentation/userspace-api/mseal.rst [2] > > Link: > > https://lore.kern

Re: [PATCH v8 1/7] mseal sysmap: kernel config and header change

2025-03-03 Thread Liam R. Howlett
* jef...@chromium.org [250303 00:09]: > From: Jeff Xu > > Provide infrastructure to mseal system mappings. Establish > two kernel configs (CONFIG_MSEAL_SYSTEM_MAPPINGS, > ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS) and VM_SEALED_SYSMAP > macro for future patches. > > Signed-off-by: Jeff Xu Reviewed-

Re: [PATCH v8 5/7] mseal sysmap: uprobe mapping

2025-03-03 Thread Liam R. Howlett
* jef...@chromium.org [250303 00:09]: > From: Jeff Xu > > Provide support to mseal the uprobe mapping. > > Unlike other system mappings, the uprobe mapping is not > established during program startup. However, its lifetime is the same > as the process's lifetime. It could be sealed from creatio

Re: [PATCH v8 6/7] mseal sysmap: update mseal.rst

2025-03-03 Thread Liam R. Howlett
* jef...@chromium.org [250303 00:09]: > From: Jeff Xu > > Update memory sealing documentation to include details about system > mappings. > > Signed-off-by: Jeff Xu > Reviewed-by: Kees Cook Reviewed-by: Liam R. Howlett > --- > Documentation/userspace-api/mseal.rst | 20 +++

Re: [PATCH v8 4/7] mseal sysmap: enable arm64

2025-03-03 Thread Liam R. Howlett
* jef...@chromium.org [250303 00:09]: > From: Jeff Xu > > Provide support for CONFIG_MSEAL_SYSTEM_MAPPINGS on arm64, covering > the vdso, vvar, and compat-mode vectors and sigpage mappings. > > Production release testing passes on Android and Chrome OS. > > Signed-off-by: Jeff Xu Reviewed-by

Re: [PATCH v8 3/7] mseal sysmap: enable x86-64

2025-03-03 Thread Liam R. Howlett
* jef...@chromium.org [250303 00:09]: > From: Jeff Xu > > Provide support for CONFIG_MSEAL_SYSTEM_MAPPINGS on x86-64, > covering the vdso, vvar, vvar_vclock. > > Production release testing passes on Android and Chrome OS. > > Signed-off-by: Jeff Xu Thanks, this is much cleaner. Reviewed-by:

Re: [PATCH v8 2/7] selftests: x86: test_mremap_vdso: skip if vdso is msealed

2025-03-03 Thread Liam R. Howlett
* jef...@chromium.org [250303 00:09]: > From: Jeff Xu > > Add code to detect if the vdso is memory sealed, skip the test > if it is. > > Signed-off-by: Jeff Xu > Reviewed-by: Kees Cook > Reviewed-by: Lorenzo Stoakes Reviewed-by: Liam R. Howlett > --- > .../testing/selftests/x86/test_mre

Re: [PATCH v8 0/7] mseal system mappings

2025-03-03 Thread Liam R. Howlett
* jef...@chromium.org [250303 00:09]: ... > > Link: > https://lore.kernel.org/all/20240415163527.626541-1-jef...@chromium.org/ [1] > Link: Documentation/userspace-api/mseal.rst [2] > Link: > https://lore.kernel.org/all/cabi2sku9brunqf70-nksumcq+yyiwjo3fm4xkrkl-nrczxy...@mail.gmail.com/ > [3]

Re: [PATCH] platform/x86: hp-bioscfg: Replace deprecated strncpy() with strscpy()

2025-03-03 Thread Ilpo Järvinen
On Wed, 26 Feb 2025 00:21:27 +0100, Thorsten Blum wrote: > Since kstrtol() requires a NUL-terminated string as input and strncpy() > is deprecated for NUL-terminated destination buffers, use strscpy() > instead. > > Compile-tested only. > > > [...] Thank you for your contribution, it has been

Re: [PATCH v4 0/7] Add support for the Exynos7870 SoC, along with three devices

2025-03-03 Thread Rob Herring (Arm)
On Sat, 01 Mar 2025 01:16:48 +0530, Kaustabh Chakraborty wrote: > Samsung Exynos 7870 (codename: Joshua) is an ARM-v8 system-on-chip that was > announced in 2016. The chipset was found in several popular mid-range to > low-end Samsung phones, released within 2016 to 2019. > > This patch series a

Re: [PATCH v8 7/7] selftest: test system mappings are sealed.

2025-03-03 Thread Lorenzo Stoakes
On Mon, Mar 03, 2025 at 05:09:21AM +, jef...@chromium.org wrote: > From: Jeff Xu > > Add sysmap_is_sealed.c to test system mappings are sealed. > > Note: CONFIG_MSEAL_SYSTEM_MAPPINGS must be set, as indicated in > config file. > > Signed-off-by: Jeff Xu We do need to add this to the genera

Re: [PATCH v8 3/7] mseal sysmap: enable x86-64

2025-03-03 Thread Lorenzo Stoakes
I tried b4 shazam'ing this and there's a problem applying the patch, seems maybe a conflict? Not sure if Andrew can resolve or if something needs to be done here? Seems to be commit d77a800944d8 ("mm: make DEBUG_@WX dependent on GENERIC_PTDUMP")? Should be a trivial resolve though. On Mon, Mar

Re: [PATCH v8 5/7] mseal sysmap: uprobe mapping

2025-03-03 Thread Lorenzo Stoakes
On Mon, Mar 03, 2025 at 05:09:19AM +, jef...@chromium.org wrote: > From: Jeff Xu > > Provide support to mseal the uprobe mapping. > > Unlike other system mappings, the uprobe mapping is not > established during program startup. However, its lifetime is the same > as the process's lifetime. It

Re: [PATCH v8 3/7] mseal sysmap: enable x86-64

2025-03-03 Thread Lorenzo Stoakes
On Mon, Mar 03, 2025 at 05:09:17AM +, jef...@chromium.org wrote: > From: Jeff Xu > > Provide support for CONFIG_MSEAL_SYSTEM_MAPPINGS on x86-64, > covering the vdso, vvar, vvar_vclock. > > Production release testing passes on Android and Chrome OS. > > Signed-off-by: Jeff Xu LGTM, so: Revie

Re: [PATCH v8 6/7] mseal sysmap: update mseal.rst

2025-03-03 Thread Lorenzo Stoakes
On Mon, Mar 03, 2025 at 05:09:20AM +, jef...@chromium.org wrote: > From: Jeff Xu > > Update memory sealing documentation to include details about system > mappings. > > Signed-off-by: Jeff Xu > Reviewed-by: Kees Cook LGTM so: Reviewed-by: Lorenzo Stoakes > --- > Documentation/userspace-

Re: [PATCH v8 1/7] mseal sysmap: kernel config and header change

2025-03-03 Thread Lorenzo Stoakes
On Mon, Mar 03, 2025 at 05:09:15AM +, jef...@chromium.org wrote: > From: Jeff Xu > > Provide infrastructure to mseal system mappings. Establish > two kernel configs (CONFIG_MSEAL_SYSTEM_MAPPINGS, > ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS) and VM_SEALED_SYSMAP > macro for future patches. > > Signed

Re: [PATCH v8 4/7] mseal sysmap: enable arm64

2025-03-03 Thread Lorenzo Stoakes
On Mon, Mar 03, 2025 at 05:09:18AM +, jef...@chromium.org wrote: > From: Jeff Xu > > Provide support for CONFIG_MSEAL_SYSTEM_MAPPINGS on arm64, covering > the vdso, vvar, and compat-mode vectors and sigpage mappings. > > Production release testing passes on Android and Chrome OS. > > Signed-of

Re: [PATCH v8 0/7] mseal system mappings

2025-03-03 Thread Lorenzo Stoakes
Great nice descriptions thanks! On Mon, Mar 03, 2025 at 05:09:14AM +, jef...@chromium.org wrote: > From: Jeff Xu > > This is V8 version, addressing comments from V7, without code logic > change. > > --- > As discussed during msea