Zero GPRS r0, r2-r11, r14-r31, on entry into the kernel for all
other interrupt sources to limit influence of user-space values
in potential speculation gadgets. The remaining gprs are overwritten by
entry macros to interrupt handlers, irrespective of whether or not a
given handler consumes these
Since some power syscall handlers call into other syscall handlers with
the usual in-register calling convention, emit symbols for both
conventions when required. The prototypes for handlers supporting
in-register parameters should exist in a header rather than immediately
preceding their usage.
Only r10 is saved to the PACA. Reflect this in the inline comment.
Replace instructions for restoring gprs from the stack and clearing them
with the REST_GPRS and ZERO_GPRS convenience macros.
Signed-off-by: Rohan McLure
---
arch/powerpc/kernel/exceptions-64s.S | 2 +-
Clears user state in gprs to reduce the influence of user registers on
speculation within kernel syscall handlers.
Remove conditional branches on result of `syscall_exit_prepare` to
restore non-volatile gprs, as these registers are always cleared and
hence always must be restored.
Signed-off-by:
Syscall wrapper implemented as per s390, x86, arm64, providing the
option for gprs to be cleared on entry to the kernel, reducing caller
influence influence on speculation within syscall routine. The wrapper
is a macro that emits syscall handler implementations with parameters
passed by stack
Macros for restoring saving registers to and from the stack exist.
Provide a macro for simply zeroing a range of gprs, or an individual
gpr.
Signed-off-by: Rohan McLure
---
arch/powerpc/include/asm/ppc_asm.h | 17 +
1 file changed, 17 insertions(+)
diff --git
PowerVM has a stricter policy about allocating TCEs for LPARs and
often there is not enough TCEs for 1:1 mapping, this adds the supported
numbers into dev_info() to help analyzing bugreports.
Signed-off-by: Alexey Kardashevskiy
---
A PowerVM admin can enable "enlarged IO capacity" for a passed
On 6/1/22 10:03, Bagas Sanjaya wrote:
>>
>> Reported-by: Bagas Sanjaya
>> Reported-by: Petr Mladek
>> Signed-off-by: Michael Ellerman
>
> The arch/powerpc/kernel/trace/ftrace.c builds successfully, however
> there is also other build error for which I have reported at [1].
>
> Thanks.
>
>
Hi,
On Tue, May 31, 2022 at 04:59:36PM +1000, Michael Ellerman wrote:
> The ppc_inst_as_str() macro tries to make printing variable length,
> aka "prefixed", instructions convenient. It mostly succeeds, but it does
> hide an on-stack buffer, which triggers stack protector.
>
> More
Hi,
I'm trying to verify Drop ppc_inst_as_str() patch on [1] by performing
ppc64_defconfig build with powerpc64-unknown-linux-gnu-gcc (GCC 12.1.0).
The patch is applied on top of powerpc tree, next branch.
I got outside array bounds error:
CC arch/powerpc/kernel/dbell.o
In function
On 31. May 2022, at 15:46, Rob Herring wrote:
Do you have a dmesg log?
The other way to fix is creating a IRQ resource and adding it to the
child device resources.
Rob
——
Rob,
Do you mean a dmesg from the boot loop?
The other way is a good idea.
Cheers,
Christian
On Mon, 30 May 2022, Juergen Gross wrote:
> xen_remap() is used to establish mappings for frames not under direct
> control of the kernel: for Xenstore and console ring pages, and for
> grant pages of non-PV guests.
>
> Today xen_remap() is defined to use ioremap() on x86 (doing uncached
>
Hi!
On Tue, May 31, 2022 at 04:59:36PM +1000, Michael Ellerman wrote:
> More problematically it doesn't compile at all with GCC 12, due to the
> fact that it returns the char buffer declared inside the macro:
It returns a pointer to a buffer on stack. It is not valid C to access
that buffer
hal Simek , Thomas Bogendoerfer ,
linux-par...@vger.kernel.org, Max Filippov ,
linux-ker...@vger.kernel.org, Dinh Nguyen ,
linux-ri...@lists.infradead.org, Palmer Dabbelt , Sven
Schnelle , Guo Ren ,
linux-hexa...@vger.kernel.org, Ivan Kokshaysky ,
Johannes Berg ,
l Simek , Thomas Bogendoerfer ,
linux-par...@vger.kernel.org, Max Filippov ,
linux-ker...@vger.kernel.org, Dinh Nguyen ,
linux-ri...@lists.infradead.org, Palmer Dabbelt , Sven
Schnelle , Guo Ren ,
linux-hexa...@vger.kernel.org, Ivan Kokshaysky ,
Johannes Berg , linuxppc-dev@lists.ozlabs.org,
On 5/30/22 4:26 AM, Juergen Gross wrote:
xen_remap() is used to establish mappings for frames not under direct
control of the kernel: for Xenstore and console ring pages, and for
grant pages of non-PV guests.
Today xen_remap() is defined to use ioremap() on x86 (doing uncached
mappings), and
When KASAN is enabled, as shown by the Oops below, the 2k limit is not
enough to allow stack dump after a stack overflow detection when
CONFIG_DEBUG_STACKOVERFLOW is selected:
do_IRQ: stack overflow: 1984
CPU: 0 PID: 126 Comm: systemd-udevd Not tainted 5.18.0-gentoo-PMacG4 #1
Since commit 48cf12d88969 ("powerpc/irq: Inline call_do_irq() and
call_do_softirq()"), __do_irq() is not used outside irq.c
Reorder functions and make __do_irq() static and
drop the declaration in irq.h.
Signed-off-by: Christophe Leroy
---
arch/powerpc/include/asm/irq.h | 1 -
> On 31. May 2022, at 15:46, Rob Herring wrote:
>
> On Mon, May 30, 2022 at 12:26 AM Christian Zigotzky
> wrote:
>>
>>> On 27 May 2022 at 04:23 pm, Rob Herring wrote:
>>> The issue is in drivers/usb/host/fsl-mph-dr-of.c which copies the
>>> resources to a child platform device. Can you try
On Mon, 30 May 2022 22:58:03 PDT (-0700), u.kleine-koe...@pengutronix.de wrote:
On Mon, May 30, 2022 at 04:11:27PM -0700, Palmer Dabbelt wrote:
On Mon, 30 May 2022 12:41:33 PDT (-0700), u.kleine-koe...@pengutronix.de wrote:
> Hello,
>
> On Mon, May 30, 2022 at 11:58:16AM -0700, Palmer Dabbelt
On Mon, May 30, 2022 at 12:26 AM Christian Zigotzky
wrote:
>
> On 27 May 2022 at 04:23 pm, Rob Herring wrote:
> > The issue is in drivers/usb/host/fsl-mph-dr-of.c which copies the
> > resources to a child platform device. Can you try the following
> > change:
> >
> > diff --git
Le 31/05/2022 à 09:41, Christoph Hellwig a écrit :
> On Tue, May 31, 2022 at 04:16:19PM +1000, Michael Ellerman wrote:
>> I was thinking of doing it in C, similar to the way arm64 handles it.
>>
>> Something like below. It means we always double the stack size when
>> KASAN is enabled. I think
Eliminate direct accesses to the driver_data field.
Signed-off-by: Haowen Bai
---
arch/powerpc/platforms/pseries/papr_scm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/pseries/papr_scm.c
b/arch/powerpc/platforms/pseries/papr_scm.c
index
On 5/26/22 12:07 PM, Joel Stanley wrote:
When booting on a machine that uses the compat pmu driver we see this:
[0.071192] GENERIC_COMPAT performance monitor hardware support registered
Sorry that was my mistake.
I agree having it as ISAv3 is better.
Maddy
Which is a bit shouty.
On Tue, May 31, 2022 at 04:16:19PM +1000, Michael Ellerman wrote:
> I was thinking of doing it in C, similar to the way arm64 handles it.
>
> Something like below. It means we always double the stack size when
> KASAN is enabled. I think it's preferable, as it will always work
> regardless of
The ppc_inst_as_str() macro tries to make printing variable length,
aka "prefixed", instructions convenient. It mostly succeeds, but it does
hide an on-stack buffer, which triggers stack protector.
More problematically it doesn't compile at all with GCC 12, due to the
fact that it returns the
Le 31/05/2022 à 08:21, Michael Ellerman a écrit :
> Christophe Leroy writes:
>> When KASAN is enabled, as shown by the Oops below, the 2k limit is not
>> enough to allow stack dump after a stack overflow detection when
>> CONFIG_DEBUG_STACKOVERFLOW is selected:
>>
>> do_IRQ: stack
Le 31/05/2022 à 08:16, Michael Ellerman a écrit :
> Christophe Leroy writes:
>> Allthough 14 is the default THREAD_SHIFT when KASAN is selected,
>> taking an old config may keep 13 when CONFIG_EXPERT is selected.
>>
>> Force it to 14 as a minimum when KASAN is selected.
>>
>> Also default to 15
Le 17/05/2022 à 14:37, Michael Ellerman a écrit :
> Christophe Leroy writes:
>> Le 15/05/2022 à 12:28, Michael Ellerman a écrit :
>>> On Tue, 22 Mar 2022 16:40:17 +0100, Christophe Leroy wrote:
This series reduces by 70% the time required to activate
ftrace on an 8xx with
Christophe Leroy writes:
> When KASAN is enabled, as shown by the Oops below, the 2k limit is not
> enough to allow stack dump after a stack overflow detection when
> CONFIG_DEBUG_STACKOVERFLOW is selected:
>
> do_IRQ: stack overflow: 1984
> CPU: 0 PID: 126 Comm: systemd-udevd Not
Le 25/05/2022 à 19:27, Christophe Leroy a écrit :
Le 24/05/2022 à 15:33, Christophe Leroy a écrit :
Le 24/05/2022 à 13:00, Sathvika Vasireddy a écrit :
+{
+ switch (elf->ehdr.e_machine) {
+ case EM_X86_64:
+ return R_X86_64_64;
+ case EM_PPC64:
+ return
Christophe Leroy writes:
> Allthough 14 is the default THREAD_SHIFT when KASAN is selected,
> taking an old config may keep 13 when CONFIG_EXPERT is selected.
>
> Force it to 14 as a minimum when KASAN is selected.
>
> Also default to 15 when KASAN on PPC64.
>
> Reported-by: Erhard Furtner
>
All available at
https://lore.kernel.org/lkml/20220531020744.236970-1-chenzhong...@huawei.com/T/#t
Chen, can you please copy linuxppc-dev list next time, as powerpc is
interested in objtool.
Message transféré
Sujet : [PATCH 0/4] objtool: Reorganize x86 arch-specific code
33 matches
Mail list logo