Re: [PATCH v7 1/7] mseal, system mappings: kernel config and header change

2025-02-28 Thread Lorenzo Stoakes
On Thu, Feb 27, 2025 at 04:04:03PM -0800, Jeff Xu wrote: > On Tue, Feb 25, 2025 at 10:04 PM Lorenzo Stoakes > wrote: > > > > On Tue, Feb 25, 2025 at 05:33:24PM -0800, Jeff Xu wrote: > > > On Mon, Feb 24, 2025 at 10:05 PM Lorenzo Stoakes > > > wrote: > > > > > +config ARCH_HAS_MSEAL_SYSTEM_MAPPING

[PATCH v3 5/6] gpio: max77759: add Maxim MAX77759 gpio driver

2025-02-28 Thread André Draszik
The Maxim MAX77759 is a companion PMIC for USB Type-C applications and includes Battery Charger, Fuel Gauge, temperature sensors, USB Type-C Port Controller (TCPC), NVMEM, and a GPIO expander. This driver supports the GPIO functions using the platform device registered by the core MFD driver. Sig

[PATCH v3 4/6] mfd: max77759: add Maxim MAX77759 core mfd driver

2025-02-28 Thread André Draszik
The Maxim MAX77759 is a companion PMIC for USB Type-C applications and includes Battery Charger, Fuel Gauge, temperature sensors, USB Type-C Port Controller (TCPC), NVMEM, and a GPIO expander. Fuel Gauge and TCPC have separate and independent I2C addresses, register maps, and interrupt lines and a

[PATCH v3 0/6] Maxim Integrated MAX77759 PMIC MFD-based drivers

2025-02-28 Thread André Draszik
Hi, This series improves support for the Maxim Integrated MAX77759 companion PMIC for USB Type-C applications using the MFD framework. This series must be applied in-order, due to interdependencies of some of the patches: * to avoid use of undocumented compatibles by the newly added drivers, th

[PATCH v3 3/6] dt-bindings: mfd: add max77759 binding

2025-02-28 Thread André Draszik
The Maxim MAX77759 is a companion PMIC for USB Type-C applications and includes Battery Charger, Fuel Gauge, temperature sensors, USB Type-C Port Controller (TCPC), NVMEM, and a GPIO expander. This describes the top-level device. Signed-off-by: André Draszik --- v3: * drop gpio-controller and g

[PATCH v3 1/6] dt-bindings: gpio: add max77759 binding

2025-02-28 Thread André Draszik
The Maxim MAX77759 is a companion PMIC for USB Type-C applications and includes Battery Charger, Fuel Gauge, temperature sensors, USB Type-C Port Controller (TCPC), NVMEM, and a GPIO expander. This describes its GPIO module. Reviewed-by: Rob Herring (Arm) Signed-off-by: André Draszik --- v2: *

[PATCH] bpftool: Replace strncpy with strscpy

2025-02-28 Thread Michael Estner
strncpy() is deprecated for NUL-terminated destination buffers. Use strscpy() instead and remove the manual NUL-termination. Compile-tested only. Link: https://github.com/KSPP/linux/issues/90 Signed-off-by: Michael Estner --- tools/bpf/bpftool/xlated_dumper.c | 3 +-- 1 file changed, 1 inserti

[PATCH v3 6/6] nvmem: max77759: add Maxim MAX77759 NVMEM driver

2025-02-28 Thread André Draszik
The Maxim MAX77759 is a companion PMIC for USB Type-C applications and includes Battery Charger, Fuel Gauge, temperature sensors, USB Type-C Port Controller (TCPC), NVMEM, and a GPIO expander. This driver exposes the non volatile memory using the platform device registered by the core MFD driver.

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

2025-02-28 Thread Kees Cook
In preparation for adding more type checking to the memtostr/strtomem*() helpers, introduce the ability to check for the "nonstring" attribute. This is the reverse of what was added to strscpy*() in commit 559048d156ff ("string: Check for "nonstring" attribute on strscpy() arguments"). Note that _

Re: [PATCH v3 1/6] dt-bindings: gpio: add max77759 binding

2025-02-28 Thread Rob Herring (Arm)
on/devicetree/bindings/gpio/maxim,max77759-gpio.yaml references a file that doesn't exist: Documentation/devicetree/bindings/mfd/maxim,max77759.yaml Documentation/devicetree/bindings/gpio/maxim,max77759-gpio.yaml: Documentation/devicetree/bindings/mfd/maxim,max77759.yaml See https://patch

Re: [PATCH v3 2/6] dt-bindings: nvmem: add max77759 binding

2025-02-28 Thread Rob Herring (Arm)
9-nvmem.yaml: Documentation/devicetree/bindings/mfd/maxim,max77759.yaml See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250228-max77759-mfd-v3-2-0c3627d42...@linaro.org The base for the series is generally the latest rc1. A different dependency should be noted in *this* patc

Re: your mail

2025-02-28 Thread Jeff Xu
On Fri, Feb 28, 2025 at 1:35 AM Lorenzo Stoakes wrote: > > On Thu, Feb 27, 2025 at 04:55:06PM -0800, Jeff Xu wrote: > > Hi Lorenzo, > > > > On Tue, Feb 25, 2025, 9:43 PM Lorenzo Stoakes > > > > > > > > 2. Tests - could you please add some tests to assert that mremap() > > > > > fails > > > > >

Re: your mail

2025-02-28 Thread Lorenzo Stoakes
On Fri, Feb 28, 2025 at 09:24:11AM -0800, Jeff Xu wrote: [snip] > > > > > > When the vdso is marked with "sl", mremap() will fail, that's part of > > > the mseal() business logic and belongs in mseal_test. The mseal_test > > > already covers the mseal, and this series doesn't change mseal. > > >

Re: [PATCH v7 6/7] mseal, system mappings: uprobe mapping

2025-02-28 Thread Lorenzo Stoakes
On Thu, Feb 27, 2025 at 03:38:47PM -0800, Jeff Xu wrote: > On Wed, Feb 26, 2025 at 10:25 AM Lorenzo Stoakes > wrote: > > > > On Wed, Feb 26, 2025 at 07:20:50PM +0100, Oleg Nesterov wrote: > > > On 02/26, Lorenzo Stoakes wrote: > > > > > > > > Like I said, Jeff opposes the change. I disagree with h

Re: [PATCH v2 3/6] dt-bindings: mfd: add max77759 binding

2025-02-28 Thread André Draszik
On Fri, 2025-02-28 at 07:01 -0600, Rob Herring wrote: > On Thu, Feb 27, 2025 at 7:14 AM André Draszik > wrote: > > > > On Thu, 2025-02-27 at 07:04 -0600, Rob Herring wrote: > > > > > > > > > Why do you have GPIO properties here and in the child node? Either would > > > be valid, but both probab

Re: [RFC] Circumventing FineIBT Via Entrypoints

2025-02-28 Thread Florian Weimer
* Andrew Cooper: > The SYSCALL behaviour TLDR is: > >     %rcx = %rip >     %r11 = %eflags >     %cs = fixed attr >     %ss = fixed attr >     %rip = MSR_LSTAR > > which means that %rcx (old rip) is the only piece of state which > userspace can't feasibly forge (and therefore could distinguish a >

Re: [PATCH v2 5/6] gpio: max77759: add Maxim MAX77759 gpio driver

2025-02-28 Thread André Draszik
On Fri, 2025-02-28 at 10:58 +, André Draszik wrote: > Hi Linus, > > Thanks for you review! > > On Fri, 2025-02-28 at 08:10 +0100, Linus Walleij wrote: > > Hi André, > > > > thanks for your patch! > > > > mostly looks fine, given the MFD design is accepted. > > Nitpicks below: > > > > On We

Re: [PATCH v2 3/6] dt-bindings: mfd: add max77759 binding

2025-02-28 Thread Rob Herring
On Thu, Feb 27, 2025 at 7:14 AM André Draszik wrote: > > On Thu, 2025-02-27 at 07:04 -0600, Rob Herring wrote: > > On Wed, Feb 26, 2025 at 05:51:22PM +, André Draszik wrote: > > > The Maxim MAX77759 is a companion PMIC for USB Type-C applications and > > > includes Battery Charger, Fuel Gauge,

Re: [PATCH v7 4/7] mseal, system mappings: enable arm64

2025-02-28 Thread Lorenzo Stoakes
On Thu, Feb 27, 2025 at 04:48:23PM -0800, Jeff Xu wrote: > On Wed, Feb 26, 2025 at 9:43 AM Lorenzo Stoakes > wrote: > > > > On Wed, Feb 26, 2025 at 09:17:10AM -0800, Jeff Xu wrote: > > > On Wed, Feb 26, 2025 at 9:12 AM Liam R. Howlett > > > wrote: > > > > > > > > * Lorenzo Stoakes [250226 00:26

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

2025-02-28 Thread Lorenzo Stoakes
On Thu, Feb 27, 2025 at 03:43:07PM -0800, Jeff Xu wrote: > On Tue, Feb 25, 2025 at 10:01 PM Lorenzo Stoakes > wrote: > > > > On Tue, Feb 25, 2025 at 04:17:01PM -0800, Jeff Xu wrote: > > > On Tue, Feb 25, 2025 at 2:32 AM Lorenzo Stoakes > > > wrote: > > > > > > > > BTW can we please drop the 'msea

Re: [PATCH v2 5/6] gpio: max77759: add Maxim MAX77759 gpio driver

2025-02-28 Thread André Draszik
Hi Linus, Thanks for you review! On Fri, 2025-02-28 at 08:10 +0100, Linus Walleij wrote: > Hi André, > > thanks for your patch! > > mostly looks fine, given the MFD design is accepted. > Nitpicks below: > > On Wed, Feb 26, 2025 at 6:51 PM André Draszik > wrote: > > > +static irqreturn_t max

[PATCH v3 2/6] dt-bindings: nvmem: add max77759 binding

2025-02-28 Thread André Draszik
The Maxim MAX77759 is a companion PMIC for USB Type-C applications and includes Battery Charger, Fuel Gauge, temperature sensors, USB Type-C Port Controller (TCPC), NVMEM, and a GPIO expander. This describes its storage module (NVMEM). Reviewed-by: Rob Herring (Arm) Signed-off-by: André Draszik

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

2025-02-28 Thread Michael Kelley
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 reverse of what was added to strscpy*() in commit 559048d156ff > ("string: Ch

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

2025-02-28 Thread Kaustabh Chakraborty
On 2025-02-28 19:46, 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 aims to add suppor

[PATCH v4 2/7] dt-bindings: arm: samsung: add compatibles for exynos7870 devices

2025-02-28 Thread Kaustabh Chakraborty
Document the compatible string for Exynos7870 - "samsung,exynos7870". The following devices are also added: - Galaxy A2 Core ("samsung,a2corelte") - Galaxy J6("samsung,j6lte") - Galaxy J7 Prime ("samsung,on7xelte") Signed-off-by: Kaustabh Chakraborty --- Documentation/

[PATCH v4 6/7] arm64: dts: exynos: add initial support for Samsung Galaxy A2 Core

2025-02-28 Thread Kaustabh Chakraborty
Add initial devicetree support for Samsung Galaxy A2 Core (codename: a2corelte), an Exynos7870 device. Signed-off-by: Kaustabh Chakraborty --- arch/arm64/boot/dts/exynos/Makefile| 1 + .../arm64/boot/dts/exynos/exynos7870-a2corelte.dts | 628 + 2 files chang

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

2025-02-28 Thread Kaustabh Chakraborty
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 aims to add support for Exynos 7870, starting with the most basic yet essenti

Re: [PATCH] bpftool: Replace strncpy with strscpy

2025-02-28 Thread Quentin Monnet
2025-02-28 19:18 UTC+0100 ~ Michael Estner > strncpy() is deprecated for NUL-terminated destination buffers. Use > strscpy() instead and remove the manual NUL-termination. > > Compile-tested only. How? The change does _not_ compile in my case: $ cd tool/bpf/bpftool $ make -j

Re: [PATCH v3 3/6] dt-bindings: mfd: add max77759 binding

2025-02-28 Thread Rob Herring (Arm)
On Fri, 28 Feb 2025 14:25:17 +, André Draszik wrote: > The Maxim MAX77759 is a companion PMIC for USB Type-C applications and > includes Battery Charger, Fuel Gauge, temperature sensors, USB Type-C > Port Controller (TCPC), NVMEM, and a GPIO expander. > > This describes the top-level device.

[PATCH v4 1/7] dt-bindings: soc: samsung: exynos-pmu: add exynos7870-pmu compatible

2025-02-28 Thread Kaustabh Chakraborty
Document the compatible string for the Exynos7870 PMU. It's compatible with the Exynos7 PMU design. It handles syscon reboot, syscon reboot mode, as well as other system control registers (i.e registers for the USB PHY). Signed-off-by: Kaustabh Chakraborty --- Documentation/devicetree/bindings/s

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

2025-02-28 Thread Andy Shevchenko
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 well used string pair in kernel. This patch-set adds it. > > Do you have some C

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

2025-02-28 Thread Maxwell Bland
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 query about ideas for acceptable upstream changes. Thank you ahead of time

[PATCH v4 4/7] arm64: dts: exynos: add initial devicetree support for exynos7870

2025-02-28 Thread Kaustabh Chakraborty
Exynos7870 is an arm64 SoC manufactured by Samsung and announced in 2016. It is present in multiple mid-range Samsung phones and tablets. Add basic devicetree support for the SoC, which includes CMUs, pin controllers, I2C, UART, DW-MMC, and USB-DRD. Signed-off-by: Kaustabh Chakraborty --- arch/

[PATCH v4 7/7] arm64: dts: exynos: add initial support for Samsung Galaxy J6

2025-02-28 Thread Kaustabh Chakraborty
Add initial devicetree support for Samsung Galaxy J6 (codename: j6lte), an Exynos7870 device. Signed-off-by: Kaustabh Chakraborty --- arch/arm64/boot/dts/exynos/Makefile | 1 + arch/arm64/boot/dts/exynos/exynos7870-j6lte.dts | 616 2 files changed, 617 inse

[PATCH] uaccess: Introduce ucopysize.h

2025-02-28 Thread Kees Cook
The object size sanity checking macros that uaccess.h and uio.h use have been living in thread_info.h for historical reasons. Needing to use jump labels for these checks, however, introduces a header include loop under certain conditions. The dependencies for the object checking macros are very lim

[PATCH v4 5/7] arm64: dts: exynos: add initial support for Samsung Galaxy J7 Prime

2025-02-28 Thread Kaustabh Chakraborty
Add initial devicetree support for Samsung Galaxy J7 Prime (codename: on7xelte), an Exynos7870 device. Signed-off-by: Kaustabh Chakraborty --- arch/arm64/boot/dts/exynos/Makefile| 1 + arch/arm64/boot/dts/exynos/exynos7870-on7xelte.dts | 664 + 2 files chang

[PATCH v4 3/7] soc: samsung: exynos-chipid: add support for exynos7870

2025-02-28 Thread Kaustabh Chakraborty
Add the product ID of Exynos7870 (S5E7870) to the existing list. Signed-off-by: Kaustabh Chakraborty --- drivers/soc/samsung/exynos-chipid.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/samsung/exynos-chipid.c b/drivers/soc/samsung/exynos-chipid.c index 3f1a654c7e665bcccf6d1

Re: [PATCH] hwmon: (pmbus/core) Replace deprecated strncpy() with strscpy()

2025-02-28 Thread Thorsten Blum
On 27. Feb 2025, at 23:37, Guenter Roeck wrote: > On 2/27/25 09:39, Thorsten Blum wrote: >> strncpy() is deprecated for NUL-terminated destination buffers; use >> strscpy() instead. >> Compile-tested only. >> Link: https://github.com/KSPP/linux/issues/90 >> Cc: linux-hardening@vger.kernel.org >> Si

Re: your mail

2025-02-28 Thread Lorenzo Stoakes
On Thu, Feb 27, 2025 at 04:55:06PM -0800, Jeff Xu wrote: > Hi Lorenzo, > > On Tue, Feb 25, 2025, 9:43 PM Lorenzo Stoakes > > > > > > 2. Tests - could you please add some tests to assert that mremap() fails > > > >for VDSO for instance? You've edited an existing test for VDSO in > > > > x86 to