Re: [PATCH bpf-next v3 11/11] bpf: Fall back to nospec for sanitization-failures

2025-05-13 Thread Kumar Kartikeya Dwivedi
On Thu, 1 May 2025 at 04:10, Luis Gerhorst wrote: > > ALU sanitization was introduced to ensure that a subsequent ptr access > can never go OOB, even under speculation. This is required because we > currently allow speculative scalar confusion. Spec. scalar confusion is > possible because Spectre

Re: [PATCH v4 2/5] PCI/ERR: Add support for resetting the slots in a platform specific way

2025-05-13 Thread Krishna Chaitanya Chundru
On 5/8/2025 12:40 PM, Manivannan Sadhasivam wrote: Some host bridge devices require resetting the slots in a platform specific way to recover them from error conditions such as Fatal AER errors, Link Down etc... So introduce pci_host_bridge::reset_slot callback and call it from pcibios_reset_s

Re: [PATCH v4 5/5] PCI: qcom: Add support for resetting the slot due to link down event

2025-05-13 Thread Krishna Chaitanya Chundru
On 5/8/2025 12:40 PM, Manivannan Sadhasivam wrote: The PCIe link can go down under circumstances such as the device firmware crash, link instability, etc... When that happens, the PCIe slot needs to be reset to make it operational again. Currently, the driver is not handling the link down even

Re: [PATCH v4 4/5] PCI: host-common: Add link down handling for host bridges

2025-05-13 Thread Krishna Chaitanya Chundru
On 5/8/2025 12:40 PM, Manivannan Sadhasivam wrote: The PCI link, when down, needs to be recovered to bring it back. But that cannot be done in a generic way as link recovery procedure is specific to host bridges. So add a new API pci_host_handle_link_down() that could be called by the host bri

Re: [PATCH bpf-next v3 10/11] bpf: Allow nospec-protected var-offset stack access

2025-05-13 Thread Kumar Kartikeya Dwivedi
On Thu, 1 May 2025 at 04:17, Luis Gerhorst wrote: > > Insert a nospec before the access to prevent it from ever using an index > that is subject to speculative scalar-confusion. > > The access itself can either happen directly in the BPF program (reads > only, check_stack_read_var_off()) or in a h

Re: [PATCH bpf-next v3 08/11] bpf: Fall back to nospec for Spectre v1

2025-05-13 Thread Kumar Kartikeya Dwivedi
On Thu, 1 May 2025 at 04:00, Luis Gerhorst wrote: > > This implements the core of the series and causes the verifier to fall > back to mitigating Spectre v1 using speculation barriers. The approach > was presented at LPC'24 [1] and RAID'24 [2]. > > If we find any forbidden behavior on a speculativ

[PATCH] crypto: powerpc/poly1305 - add depends on BROKEN for now

2025-05-13 Thread Eric Biggers
From: Eric Biggers As discussed in the thread containing https://lore.kernel.org/linux-crypto/20250510053308.GB505731@sol/, the Power10-optimized Poly1305 code is currently not safe to call in softirq context. Disable it for now. It can be re-enabled once it is fixed. Fixes: ba8f8624fde2 ("cry

Re: [PATCH] irqdomain: ppc: Switch to of_fwnode_handle()

2025-05-13 Thread Mahesh J Salgaonkar
On 2025-05-14 09:54:46 Wed, Mahesh J Salgaonkar wrote: > On 2025-04-15 12:47:58 Tue, Jiri Slaby (SUSE) wrote: > > of_node_to_fwnode() is irqdomain's reimplementation of the "officially" > > defined of_fwnode_handle(). The former is in the process of being > > removed, so use the latter instead. > >

Re: [PATCH] irqdomain: ppc: Switch to of_fwnode_handle()

2025-05-13 Thread Mahesh J Salgaonkar
On 2025-04-15 12:47:58 Tue, Jiri Slaby (SUSE) wrote: > of_node_to_fwnode() is irqdomain's reimplementation of the "officially" > defined of_fwnode_handle(). The former is in the process of being > removed, so use the latter instead. > > Signed-off-by: Jiri Slaby (SUSE) > Cc: Madhavan Srinivasan

Re: [PATCH v3] powerpc/boot: Fix build with gcc 15

2025-05-13 Thread Madhavan Srinivasan
On Mon, 31 Mar 2025 12:57:19 +0200, Michal Suchanek wrote: > Similar to x86 the ppc boot code does not build with GCC 15. > > Copy the fix from > commit ee2ab467bddf ("x86/boot: Use '-std=gnu11' to fix build with GCC 15") > > Applied to powerpc/next. [1/1] powerpc/boot: Fix build with gcc 15

Re: [PATCH v2 0/5] powerpc: convert board-file GPIO chips to using new value setters

2025-05-13 Thread Madhavan Srinivasan
On Fri, 02 May 2025 10:59:46 +0200, Bartosz Golaszewski wrote: > struct gpio_chip now has callbacks for setting line values that return > an integer, allowing to indicate failures. We're in the process of > converting all GPIO drivers to using the new API. This series converts > all powerpc board-f

Re: [PATCH V3 0/9] Add support for configure and control of Hardware Trace Macro(HTM)

2025-05-13 Thread Madhavan Srinivasan
On Sun, 20 Apr 2025 23:38:35 +0530, Athira Rajeev wrote: > H_HTM (Hardware Trace Macro) hypervisor call is an HCALL to export > data from Hardware Trace Macro (HTM) function. The debugfs interface > to export the HTM function data in a partition currently supports only > dumping of HTM data in an l

Re: [kvm-unit-tests PATCH v3 04/16] run_tests.sh: Document --probe-maxsmp argument

2025-05-13 Thread Shaoqin Huang
On 5/7/25 11:12 PM, Alexandru Elisei wrote: Commit 5dd20ec76ea63 ("runtime: Update MAX_SMP probe") added the --probe-maxmp argument, but the help message for run_tests.sh wasn't updated. Document --probe-maxsmp. Reviewed-by: Andrew Jones Signed-off-by: Alexandru Elisei Reviewed-by: Shaoqi

Re: [kvm-unit-tests PATCH v3 05/16] scripts: Document environment variables

2025-05-13 Thread Shaoqin Huang
On 5/7/25 11:12 PM, Alexandru Elisei wrote: Document the environment variables that influence how a test is executed by the run_tests.sh test runner. Suggested-by: Andrew Jones Reviewed-by: Andrew Jones Signed-off-by: Alexandru Elisei Reviewed-by: Shaoqin Huang --- docs/unittests.tx

Re: [PATCH] powerpc: Transliterate author name and remove FIXME

2025-05-13 Thread Madhavan Srinivasan
On 5/13/25 11:18 PM, Christophe Leroy wrote: > > > Le 13/05/2025 à 16:10, Thorsten Blum a écrit : >> On 7. Jan 2025, at 13:16, Thorsten Blum wrote: >>> On 23. Nov 2024, at 11:19, Christophe Leroy wrote: Isn't our file just a copy of the one from binutils ? Shouldn't we adjust it bas

Re: [kvm-unit-tests PATCH v3 02/16] scripts: Add 'test_args' test definition parameter

2025-05-13 Thread Shaoqin Huang
On 5/7/25 11:12 PM, Alexandru Elisei wrote: kvm-unit-tests, on arm and arm64, is getting ready to support running all the test automatically under kvmtool. kvmtool has a different syntax for configuring and running a virtual machine, but what is common between kvmtool and qemu, and any other v

Re: [kvm-unit-tests PATCH v3 01/16] scripts: unittests.cfg: Rename 'extra_params' to 'qemu_params'

2025-05-13 Thread Shaoqin Huang
On 5/7/25 11:12 PM, Alexandru Elisei wrote: The arm and arm64 architectures can also be run with kvmtool, and work is under way to have it supported by the run_tests.sh test runner. Not suprisingly, kvmtool's syntax for running a virtual machine is different to qemu's. Add a new unittest para

Re: Crash in __do_IRQ with gcc 15

2025-05-13 Thread Paul Mackerras
On Sun, May 11, 2025 at 06:32:25PM +0530, Madhavan Srinivasan wrote: > > Can you try with this patch, I am testing this in my setup. > > Maddy > > > diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c > index a0e8b998c9b5..2ce7a4f2b2fb 100644 > --- a/arch/powerpc/kernel/irq.c > +

Re: [PATCH] tools/lib/perf: Fix -Werror=alloc-size-larger-than in cpumap.c

2025-05-13 Thread Ian Rogers
On Tue, May 13, 2025 at 3:12 PM Ian Rogers wrote: > > On Tue, May 13, 2025 at 2:13 PM Arnaldo Carvalho de Melo > wrote: > > > > On Fri, May 02, 2025 at 01:14:32PM +0530, Mukesh Kumar Chaurasiya wrote: > > > On Fri, Apr 25, 2025 at 02:46:43PM -0300, Arnaldo Carvalho de Melo wrote: > > > > Maybe th

Re: [PATCH] tools/lib/perf: Fix -Werror=alloc-size-larger-than in cpumap.c

2025-05-13 Thread Ian Rogers
On Tue, May 13, 2025 at 2:13 PM Arnaldo Carvalho de Melo wrote: > > On Fri, May 02, 2025 at 01:14:32PM +0530, Mukesh Kumar Chaurasiya wrote: > > On Fri, Apr 25, 2025 at 02:46:43PM -0300, Arnaldo Carvalho de Melo wrote: > > > Maybe that max() call in perf_cpu_map__intersect() somehow makes the > >

Re: [PATCH] tools/lib/perf: Fix -Werror=alloc-size-larger-than in cpumap.c

2025-05-13 Thread Arnaldo Carvalho de Melo
On Fri, May 02, 2025 at 01:14:32PM +0530, Mukesh Kumar Chaurasiya wrote: > On Fri, Apr 25, 2025 at 02:46:43PM -0300, Arnaldo Carvalho de Melo wrote: > > Maybe that max() call in perf_cpu_map__intersect() somehow makes the > > compiler happy. > > And in perf_cpu_map__alloc() all calls seems to vali

Re: [PATCH] powerpc: Transliterate author name and remove FIXME

2025-05-13 Thread Christophe Leroy
Le 13/05/2025 à 16:10, Thorsten Blum a écrit : On 7. Jan 2025, at 13:16, Thorsten Blum wrote: On 23. Nov 2024, at 11:19, Christophe Leroy wrote: Isn't our file just a copy of the one from binutils ? Shouldn't we adjust it based on commit https://eur01.safelinks.protection.outlook.com/?url=

[PATCH] powerpc/rtas: Replace one-element array with flexible array member

2025-05-13 Thread Thorsten Blum
Replace the deprecated one-element array with a modern flexible array member in the struct rtas_error_log and add the __counted_by_be() compiler attribute to improve access bounds-checking via CONFIG_UBSAN_BOUNDS and CONFIG_FORTIFY_SOURCE. No functional changes intended. Link: https://github.com/

Re: Crash in __do_IRQ with gcc 15

2025-05-13 Thread Segher Boessenkool
Hi! On Mon, May 12, 2025 at 01:31:34PM +1000, Michael Ellerman wrote: > Paul Mackerras writes: > Are you building with pcrel? Otherwise r2 shouldn't be getting used as > an ordinary register. With any ELFv2 in fact, which is implied by the target triple. PCrel has nothing to do with it (well, i

Re: [PATCH] powerpc: Transliterate author name and remove FIXME

2025-05-13 Thread Thorsten Blum
On 7. Jan 2025, at 13:16, Thorsten Blum wrote: > On 23. Nov 2024, at 11:19, Christophe Leroy wrote: >> Isn't our file just a copy of the one from binutils ? Shouldn't we adjust it >> based on commit https://github.com/bminor/binutils-gdb/commit/2ce18a16268a ? > > It looks like it's a copy and the

Re: [PATCH v4 1/4] tpm: add buf_size parameter in the .send callback

2025-05-13 Thread Stefano Garzarella
On Sat, May 10, 2025 at 10:44:38AM +0300, Jarkko Sakkinen wrote: On Fri, May 09, 2025 at 10:57:10AM +0200, Stefano Garzarella wrote: From: Stefano Garzarella Add a new `buf_size` parameter to the `.send` callback in `tpm_class_ops`. This parameter will allow drivers to differentiate between th

Re: [PATCH v5 0/7] fs: introduce file_getattr and file_setattr syscalls

2025-05-13 Thread Amir Goldstein
On Tue, May 13, 2025 at 11:53 AM Arnd Bergmann wrote: > > On Tue, May 13, 2025, at 11:17, Andrey Albershteyn wrote: > > > > > long syscall(SYS_file_getattr, int dirfd, const char *pathname, > > struct fsxattr *fsx, size_t size, unsigned int at_flags); > > long syscall(SYS

Re: Crash in __do_IRQ with gcc 15

2025-05-13 Thread Paul Mackerras
On Mon, May 12, 2025 at 01:31:34PM +1000, Michael Ellerman wrote: > Are you building with pcrel? Otherwise r2 shouldn't be getting used as > an ordinary register. Yes, CONFIG_PPC_KERNEL_PCREL=y. I'll try with n and see what happens. > Can you show the disassembly of where it's getting used? c0

Re: [PATCH] PCI/ERR: s390/pci: Use pci_uevent_ers() in PCI recovery

2025-05-13 Thread Niklas Schnelle
On Thu, 2025-04-24 at 14:02 +0200, Niklas Schnelle wrote: > Issue uevents during PCI recovery using pci_uevent_ers() as done by EEH > and AER PCIe recovery routines. > > Cc: sta...@vger.kernel.org > Fixes: 4cdf2f4e24ff ("s390/pci: implement minimal PCI error recovery") > Signed-off-by: Niklas Schn

linux-next: build warning after merge of the powerpc tree

2025-05-13 Thread Stephen Rothwell
Hi all, After merging the powerpc tree, today's linux-next build (htmldocs) produced this warning: Documentation/arch/powerpc/htm.rst: WARNING: document isn't included in any toctree Introduced by commit ab1456c5aa7a ("powerpc/pseries/htmdump: Add documentation for H_HTM debugfs interface")

Re: Crash in __do_IRQ with gcc 15

2025-05-13 Thread Arnd Bergmann
On Mon, May 12, 2025, at 20:13, LEROY Christophe wrote: > Hi Arnd, > > Do you know when you will be able to add GCC 15 to > https://mirrors.edge.kernel.org/pub/tools/crosstool/ ? I have to create a new build environment for gcc-15 after I lost access to the machine I used for the earlier builds.

Re: [PATCH v5 0/7] fs: introduce file_getattr and file_setattr syscalls

2025-05-13 Thread Arnd Bergmann
On Tue, May 13, 2025, at 11:17, Andrey Albershteyn wrote: > > long syscall(SYS_file_getattr, int dirfd, const char *pathname, > struct fsxattr *fsx, size_t size, unsigned int at_flags); > long syscall(SYS_file_setattr, int dirfd, const char *pathname, > stru

Re: [PATCH v2 0/5] powerpc: convert board-file GPIO chips to using new value setters

2025-05-13 Thread Linus Walleij
On Fri, May 2, 2025 at 10:59 AM Bartosz Golaszewski wrote: > struct gpio_chip now has callbacks for setting line values that return > an integer, allowing to indicate failures. We're in the process of > converting all GPIO drivers to using the new API. This series converts > all powerpc board-fil

[PATCH v5 7/7] fs: introduce file_getattr and file_setattr syscalls

2025-05-13 Thread Andrey Albershteyn
From: Andrey Albershteyn Introduce file_getattr and file_setattr syscalls to manipulate inode extended attributes/flags. The syscalls take parent directory fd and path to the child together with struct fsxattr. This is an alternative to FS_IOC_FSSETXATTR ioctl with a difference that file don't n

[PATCH v5 5/7] fs: make vfs_fileattr_[get|set] return -EOPNOSUPP

2025-05-13 Thread Andrey Albershteyn
Future patches will add new syscalls which use these functions. As this interface won't be used for ioctls only the EOPNOSUPP is more appropriate return code. This patch coverts return code from ENOIOCTLCMD to EOPNOSUPP for vfs_fileattr_get and vfs_fileattr_set. To save old behavior translate EOPN

[PATCH v5 6/7] fs: prepare for extending file_get/setattr()

2025-05-13 Thread Andrey Albershteyn
From: Amir Goldstein We intend to add support for more xflags to selective filesystems and We cannot rely on copy_struct_from_user() to detect this extension. In preparation of extending the API, do not allow setting xflags unknown by this kernel version. Also do not pass the read-only flags an

[PATCH v5 4/7] fs: split fileattr/fsxattr converters into helpers

2025-05-13 Thread Andrey Albershteyn
This will be helpful for file_get/setattr syscalls to convert between fileattr and fsxattr. Signed-off-by: Andrey Albershteyn Reviewed-by: Jan Kara --- fs/file_attr.c | 32 +--- include/linux/fileattr.h | 2 ++ 2 files changed, 23 insertions(+), 11 deletio

[PATCH v5 3/7] selinux: implement inode_file_[g|s]etattr hooks

2025-05-13 Thread Andrey Albershteyn
These hooks are called on inode extended attribute retrieval/change. Cc: seli...@vger.kernel.org Cc: Paul Moore Signed-off-by: Andrey Albershteyn --- security/selinux/hooks.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c

[PATCH v5 0/7] fs: introduce file_getattr and file_setattr syscalls

2025-05-13 Thread Andrey Albershteyn
This patchset introduced two new syscalls file_getattr() and file_setattr(). These syscalls are similar to FS_IOC_FSSETXATTR ioctl() except they use *at() semantics. Therefore, there's no need to open the file to get a fd. These syscalls allow userspace to set filesystem inode attributes on specia

[PATCH v5 2/7] lsm: introduce new hooks for setting/getting inode fsxattr

2025-05-13 Thread Andrey Albershteyn
Introduce new hooks for setting and getting filesystem extended attributes on inode (FS_IOC_FSGETXATTR). Cc: seli...@vger.kernel.org Cc: Paul Moore Signed-off-by: Andrey Albershteyn --- fs/file_attr.c| 19 --- include/linux/lsm_hook_defs.h | 2 ++ include/linux

[PATCH v5 1/7] fs: split fileattr related helpers into separate file

2025-05-13 Thread Andrey Albershteyn
From: Andrey Albershteyn This patch moves function related to file extended attributes manipulations to separate file. Just refactoring. Signed-off-by: Andrey Albershteyn --- fs/Makefile | 3 +- fs/file_attr.c | 318 +++ fs/i

Re: [PATCH v5 0/7] fs: introduce file_getattr and file_setattr syscalls

2025-05-13 Thread Christian Brauner
> Ignore please, somehow b4 crashed with timeout on gmail Ok, no worries. I wondered why I didn't get all messages of that series.