Re: [PATCH 01/12] mm: Remove PFN_MAP, PFN_SG_CHAIN and PFN_SG_LAST

2025-06-03 Thread Alistair Popple
On Mon, Jun 02, 2025 at 06:54:27AM +0200, Christoph Hellwig wrote: > On Thu, May 29, 2025 at 04:32:02PM +1000, Alistair Popple wrote: > > The PFN_MAP flag is no longer used for anything, so remove it. The > > PFN_SG_CHAIN and PFN_SG_LAST flags never appear to have been used so > > also remove them.

Re: [PATCH 01/12] mm: Remove PFN_MAP, PFN_SG_CHAIN and PFN_SG_LAST

2025-06-03 Thread Alistair Popple
On Thu, May 29, 2025 at 12:46:20PM +0100, Jonathan Cameron wrote: > On Thu, 29 May 2025 16:32:02 +1000 > Alistair Popple wrote: > > > The PFN_MAP flag is no longer used for anything, so remove it. The > > PFN_SG_CHAIN and PFN_SG_LAST flags never appear to have been used so > > also remove them. >

Re: [PATCH v7 1/5] drivers/base/node: Optimize memory block registration to reduce boot time

2025-06-03 Thread Andrew Morton
On Wed, 28 May 2025 12:18:00 -0500 Donet Tom wrote: > During node device initialization, `memory blocks` are registered under > each NUMA node. The `memory blocks` to be registered are identified using > the node’s start and end PFNs, which are obtained from the node's pg_data It's quite unconve

[PATCH AUTOSEL 6.15 024/118] i2c: pasemi: Enable the unjam machine

2025-06-03 Thread Sasha Levin
From: Hector Martin [ Upstream commit 88fe3078b54c9efaea7d1adfcf295e37dfb0274f ] The I2C bus can get stuck under some conditions (desync between controller and device). The pasemi controllers include an unjam feature that is enabled on reset, but was being disabled by the driver. Keep it enabled

Re: [PATCH 4/4 v3] ACPI: extlog: Trace CPER CXL Protocol Error Section

2025-06-03 Thread Sathyanarayanan Kuppuswamy
On 6/3/25 8:54 AM, Fabio M. De Francesco wrote: When Firmware First is enabled, BIOS handles errors first and then it makes them available to the kernel via the Common Platform Error Record (CPER) sections (UEFI 2.10 Appendix N). Linux parses the CPER sections via one of two similar paths, eith

Re: [PATCH 3/4 v3] ACPI: extlog: Trace CPER PCI Express Error Section

2025-06-03 Thread Sathyanarayanan Kuppuswamy
On 6/3/25 8:54 AM, Fabio M. De Francesco wrote: I/O Machine Check Architecture events may signal failing PCIe components or links. The AER event contains details on what was happening on the wire when the error was signaled. Trace the CPER PCIe Error section (UEFI v2.10, Appendix N.2.7) report

Re: [PATCH 3/4 v3] ACPI: extlog: Trace CPER PCI Express Error Section

2025-06-03 Thread Dave Jiang
On 6/3/25 8:54 AM, Fabio M. De Francesco wrote: > I/O Machine Check Architecture events may signal failing PCIe components > or links. The AER event contains details on what was happening on the wire > when the error was signaled. > > Trace the CPER PCIe Error section (UEFI v2.10, Appendix N.2.

Re: [PATCH 4/4 v3] ACPI: extlog: Trace CPER CXL Protocol Error Section

2025-06-03 Thread Dave Jiang
On 6/3/25 8:54 AM, Fabio M. De Francesco wrote: > When Firmware First is enabled, BIOS handles errors first and then it makes > them available to the kernel via the Common Platform Error Record (CPER) > sections (UEFI 2.10 Appendix N). Linux parses the CPER sections via one of > two similar path

Re: [PATCH 3/4 v3] ACPI: extlog: Trace CPER PCI Express Error Section

2025-06-03 Thread Dave Jiang
On 6/3/25 8:54 AM, Fabio M. De Francesco wrote: > I/O Machine Check Architecture events may signal failing PCIe components > or links. The AER event contains details on what was happening on the wire > when the error was signaled. > > Trace the CPER PCIe Error section (UEFI v2.10, Appendix N.2.

[PATCH bpf-next v4 9/9] bpf: Fall back to nospec for sanitization-failures

2025-06-03 Thread Luis Gerhorst
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 v4 sanitization only adds a nospec after critical stores (e.g

[PATCH bpf-next v4 8/9] selftests/bpf: Add test for Spectre v1 mitigation

2025-06-03 Thread Luis Gerhorst
This is based on the gadget from the description of commit 9183671af6db ("bpf: Fix leakage under speculation on mispredicted branches"). Signed-off-by: Luis Gerhorst Acked-by: Kumar Kartikeya Dwivedi --- .../selftests/bpf/progs/verifier_unpriv.c | 57 +++ 1 file changed, 57

[PATCH bpf-next v4 7/9] bpf: Fall back to nospec for Spectre v1

2025-06-03 Thread Luis Gerhorst
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 speculative path, we insert a nospec (e.g., lfence speculation barrier o

Re: [PATCH 2/4 v3] PCI/AER: Modify pci_print_aer() to take log level

2025-06-03 Thread Dave Jiang
On 6/3/25 8:54 AM, Fabio M. De Francesco wrote: > Modify pci_print_aer() to take a printk() log level in preparation of a > patch that logs PCIe Components and Link errors from ELOG. > > Reviewed-by: Jonathan Cameron > Signed-off-by: Fabio M. De Francesco Reviewed-by: Dave Jiang > --- > dr

[PATCH bpf-next v4 6/9] bpf: Rename sanitize_stack_spill to nospec_result

2025-06-03 Thread Luis Gerhorst
This is made to clarify that this flag will cause a nospec to be added after this insn and can therefore be relied upon to reduce speculative path analysis. Signed-off-by: Luis Gerhorst Acked-by: Kumar Kartikeya Dwivedi Cc: Henriette Herzog Cc: Maximilian Ott Cc: Milan Stephan --- include/li

[PATCH bpf-next v4 5/9] bpf, arm64, powerpc: Change nospec to include v1 barrier

2025-06-03 Thread Luis Gerhorst
This changes the semantics of BPF_NOSPEC (previously a v4-only barrier) to always emit a speculation barrier that works against both Spectre v1 AND v4. If mitigation is not needed on an architecture, the backend should set bpf_jit_bypass_spec_v4/v1(). As of now, this commit only has the user-visib

Re: [PATCH 1/4 v3] ACPI: extlog: Trace CPER Non-standard Section Body

2025-06-03 Thread Dave Jiang
On 6/3/25 8:54 AM, Fabio M. De Francesco wrote: > ghes_do_proc() has a catch-all for unknown or unhandled CPER formats > (UEFI v2.10 Appendix N 2.3), extlog_print() does not. This gap was > noticed by a RAS test that injected CXL protocol errors which were > notified to extlog_print() via the IO

[PATCH bpf-next v4 4/9] bpf, arm64, powerpc: Add bpf_jit_bypass_spec_v1/v4()

2025-06-03 Thread Luis Gerhorst
JITs can set bpf_jit_bypass_spec_v1/v4() if they want the verifier to skip analysis/patching for the respective vulnerability. For v4, this will reduce the number of barriers the verifier inserts. For v1, it allows more programs to be accepted. The primary motivation for this is to not regress unp

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

2025-06-03 Thread Luis Gerhorst
Kumar Kartikeya Dwivedi writes: > Hmm, while reading related code, I noticed that sanitize_check_bounds > returns 0 in case the type is not map_value or stack. > It seems like it should be returning an error, cannot check right now > but I'm pretty sure these are not the two pointer types unprivi

[PATCH bpf-next v4 3/9] bpf: Return -EFAULT on internal errors

2025-06-03 Thread Luis Gerhorst
This prevents us from trying to recover from these on speculative paths in the future. Signed-off-by: Luis Gerhorst Reviewed-by: Eduard Zingerman Acked-by: Kumar Kartikeya Dwivedi Acked-by: Henriette Herzog Cc: Maximilian Ott Cc: Milan Stephan --- kernel/bpf/verifier.c | 6 +++--- 1 file ch

[PATCH bpf-next v4 2/9] bpf: Return -EFAULT on misconfigurations

2025-06-03 Thread Luis Gerhorst
Mark these cases as non-recoverable to later prevent them from being caught when they occur during speculative path verification. Eduard writes [1]: The only pace I'm aware of that might act upon specific error code from verifier syscall is libbpf. Looking through libbpf code, it seems that

[PATCH bpf-next v4 1/9] bpf: Move insn if/else into do_check_insn()

2025-06-03 Thread Luis Gerhorst
This is required to catch the errors later and fall back to a nospec if on a speculative path. Eliminate the regs variable as it is only used once and insn_idx is not modified in-between the definition and usage. Do not pass insn but compute it in the function itself. As Eduard points out [1], in

[PATCH bpf-next v4 0/9] bpf: Mitigate Spectre v1 using barriers

2025-06-03 Thread Luis Gerhorst
This improves the expressiveness of unprivileged BPF by inserting speculation barriers instead of rejecting the programs. The approach was previously presented at LPC'24 [1] and RAID'24 [2]. To mitigate the Spectre v1 (PHT) vulnerability, the kernel rejects potentially-dangerous unprivileged BPF

Re: [PATCH 2/4 v3] PCI/AER: Modify pci_print_aer() to take log level

2025-06-03 Thread Sathyanarayanan Kuppuswamy
On 6/3/25 8:54 AM, Fabio M. De Francesco wrote: Modify pci_print_aer() to take a printk() log level in preparation of a patch that logs PCIe Components and Link errors from ELOG. I think you need to rebase this patch on top of latest PCI changes. A patch to consolidate the AER error logging i

[PATCH 1/4 v3] ACPI: extlog: Trace CPER Non-standard Section Body

2025-06-03 Thread Fabio M. De Francesco
ghes_do_proc() has a catch-all for unknown or unhandled CPER formats (UEFI v2.10 Appendix N 2.3), extlog_print() does not. This gap was noticed by a RAS test that injected CXL protocol errors which were notified to extlog_print() via the IOMCA (I/O Machine Check Architecture) mechanism. Bring parit

[PATCH 3/4 v3] ACPI: extlog: Trace CPER PCI Express Error Section

2025-06-03 Thread Fabio M. De Francesco
I/O Machine Check Architecture events may signal failing PCIe components or links. The AER event contains details on what was happening on the wire when the error was signaled. Trace the CPER PCIe Error section (UEFI v2.10, Appendix N.2.7) reported by the I/O MCA. Cc: Dan Williams Signed-off-by:

[PATCH 4/4 v3] ACPI: extlog: Trace CPER CXL Protocol Error Section

2025-06-03 Thread Fabio M. De Francesco
When Firmware First is enabled, BIOS handles errors first and then it makes them available to the kernel via the Common Platform Error Record (CPER) sections (UEFI 2.10 Appendix N). Linux parses the CPER sections via one of two similar paths, either ELOG or GHES. The errors managed by ELOG are sign

[PATCH 2/4 v3] PCI/AER: Modify pci_print_aer() to take log level

2025-06-03 Thread Fabio M. De Francesco
Modify pci_print_aer() to take a printk() log level in preparation of a patch that logs PCIe Components and Link errors from ELOG. Reviewed-by: Jonathan Cameron Signed-off-by: Fabio M. De Francesco --- drivers/cxl/core/pci.c | 2 +- drivers/pci/pcie/aer.c | 16 include/linux/a

Re: [PATCH 12/12] mm/memremap: Remove unused devmap_managed_key

2025-06-03 Thread Jason Gunthorpe
On Thu, May 29, 2025 at 04:32:13PM +1000, Alistair Popple wrote: > It's no longer used so remove it. > > Signed-off-by: Alistair Popple > --- > mm/memremap.c | 27 --- > 1 file changed, 27 deletions(-) Reviewed-by: Jason Gunthorpe Jason

Re: [PATCH 11/12] mm: Remove callers of pfn_t functionality

2025-06-03 Thread Jason Gunthorpe
On Thu, May 29, 2025 at 04:32:12PM +1000, Alistair Popple wrote: > All PFN_* pfn_t flags have been removed. Therefore there is no longer > a need for the pfn_t type and all uses can be replaced with normal > pfns. > > Signed-off-by: Alistair Popple > Reviewed-by: Christoph Hellwig Yay! Reviewe

Re: [PATCH 10/12] mm: Remove devmap related functions and page table bits

2025-06-03 Thread Jason Gunthorpe
On Thu, May 29, 2025 at 04:32:11PM +1000, Alistair Popple wrote: > Now that DAX and all other reference counts to ZONE_DEVICE pages are > managed normally there is no need for the special devmap PTE/PMD/PUD > page table bits. So drop all references to these, freeing up a > software defined page tab

Re: [PATCH 09/12] powerpc: Remove checks for devmap pages and PMDs/PUDs

2025-06-03 Thread Jason Gunthorpe
On Thu, May 29, 2025 at 04:32:10PM +1000, Alistair Popple wrote: > PFN_DEV no longer exists. This means no devmap PMDs or PUDs will be > created, so checking for them is redundant. Instead mappings of pages that > would have previously returned true for pXd_devmap() will return true for > pXd_trans

Re: [PATCH 08/12] mm/khugepaged: Remove redundant pmd_devmap() check

2025-06-03 Thread Jason Gunthorpe
On Thu, May 29, 2025 at 04:32:09PM +1000, Alistair Popple wrote: > The only users of pmd_devmap were device dax and fs dax. The check for > pmd_devmap() in check_pmd_state() is therefore redundant as callers > explicitly check for is_zone_device_page(), so this check can be dropped. > > Signed-off

Re: [PATCH 07/12] mm: Remove redundant pXd_devmap calls

2025-06-03 Thread Jason Gunthorpe
On Thu, May 29, 2025 at 04:32:08PM +1000, Alistair Popple wrote: > DAX was the only thing that created pmd_devmap and pud_devmap entries > however it no longer does as DAX pages are now refcounted normally and > pXd_trans_huge() returns true for those. Therefore checking both pXd_devmap > and pXd_t

Re: [PATCH 06/12] mm/gup: Remove pXX_devmap usage from get_user_pages()

2025-06-03 Thread Jason Gunthorpe
On Thu, May 29, 2025 at 04:32:07PM +1000, Alistair Popple wrote: > GUP uses pXX_devmap() calls to see if it needs to a get a reference on > the associated pgmap data structure to ensure the pages won't go > away. However it's a driver responsibility to ensure that if pages are > mapped (ie. discove

Re: [PATCH 05/12] mm: Remove remaining uses of PFN_DEV

2025-06-03 Thread Jason Gunthorpe
On Thu, May 29, 2025 at 04:32:06PM +1000, Alistair Popple wrote: > PFN_DEV was used by callers of dax_direct_access() to figure out if the > returned PFN is associated with a page using pfn_t_has_page() or > not. However all DAX PFNs now require an assoicated ZONE_DEVICE page so can > assume a page

Re: [PATCH 04/12] mm: Convert vmf_insert_mixed() from using pte_devmap to pte_special

2025-06-03 Thread Jason Gunthorpe
On Thu, May 29, 2025 at 04:32:05PM +1000, Alistair Popple wrote: > DAX no longer requires device PTEs as it always has a ZONE_DEVICE page > associated with the PTE that can be reference counted normally. Other users > of pte_devmap are drivers that set PFN_DEV when calling vmf_insert_mixed() > whic

Re: [PATCH 03/12] mm/pagewalk: Skip dax pages in pagewalk

2025-06-03 Thread Jason Gunthorpe
On Thu, May 29, 2025 at 04:32:04PM +1000, Alistair Popple wrote: > Previously dax pages were skipped by the pagewalk code as pud_special() or > vm_normal_page{_pmd}() would be false for DAX pages. Now that dax pages are > refcounted normally that is no longer the case, so add explicit checks to > s

Re: [PATCH 02/12] mm: Convert pXd_devmap checks to vma_is_dax

2025-06-03 Thread Jason Gunthorpe
On Thu, May 29, 2025 at 04:32:03PM +1000, Alistair Popple wrote: > Currently dax is the only user of pmd and pud mapped ZONE_DEVICE > pages. Therefore page walkers that want to exclude DAX pages can check > pmd_devmap or pud_devmap. However soon dax will no longer set PFN_DEV, > meaning dax pages a

Re: [PATCH 01/12] mm: Remove PFN_MAP, PFN_SG_CHAIN and PFN_SG_LAST

2025-06-03 Thread Jason Gunthorpe
On Thu, May 29, 2025 at 04:32:02PM +1000, Alistair Popple wrote: > The PFN_MAP flag is no longer used for anything, so remove it. The > PFN_SG_CHAIN and PFN_SG_LAST flags never appear to have been used so > also remove them. > > Signed-off-by: Alistair Popple > Reviewed-by: Christoph Hellwig > -

Re: [PATCH 2/2] arch: use always-$(KBUILD_BUILTIN) for vmlinux.lds

2025-06-03 Thread Nicolas Schier
On Tue, Jun 03, 2025 at 03:12:54AM +0900, Masahiro Yamada wrote: > The extra-y syntax is deprecated. Instead, use always-$(KBUILD_BUILTIN), > which behaves equivalently. > > Signed-off-by: Masahiro Yamada > --- > > arch/alpha/kernel/Makefile | 2 +- > arch/arc/kernel/Makefile| 2 +-

[PATCH v3 0/3] Enhancements to the secvar interface in static key management mode

2025-06-03 Thread Srish Srinivasan
The PLPKS enabled Power LPAR sysfs exposes all of the secure boot secure variables irrespective of the key management mode. There is support for both static and dynamic key management and the key management mode can be updated using the management console. The user can modify the secure boot secvar

[PATCH v3 3/3] integrity/platform_certs: Allow loading of keys in the static key management mode

2025-06-03 Thread Srish Srinivasan
On PLPKS enabled PowerVM LPAR, there is no provision to load signed third-party kernel modules when the key management mode is static. This is because keys from secure boot secvars are only loaded when the key management mode is dynamic. Allow loading of the trustedcadb and moduledb keys even in t

[PATCH v3 2/3] powerpc/secvar: Expose secvars relevant to the key management mode

2025-06-03 Thread Srish Srinivasan
The PLPKS enabled PowerVM LPAR sysfs exposes all of the secure boot secvars irrespective of the key management mode. The PowerVM LPAR supports static and dynamic key management for secure boot. The key management option can be updated in the management console. Only in the dynamic key mode can the

[PATCH v3 1/3] powerpc/pseries: Correct secvar format representation for static key management

2025-06-03 Thread Srish Srinivasan
On a PLPKS enabled PowerVM LPAR, the secvar format property for static key management is misrepresented as "ibm,plpks-sb-unknown", creating reason for confusion. Static key management mode uses fixed, built-in keys. Dynamic key management mode allows keys to be updated in production to handle secu

Re: [PATCH 1/2] powerpc/ftrace: support CONFIG_FUNCTION_GRAPH_RETVAL

2025-06-03 Thread Christophe Leroy
Le 28/05/2025 à 15:48, Aditya Bodkhe a écrit : [Vous ne recevez pas souvent de courriers de adity...@linux.ibm.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] From: Aditya Bodkhe commit a1be9ccc57f0 ("function_graph: Support recording and printi

Re: [PATCH 2/2] arch: use always-$(KBUILD_BUILTIN) for vmlinux.lds

2025-06-03 Thread Johannes Berg
On Tue, 2025-06-03 at 03:12 +0900, Masahiro Yamada wrote: > The extra-y syntax is deprecated. Instead, use always-$(KBUILD_BUILTIN), > which behaves equivalently. OK, whatever you say ;-) > arch/um/kernel/Makefile | 2 +- Acked-by: Johannes Berg johannes