Re: [PATCH v6 0/8] PCI: Consolidate TLP Log reading and printing

2024-10-23 Thread Ilpo Järvinen
On Fri, 13 Sep 2024, Ilpo Järvinen wrote: > This series has the remaining patches of the AER & DPC TLP Log handling > consolidation and now includes a few minor improvements to the earlier > accepted TLP Logging code. > > v6: > - Preserve "AER:"/"DPC:" prefix on the printed TLP line > - New patch

Re: [PATCH RFC v2 0/4] mm: Introduce MAP_BELOW_HINT

2024-10-23 Thread Steven Price
Hi Liam, On 21/10/2024 20:48, Liam R. Howlett wrote: > * Steven Price [241021 09:23]: >> On 09/09/2024 10:46, Kirill A. Shutemov wrote: >>> On Thu, Sep 05, 2024 at 10:26:52AM -0700, Charlie Jenkins wrote: On Thu, Sep 05, 2024 at 09:47:47AM +0300, Kirill A. Shutemov wrote: > On Thu, Aug 2

Re: [PATCH] x86/uaccess: Avoid barrier_nospec() in copy_from_user()

2024-10-23 Thread Borislav Petkov
On Sun, Oct 20, 2024 at 04:35:21PM -0700, Linus Torvalds wrote: > So I think this time we push back on the hardware people and tell them > it's *THEIR* damn problem, and if they can't even be bothered to say > yay-or-nay, we just sit tight. So I was able to get some info: CLAC/STAC in everything

[PATCH] KVM: Array access out of bounds

2024-10-23 Thread Liu Jing
In the kvmppc_mmu_book3s_64_xlate function, r = be64_to_cpu(pteg[i+1]); i used is 16 after the last loop and adding 1 will cross the line. Signed-off-by: Liu Jing diff --git a/arch/powerpc/kvm/book3s_64_mmu.c b/arch/powerpc/kvm/book3s_64_mmu.c index 61290282fd9e..75d2b284c4b4 100644 --- a/arch/

Re: [PATCH v6 2/4] arch_topology: Support SMT control for OF based system

2024-10-23 Thread Pierre Gondois
Hello Yicong, On 10/15/24 04:18, Yicong Yang wrote: From: Yicong Yang On building the topology from the devicetree, we've already gotten the SMT thread number of each core. Update the largest SMT thread number and enable the SMT control by the end of topology parsing. The core's SMT control p

[PATCH v7 3/8] asm-generic: introduce text-patching.h

2024-10-23 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" Several architectures support text patching, but they name the header files that declare patching functions differently. Make all such headers consistently named text-patching.h and add an empty header in asm-generic for architectures that do not support text pa

[PATCH v7 2/8] mm: vmalloc: don't account for number of nodes for HUGE_VMAP allocations

2024-10-23 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" vmalloc allocations with VM_ALLOW_HUGE_VMAP that do not explicitly specify node ID will use huge pages only if size_per_node is larger than a huge page. Still the actual allocated memory is not distributed between nodes and there is no advantage in such approach.

[PATCH v7 7/8] execmem: add support for cache of large ROX pages

2024-10-23 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" Using large pages to map text areas reduces iTLB pressure and improves performance. Extend execmem_alloc() with an ability to use huge pages with ROX permissions as a cache for smaller allocations. To populate the cache, a writable large page is allocated from

[PATCH v7 6/8] x86/module: prepare module loading for ROX allocations of text

2024-10-23 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" When module text memory will be allocated with ROX permissions, the memory at the actual address where the module will live will contain invalid instructions and there will be a writable copy that contains the actual module code. Update relocations and alternati

[PATCH v7 8/8] x86/module: enable ROX caches for module text on 64 bit

2024-10-23 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" Enable execmem's cache of PMD_SIZE'ed pages mapped as ROX for module text allocations on 64 bit. Signed-off-by: Mike Rapoport (Microsoft) Reviewed-by: Luis Chamberlain Tested-by: kdevops --- arch/x86/Kconfig | 1 + arch/x86/mm/init.c | 37

[PATCH v7 0/8] x86/module: use large ROX pages for text allocations

2024-10-23 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" Hi, This is an updated version of execmem ROX caches. v6: https://lore.kernel.org/all/20241016122424.1655560-1-r...@kernel.org * Fixed handling of alternatives for fineibt (kbuild bot) * Restored usage of text_poke_early for ftrace boot time initialization (Ste

[PATCH v7 5/8] arch: introduce set_direct_map_valid_noflush()

2024-10-23 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" Add an API that will allow updates of the direct/linear map for a set of physically contiguous pages. It will be used in the following patches. Signed-off-by: Mike Rapoport (Microsoft) Reviewed-by: Christoph Hellwig Reviewed-by: Luis Chamberlain Tested-by: k

[PATCH v7 4/8] module: prepare to handle ROX allocations for text

2024-10-23 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" In order to support ROX allocations for module text, it is necessary to handle modifications to the code, such as relocations and alternatives patching, without write access to that memory. One option is to use text patching, but this would make module loading e

Re: [PATCH] KVM: Array access out of bounds

2024-10-23 Thread Paolo Bonzini
On 10/23/24 14:01, Liu Jing wrote: In the kvmppc_mmu_book3s_64_xlate function, r = be64_to_cpu(pteg[i+1]); i used is 16 after the last loop and adding 1 will cross the line. Signed-off-by: Liu Jing diff --git a/arch/powerpc/kvm/book3s_64_mmu.c b/arch/powerpc/kvm/book3s_64_mmu.c index 61290282

[PATCH AUTOSEL 5.4 5/5] powerpc/powernv: Free name on error in opal_event_init()

2024-10-23 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit cf8989d20d64ad702a6210c11a0347ebf3852aa7 ] In opal_event_init() if request_irq() fails name is not freed, leading to a memory leak. The code only runs at boot time, there's no way for a user to trigger it, so there's no security impact. Fix the leak by f

[PATCH AUTOSEL 5.10 6/6] powerpc/powernv: Free name on error in opal_event_init()

2024-10-23 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit cf8989d20d64ad702a6210c11a0347ebf3852aa7 ] In opal_event_init() if request_irq() fails name is not freed, leading to a memory leak. The code only runs at boot time, there's no way for a user to trigger it, so there's no security impact. Fix the leak by f

[PATCH AUTOSEL 4.19 5/5] powerpc/powernv: Free name on error in opal_event_init()

2024-10-23 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit cf8989d20d64ad702a6210c11a0347ebf3852aa7 ] In opal_event_init() if request_irq() fails name is not freed, leading to a memory leak. The code only runs at boot time, there's no way for a user to trigger it, so there's no security impact. Fix the leak by f

[PATCH AUTOSEL 6.11 26/30] powerpc/powernv: Free name on error in opal_event_init()

2024-10-23 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit cf8989d20d64ad702a6210c11a0347ebf3852aa7 ] In opal_event_init() if request_irq() fails name is not freed, leading to a memory leak. The code only runs at boot time, there's no way for a user to trigger it, so there's no security impact. Fix the leak by f

[PATCH AUTOSEL 6.6 20/23] powerpc/powernv: Free name on error in opal_event_init()

2024-10-23 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit cf8989d20d64ad702a6210c11a0347ebf3852aa7 ] In opal_event_init() if request_irq() fails name is not freed, leading to a memory leak. The code only runs at boot time, there's no way for a user to trigger it, so there's no security impact. Fix the leak by f

[PATCH AUTOSEL 6.1 16/17] powerpc/powernv: Free name on error in opal_event_init()

2024-10-23 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit cf8989d20d64ad702a6210c11a0347ebf3852aa7 ] In opal_event_init() if request_irq() fails name is not freed, leading to a memory leak. The code only runs at boot time, there's no way for a user to trigger it, so there's no security impact. Fix the leak by f

[PATCH AUTOSEL 5.15 10/10] powerpc/powernv: Free name on error in opal_event_init()

2024-10-23 Thread Sasha Levin
From: Michael Ellerman [ Upstream commit cf8989d20d64ad702a6210c11a0347ebf3852aa7 ] In opal_event_init() if request_irq() fails name is not freed, leading to a memory leak. The code only runs at boot time, there's no way for a user to trigger it, so there's no security impact. Fix the leak by f

Re: [PATCH RFC v2 0/4] mm: Introduce MAP_BELOW_HINT

2024-10-23 Thread Liam R. Howlett
* Steven Price [241023 05:31]: > >> * Box64 seems to have a custom allocator based on reading > >> /proc/self/maps to allocate a block of VA space with a low enough > >> address [1] > >> > >> * PHP has code reading /proc/self/maps - I think this is to find a > >> segment which i

Re: [PATCH 2/2] ACPI: extlog: Trace CPER PCI Express Error Section

2024-10-23 Thread Fabio M. De Francesco
On Tuesday, August 6, 2024 9:56:24 PM GMT+2 Dan Williams wrote: > Fabio M. De Francesco wrote: > > Currently, extlog_print() (ELOG) only reports CPER PCIe section (UEFI > > v2.10, Appendix N.2.7) to the kernel log via print_extlog_rcd(). > > I think the critical detail is is that print_extlog_rcd(

Re: [PATCH 07/12] huge_memory: Allow mappings of PMD sized pages

2024-10-23 Thread Alistair Popple
Alistair Popple writes: > Alistair Popple wrote: >> Dan Williams writes: [...] >>> + >>> + return VM_FAULT_NOPAGE; >>> +} >>> +EXPORT_SYMBOL_GPL(dax_insert_pfn_pmd); >> >> Like I mentioned before, lets make the exported function >> vmf_insert_folio() and move the pte, pmd, pud internal pri

Re: [PATCH] x86/uaccess: Avoid barrier_nospec() in copy_from_user()

2024-10-23 Thread Linus Torvalds
On Wed, 23 Oct 2024 at 13:07, Linus Torvalds wrote: > > Well, it boots. The code generation (from strncpy_from_user()) seems ok: Actually, doing some more sanity checking, that patch is wrong. Not *badly* wrong, but for some reason I did the "sbb" in 32-bit (quite intentionally, but it's very wr

Re: [PATCH 07/12] huge_memory: Allow mappings of PMD sized pages

2024-10-23 Thread Dan Williams
Alistair Popple wrote: > > Alistair Popple writes: > > > Alistair Popple wrote: > >> Dan Williams writes: > > [...] > > >>> + > >>> + return VM_FAULT_NOPAGE; > >>> +} > >>> +EXPORT_SYMBOL_GPL(dax_insert_pfn_pmd); > >> > >> Like I mentioned before, lets make the exported function > >> vmf_inse

[PATCH v7 1/8] mm: vmalloc: group declarations depending on CONFIG_MMU together

2024-10-23 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" There are a couple of declarations that depend on CONFIG_MMU in include/linux/vmalloc.h spread all over the file. Group them all together to improve code readability. No functional changes. Signed-off-by: Mike Rapoport (Microsoft) Reviewed-by: Christoph Hellw

[PATCH v2] of/fdt: add dt_phys arg to early_init_dt_scan and early_init_dt_verify

2024-10-23 Thread Usama Arif
__pa() is only intended to be used for linear map addresses and using it for initial_boot_params which is in fixmap for arm64 will give an incorrect value. Hence save the physical address when it is known at boot time when calling early_init_dt_scan for arm64 and use it at kexec time instead of co

[PATCH] powerpc/xmon: symbol lookup length fixed

2024-10-23 Thread Mukesh Kumar Chaurasiya
Currently xmon cannot lookup symbol beyond 64 characters in some cases. Fix this by using KSYM_NAME_LEN instead of fixed 64 characters. Signed-off-by: Mukesh Kumar Chaurasiya --- arch/powerpc/xmon/xmon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/xmon

Re: [PATCH] x86/uaccess: Avoid barrier_nospec() in copy_from_user()

2024-10-23 Thread Linus Torvalds
On Wed, 23 Oct 2024 at 02:45, Borislav Petkov wrote: > > So I was able to get some info: CLAC/STAC in everything Zen4 and older is > serializing so there's no issue there. > > Zen5 is a different story and AC is being renamed there and thus, > non-serializing. So we'd need to do something there, p

Re: [PATCH net-next] ibmvnic: use ethtool string helpers

2024-10-23 Thread Nick Child
On 10/22/24 15:32, Rosen Penev wrote: They are the prefered way to copy ethtool strings. Avoids manually incrementing the data pointer. Signed-off-by: Rosen Penev --- drivers/net/ethernet/ibm/ibmvnic.c | 30 +- 1 file changed, 9 insertions(+), 21 deletions(-)

Re: [PATCH] x86/uaccess: Avoid barrier_nospec() in copy_from_user()

2024-10-23 Thread Linus Torvalds
On Wed, 23 Oct 2024 at 12:17, Linus Torvalds wrote: > > NOTE! This is obviously untested and I didn't check that it does the > cmp/sbb/or the right way around. Well, it boots. The code generation (from strncpy_from_user()) seems ok: movabs $0x123456789abcdef,%rcx cmp%rsi,%rcx

Re: [PATCH] powerpc/xmon: symbol lookup length fixed

2024-10-23 Thread Michael Ellerman
Mukesh Kumar Chaurasiya writes: > Currently xmon cannot lookup symbol beyond 64 characters in some cases. Can you mention which commands? It looks like it's "ls" and "lp". > Fix this by using KSYM_NAME_LEN instead of fixed 64 characters. > > Signed-off-by: Mukesh Kumar Chaurasiya > --- > arch/

Re: [PATCH] x86/uaccess: Avoid barrier_nospec() in copy_from_user()

2024-10-23 Thread Linus Torvalds
On Wed, 23 Oct 2024 at 16:32, Linus Torvalds wrote: > > And I guess I should make "__put_user()" do the same thing, just so > that we only have one sequence. No, I decided it's not worth it. The put_user side already also doesn't do any other speculation barriers, simply because it has no specula

[PATCH] powerpc/chrp: Add missing of_node_get() before of_find_node_by_name()

2024-10-23 Thread Zhang Zekun
of_find_node_by_name() will decrease the refount of the device_node. So, get the device_node before passing to it. Signed-off-by: Zhang Zekun --- arch/powerpc/platforms/chrp/pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp

[powerpc:next-test] BUILD SUCCESS bee08a9e6ab03caf14481d97b35a258400ffab8f

2024-10-23 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test branch HEAD: bee08a9e6ab03caf14481d97b35a258400ffab8f powerpc: Adjust adding stack protector flags to KBUILD_CLAGS for clang elapsed time: 1095m configs tested: 98 configs skipped: 1 The following configs

Re: [PATCH v4 0/7] ASoC: fsl: add memory to memory function for ASRC

2024-10-23 Thread Shengjiu Wang
On Wed, Oct 23, 2024 at 1:32 PM Vinod Koul wrote: > > On 25-09-24, 14:55, Shengjiu Wang wrote: > > This function is base on the accelerator implementation > > for compress API: > > https://patchwork.kernel.org/project/alsa-devel/patch/20240731083843.59911-1-pe...@perex.cz/ > > Add it to this patch

Re: [PATCH v13 00/85] KVM: Stop grabbing references to PFNMAP'd pages

2024-10-23 Thread Dmitry Osipenko
On 10/10/24 21:23, Sean Christopherson wrote: > TL;DR: Eliminate KVM's long-standing (and heinous) behavior of essentially > guessing which pfns are refcounted pages (see kvm_pfn_to_refcounted_page()). > > Getting there requires "fixing" arch code that isn't obviously broken. > Specifically, to ge