[RESEND PATCH] powerpc/kprobes: don't save r13 register in kprobe context

2025-01-16 Thread pangliyuan
When CONFIG_STACKPROTECTOR_STRONG is enabled and FTRACE is disabled on powerpc64, repeatedly triggering the kprobe process may cause stack check failures and panic. Case: There is a kprobe(do nothing in handler) attached to the "shmem_get_inode", and a process A is creating file on tmpfs.

Re: [PATCH v5 12/15] objtool: Add support for more complex UACCESS control

2025-01-16 Thread Peter Zijlstra
On Wed, Jan 15, 2025 at 11:42:52PM +0100, Christophe Leroy wrote: > diff --git a/tools/objtool/check.c b/tools/objtool/check.c > index 91436f4b3622..54625f09d831 100644 > --- a/tools/objtool/check.c > +++ b/tools/objtool/check.c > @@ -2422,6 +2422,14 @@ static int __annotate_late(struct objtool_fi

Re: [PATCH] selftests: livepatch: handle PRINTK_CALLER in check_result()

2025-01-16 Thread Petr Mladek
On Tue 2025-01-14 20:01:44, Madhavan Srinivasan wrote: > Some arch configs (like ppc64) enable CONFIG_PRINTK_CALLER, which > adds the caller id as part of the dmesg. Due to this, even though > the expected vs observed are same, end testcase results are failed. CONFIG_PRINTK_CALLER is not the only

Re: [PATCH RFC v2 01/29] mm: asi: Make some utility functions noinstr compatible

2025-01-16 Thread Borislav Petkov
On Thu, Jan 16, 2025 at 01:18:58AM +0100, Borislav Petkov wrote: > Long story short, lemme try to poke around tomorrow to try to figure out what > actually happens. It could be caused by the part of Rik's patches and this one > inlining things. We'll see... Looks transient... The very similar gues

[PATCH v4 RESEND] powerpc/pseries/eeh: Fix get PE state translation

2025-01-16 Thread Narayana Murty N
The PE Reset State "0" returned by RTAS calls "ibm_read_slot_reset_[state|state2]" indicates that the reset is deactivated and the PE is in a state where MMIO and DMA are allowed. However, the current implementation of "pseries_eeh_get_state()" does not reflect this, causing drivers to incorrectly

Re: [PATCH] selftests: livepatch: handle PRINTK_CALLER in check_result()

2025-01-16 Thread Joe Lawrence
On 1/16/25 04:29, Petr Mladek wrote: > On Tue 2025-01-14 20:01:44, Madhavan Srinivasan wrote: >> Some arch configs (like ppc64) enable CONFIG_PRINTK_CALLER, which >> adds the caller id as part of the dmesg. Due to this, even though >> the expected vs observed are same, end testcase results are fail

Re: [PATCH RFC v2 01/29] mm: asi: Make some utility functions noinstr compatible

2025-01-16 Thread Brendan Jackman
On Thu, 16 Jan 2025 at 01:21, Borislav Petkov wrote: > > Unfortunately Thomas pointed out this will prevent the function from > > being inlined at call sites in .text. > > > > So far I haven't been able[1] to find a formulation that lets us : > > 1. avoid calls from .noinstr.text -> .text, > > 2.

Re: [PATCH RFC v2 01/29] mm: asi: Make some utility functions noinstr compatible

2025-01-16 Thread Borislav Petkov
On Thu, Jan 16, 2025 at 02:22:42PM +0100, Brendan Jackman wrote: > Sure. I'm actually not even sure that for a [PATCH]-quality thing this > cross-cutting commit even makes sense - once we've decided on the > general way to solve this problem, perhaps the changes should just be > part of the commit

Re: [PATCH v5 00/15] powerpc/objtool: uaccess validation for PPC32 (v5)

2025-01-16 Thread Peter Zijlstra
On Wed, Jan 15, 2025 at 11:42:40PM +0100, Christophe Leroy wrote: > Christophe Leroy (15): > objtool: Fix generic annotation infrastructure cross build > objtool: Move back misplaced comment > objtool: Allow an architecture to disable objtool on ASM files > objtool: Fix JUMP_ENTRY_SIZE for

Re: [RESEND PATCH] powerpc/kprobes: don't save r13 register in kprobe context

2025-01-16 Thread Christophe Leroy
Le 16/01/2025 à 09:45, pangliyuan a écrit : [Vous ne recevez pas souvent de courriers de pangliyu...@huawei.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] When CONFIG_STACKPROTECTOR_STRONG is enabled and FTRACE is disabled on powerpc64, repeatedl

Re: [PATCH] selftests: livepatch: handle PRINTK_CALLER in check_result()

2025-01-16 Thread Petr Mladek
On Thu 2025-01-16 08:10:44, Joe Lawrence wrote: > On 1/16/25 04:29, Petr Mladek wrote: > > On Tue 2025-01-14 20:01:44, Madhavan Srinivasan wrote: > >> Some arch configs (like ppc64) enable CONFIG_PRINTK_CALLER, which > >> adds the caller id as part of the dmesg. Due to this, even though > >> the ex

Re: [PATCH v2 23/25] EDAC/cell: Remove powerpc Cell driver

2025-01-16 Thread Borislav Petkov
On Wed, Dec 18, 2024 at 09:55:11PM +1100, Michael Ellerman wrote: > This driver can no longer be built since support for IBM Cell Blades was > removed, in particular PPC_CELL_COMMON. > > Remove the driver. > > Signed-off-by: Michael Ellerman > --- > v2: Rebase. > > Cc: linux-e...@vger.kernel.or

Re: [PATCH RFC v2 02/29] x86: Create CONFIG_MITIGATION_ADDRESS_SPACE_ISOLATION

2025-01-16 Thread Borislav Petkov
On Fri, Jan 10, 2025 at 06:40:28PM +, Brendan Jackman wrote: > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig > index > 7b9a7e8f39acc8e9aeb7d4213e87d71047865f5c..5a50582eb210e9d1309856a737d32b76fa1bfc85 > 100644 > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -2519,6 +2519,20 @@ conf

[PATCH] ASoC: fsl_micfil: Enable default case in micfil_set_quality()

2025-01-16 Thread Nikita Zhandarovich
If 'micfil->quality' received from micfil_quality_set() somehow ends up with an unpredictable value, switch() operator will fail to initialize local variable qsel before regmap_update_bits() tries to utilize it. While it is unlikely, play it safe and enable a default case that returns -EINVAL erro

linux-next: duplicate patch in the powerpc tree

2025-01-16 Thread Stephen Rothwell
Hi all, The following commit is also in Linus Torvalds' tree as a different commit (but the same patch): 7fee0217538a ("MAINTAINERS: powerpc: Update my status") This is commit 77a903cd8e5a ("MAINTAINERS: powerpc: Update my status") in Linus' tree. -- Cheers, Stephen Rothwell pgpLyn8VsC

Re: [PATCH] of: address: Unify resource bounds overflow checking

2025-01-16 Thread Basharath Hussain Khaja
>> >> Thomas Weißschuh writes: >> >> > The members "start" and "end" of struct resource are of type >> >> > "resource_size_t" which can be 32bit wide. >> >> > Values read from OF however are always 64bit wide. >> >> > >> >> > Refactor the diff overflow checks into a helper function. >> >> > Also

Re: [PATCH v6 20/26] mm/mlock: Skip ZONE_DEVICE PMDs during mlock

2025-01-16 Thread Alistair Popple
On Mon, Jan 13, 2025 at 06:42:46PM -0800, Dan Williams wrote: > Alistair Popple wrote: > > At present mlock skips ptes mapping ZONE_DEVICE pages. A future change > > to remove pmd_devmap will allow pmd_trans_huge_lock() to return > > ZONE_DEVICE folios so make sure we continue to skip those. > > >

Re: [PATCH v6 11/26] mm: Allow compound zone device pages

2025-01-16 Thread Alistair Popple
On Tue, Jan 14, 2025 at 03:59:31PM +0100, David Hildenbrand wrote: > On 10.01.25 07:00, Alistair Popple wrote: > > Zone device pages are used to represent various type of device memory > > managed by device drivers. Currently compound zone device pages are > > not supported. This is because MEMORY_

Re: [PATCH v2 3/7] syscall.h: add syscall_set_arguments() and syscall_set_return_value()

2025-01-16 Thread H. Peter Anvin
I link the concept of this patchset, but *please* make it clear in the comments that this does not solve the issue of 64-bit kernel arguments on 32-bit systems being ABI specific. This isn't unique to this patch in any way; the only way to handle it is by keeping track of each ABI. On 1/15/2

Re: [PATCH v6 19/26] proc/task_mmu: Mark devdax and fsdax pages as always unpinned

2025-01-16 Thread Alistair Popple
On Tue, Jan 14, 2025 at 05:45:46PM +0100, David Hildenbrand wrote: > On 14.01.25 03:28, Dan Williams wrote: > > Alistair Popple wrote: > > > The procfs mmu files such as smaps and pagemap currently ignore devdax and > > > fsdax pages because these pages are considered special. A future change > > >

Re: [PATCH v6 08/26] fs/dax: Remove PAGE_MAPPING_DAX_SHARED mapping flag

2025-01-16 Thread Alistair Popple
On Tue, Jan 14, 2025 at 09:44:38PM -0800, Dan Williams wrote: > Alistair Popple wrote: > [..] > > > How does this case happen? I don't think any page would ever enter with > > > both ->mapping and ->share set, right? > > > > Sigh. You're right - it can't. This patch series is getting a litte bit

Re: [PATCH v2 4/6] kvm powerpc/book3s-apiv2: Introduce kvm-hv specific PMU

2025-01-16 Thread kernel test robot
Hi Vaibhav, kernel test robot noticed the following build warnings: [auto build test WARNING on powerpc/topic/ppc-kvm] [also build test WARNING on powerpc/next powerpc/fixes kvm/queue kvm/next mst-vhost/linux-next linus/master v6.13-rc7 next-20250116] [cannot apply to kvm/linux-next] [If your