Hi Chris,
Remind me again why we need to clear breakpoints in integrity mode?
...
>> Integrity mode merely means we are aiming to prevent modifications to
>> kernel memory. IMHO leaving existing breakpoints in place is fine as
>> long as when we hit the breakpoint xmon is in read-only mode.
Hi Santosh,
On Mon, 29 Jul 2019 11:25:36 +0530 Santosh Sivaraj wrote:
>
> Implicit fallthrough warning was enabled globally which broke
> the build. Make it explicit with a `fall through` comment.
>
> Signed-off-by: Santosh Sivaraj
> ---
> arch/powerpc/kvm/book3s_32_mmu.c | 1 +
> 1 file chang
Hi Pei,
On Sat, Jul 27, 2019 at 10:21:09PM +0800, Pei Hsuan Hung wrote:
> Signed-off-by: Pei Hsuan Hung
> Cc: triv...@kernel.org
> ---
> arch/powerpc/kernel/eeh.c | 2 +-
> arch/powerpc/platforms/cell/spufs/switch.c | 4 ++--
> drivers/extcon/extcon-rt8973a.c
Currently, nvdimm subsystem expects the device numa node for SCM device to be
an online node. It also doesn't try to bring the device numa node online. Hence
if we use a non-online numa node as device node we hit crashes like below. This
is because we try to access uninitialized NODE_DATA in differ
Hi Christoph,
On Thu, Jul 25, 2019 at 8:35 AM Christoph Hellwig wrote:
> Most dma_map_ops instances are IOMMUs that work perfectly fine in 32-bits
> of IOVA space, and the generic direct mapping code already provides its
> own routines that is intelligent based on the amount of memory actually
>
Hi Paul,
On 29.07.2019 01:49, Paul Burton wrote:
Hi Denis,
This is wrong - using __weak on the declaration in a header will cause
the weak attribute to be applied to all implementations too (presuming
the C files containing the implementations include the header). You then
get whichever impleen
Architectures currently define HAVE_ARCH_PCI_RESOURCE_TO_USER if they want
to provide their own pci_resource_to_user() implementation. This could be
simplified if we make the generic version a weak function. Thus,
architecture specific versions will automatically override the generic one.
Changes
The patch turns pci_resource_to_user() to a weak function. Thus,
architecture-specific versions will automatically override the generic
one. This allows to remove the HAVE_ARCH_PCI_RESOURCE_TO_USER macro and
avoid the conditional compilation for this single function.
Signed-off-by: Denis Efremov
The function pci_resource_to_user() was turned to a weak one. Thus,
powerpc-specific version will automatically override the generic one
and the HAVE_ARCH_PCI_RESOURCE_TO_USER macro should be removed.
Signed-off-by: Denis Efremov
---
arch/powerpc/include/asm/pci.h | 2 --
1 file changed, 2 delet
Le 17/07/2019 à 10:06, Jason Yan a écrit :
M_IF_NEEDED is defined too many times. Move it to a common place.
Signed-off-by: Jason Yan
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Nicholas Piggin
Cc: Kees Cook
Reviewed-
Le 17/07/2019 à 10:06, Jason Yan a écrit :
These two variables are both defined in init_32.c and init_64.c. Move
them to init-common.c.
Signed-off-by: Jason Yan
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Nicholas Piggin
Le 17/07/2019 à 10:06, Jason Yan a écrit :
Now the kernel base is a fixed value - KERNELBASE. To support KASLR, we
need a variable to store the kernel base.
Signed-off-by: Jason Yan
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Le 17/07/2019 à 10:06, Jason Yan a écrit :
Add a new helper create_tlb_entry() to create a tlb entry by the virtual
and physical address. This is a preparation to support boot kernel at a
randomized address.
Signed-off-by: Jason Yan
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Ler
Le 17/07/2019 à 10:06, Jason Yan a écrit :
Add a new helper reloc_kernel_entry() to jump back to the start of the
new kernel. After we put the new kernel in a randomized place we can use
this new helper to enter the kernel and begin to relocate again.
Signed-off-by: Jason Yan
Cc: Diana Craci
Le 17/07/2019 à 10:06, Jason Yan a écrit :
This patch add support to boot kernel from places other than KERNELBASE.
Since CONFIG_RELOCATABLE has already supported, what we need to do is
map or copy kernel to a proper place and relocate. Freescale Book-E
parts expect lowmem to be mapped by fixe
Le 17/07/2019 à 10:06, Jason Yan a écrit :
The original kernel still exists in the memory, clear it now.
Signed-off-by: Jason Yan
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Nicholas Piggin
Cc: Kees Cook
---
arch/powe
Le 17/07/2019 à 10:06, Jason Yan a écrit :
After we have the basic support of relocate the kernel in some
appropriate place, we can start to randomize the offset now.
Entropy is derived from the banner and timer, which will change every
build and boot. This not so much safe so additionally th
Le 17/07/2019 à 10:06, Jason Yan a écrit :
One may want to disable kaslr when boot, so provide a cmdline parameter
'nokaslr' to support this.
Signed-off-by: Jason Yan
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: Nicholas P
Le 17/07/2019 à 10:06, Jason Yan a écrit :
When kaslr is enabled, the kernel offset is different for every boot.
This brings some difficult to debug the kernel. Dump out the kernel
offset when panic so that we can easily debug the kernel.
Signed-off-by: Jason Yan
Cc: Diana Craciun
Cc: Micha
Le 24/07/2019 à 10:46, Nicholas Piggin a écrit :
Ensure __va is given a physical address below PAGE_OFFSET, and __pa is
given a virtual address above PAGE_OFFSET.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/include/asm/page.h | 14 --
1 file changed, 12 insertions(+), 2 de
Anju T Sudhakar writes:
> Hi Qian,
>
> On 7/16/19 12:11 AM, Qian Cai wrote:
>> On Thu, 2019-07-11 at 14:53 +1000, Michael Ellerman wrote:
>>> Hi Maddy,
>>>
>>> Madhavan Srinivasan writes:
diff --git a/arch/powerpc/platforms/powernv/opal-imc.c
b/arch/powerpc/platforms/powernv/opal-imc.c
Srikar Dronamraju writes:
> One of the uses of chip_id is to find out all cores that are part of the same
> chip. However ibm,chip_id property is not present in device-tree of PowerVM
> Lpars. Hence lscpu output shows one core per socket and multiple cores.
>
> Before the patch.
> # lscpu
> Archit
On 2019/7/29 19:05, Christophe Leroy wrote:
Le 17/07/2019 à 10:06, Jason Yan a écrit :
Add a new helper create_tlb_entry() to create a tlb entry by the virtual
and physical address. This is a preparation to support boot kernel at a
randomized address.
Signed-off-by: Jason Yan
Cc: Diana Cra
On 2019/7/29 19:08, Christophe Leroy wrote:
Le 17/07/2019 à 10:06, Jason Yan a écrit :
Add a new helper reloc_kernel_entry() to jump back to the start of the
new kernel. After we put the new kernel in a randomized place we can use
this new helper to enter the kernel and begin to relocate aga
On 2019/7/29 19:19, Christophe Leroy wrote:
Le 17/07/2019 à 10:06, Jason Yan a écrit :
The original kernel still exists in the memory, clear it now.
Signed-off-by: Jason Yan
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Cc: N
On 2019/7/29 19:33, Christophe Leroy wrote:
Le 17/07/2019 à 10:06, Jason Yan a écrit :
After we have the basic support of relocate the kernel in some
appropriate place, we can start to randomize the offset now.
Entropy is derived from the banner and timer, which will change every
build and
On 2019/7/29 19:38, Christophe Leroy wrote:
Le 17/07/2019 à 10:06, Jason Yan a écrit :
One may want to disable kaslr when boot, so provide a cmdline parameter
'nokaslr' to support this.
Signed-off-by: Jason Yan
Cc: Diana Craciun
Cc: Michael Ellerman
Cc: Christophe Leroy
Cc: Benjamin He
On 2019/7/29 19:43, Christophe Leroy wrote:
Le 17/07/2019 à 10:06, Jason Yan a écrit :
When kaslr is enabled, the kernel offset is different for every boot.
This brings some difficult to debug the kernel. Dump out the kernel
offset when panic so that we can easily debug the kernel.
Signed-o
This series goes on top of the unmerged machine check handler
changes
https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=118814
This carries on with the goal of unwinding macros and consolidating
code. This gets most of the way there, but we have traded that
improvement for another pr
This buglet goes back to before the 64/32 arch merge, but it does not
seem to have had practical consequences because bad_page_fault does
not use the 2nd argument, but rather regs->dar/nip.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/kernel/exceptions-64s.S | 2 +-
1 file changed, 1 insertio
The head-64.h code should deal only with the head code sections
and offset calculations.
No generated code change except BUG line number constants.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/include/asm/head-64.h | 41
arch/powerpc/kernel/exceptions-64s.S | 4
Use EXC_HV_OR_STD to de-duplicate the 0x500 external interrupt.
This helps with consolidation in future.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/kernel/exceptions-64s.S | 102 +--
1 file changed, 79 insertions(+), 23 deletions(-)
diff --git a/arch/powerpc/kernel/
The perf virt handler uses EXCEPTION_PROLOG_2_REAL rather than _VIRT.
In practice this is okay because the _REAL variant is usable by virt
mode interrupts, but should be fixed (and is a performance win).
Signed-off-by: Nicholas Piggin
---
arch/powerpc/kernel/exceptions-64s.S | 2 +-
1 file chang
This vector is not used by any supported processor, and has been
implemented as an unknown exception going back to 2.6. There is
nothing special about 0xb00, so remove it like other unused
vectors.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/kernel/exceptions-64s.S | 6 ++
1 file changed
This creates a single macro that generates the exception prolog code,
with variants specified by arguments, rather than assorted nested
macros for different variants.
The increasing length of macro argument list is not nice to read or
modify, but this is a temporary condition that will be improved
EXCEPTION_PROLOG_0 and _1 have only a single caller, so expand them
into it.
Rename EXCEPTION_PROLOG_2_REAL to INT_SAVE_SRR_AND_JUMP and
EXCEPTION_PROLOG_2_VIRT to INT_VIRT_SAVE_SRR_AND_JUMP, which are
more descriptive.
No generated code change except BUG line number constants.
Signed-off-by: Ni
All other virt handlers have the prolog code in the virt vector rather
than branch to the real vector. Follow this pattern in the denorm virt
handler.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/kernel/exceptions-64s.S | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/
Signed-off-by: Nicholas Piggin
---
arch/powerpc/kernel/exceptions-64s.S | 16 ++--
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/kernel/exceptions-64s.S
b/arch/powerpc/kernel/exceptions-64s.S
index 1c07b5fc6692..e5122ace5f05 100644
--- a/arch/powerpc/ker
Replace the 4 variants of cpp macros with one gas macro.
No generated code change except BUG line number constants.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/kernel/exceptions-64s.S | 99 +++-
1 file changed, 40 insertions(+), 59 deletions(-)
diff --git a/arch/pow
Also change argument name (n -> vec) to match others.
No generated code change.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/kernel/exceptions-64s.S | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/powerpc/kernel/exceptions-64s.S
b/arch/powerpc/kerne
Merge EXCEPTION_PROLOG_COMMON_3 into EXCEPTION_PROLOG_COMMON_2.
No generated code change except BUG line number constants.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/kernel/exceptions-64s.S | 18 ++
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/arch/powerpc
No generated code change except BUG line number constants.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/kernel/exceptions-64s.S | 52 +---
1 file changed, 32 insertions(+), 20 deletions(-)
diff --git a/arch/powerpc/kernel/exceptions-64s.S
b/arch/powerpc/kernel/except
No generated code change except BUG line number constants.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/kernel/exceptions-64s.S | 54 ++--
1 file changed, 27 insertions(+), 27 deletions(-)
diff --git a/arch/powerpc/kernel/exceptions-64s.S
b/arch/powerpc/kernel/except
No generated code change except BUG line number constants.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/kernel/exceptions-64s.S | 85 +---
1 file changed, 40 insertions(+), 45 deletions(-)
diff --git a/arch/powerpc/kernel/exceptions-64s.S
b/arch/powerpc/kernel/except
Signed-off-by: Nicholas Piggin
---
arch/powerpc/kernel/exceptions-64s.S | 111 ---
1 file changed, 51 insertions(+), 60 deletions(-)
diff --git a/arch/powerpc/kernel/exceptions-64s.S
b/arch/powerpc/kernel/exceptions-64s.S
index dcb60f082fdc..456926439e41 100644
--- a/arc
This better reflects the order in which the code is executed.
No generated code change except BUG line number constants.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/kernel/exceptions-64s.S | 450 +--
1 file changed, 225 insertions(+), 225 deletions(-)
diff --git a/a
It's a bit too clever to jump to a label inside an expanded macro,
particularly when the label is just a number rather than a descriptive
name.
So expand interrupt handler code twice, for the stack and no stack
cases, and branch to those. The slight code size increase is worth
the improved clarity
Reviewed-by: Diana Craciun
Tested-by: Diana Craciun
On 7/17/2019 10:49 AM, Jason Yan wrote:
> This series implements KASLR for powerpc/fsl_booke/32, as a security
> feature that deters exploit attempts relying on knowledge of the location
> of kernel internals.
>
> Since CONFIG_RELOCATABLE has
I think you need to keep the more restrictive EXPORT_SYMBOL_GPL from
the 64-bit code to keep the intention of all authors intact.
On Wed, Jul 17, 2019 at 04:06:14PM +0800, Jason Yan wrote:
> Now the kernel base is a fixed value - KERNELBASE. To support KASLR, we
> need a variable to store the kernel base.
This should probably merged into the patch actually using it.
On Sun, Jul 28, 2019 at 07:26:08PM -0500, Gustavo A. R. Silva wrote:
> Mark switch cases where we are expecting to fall through.
>
> This patch fixes the following warnings:
>
> drivers/scsi/ibmvscsi/ibmvfc.c: In function 'ibmvfc_npiv_login_done':
> drivers/scsi/ibmvscsi/ibmvfc.c:4022:3: warning:
On Mon, Jul 29, 2019 at 01:25:41PM -0700, Nick Desaulniers wrote:
> Commit 6c5875843b87 ("powerpc: slightly improve cache helpers") exposed
> what looks like a codegen bug in Clang's handling of `%y` output
> template with `Z` constraint. This is resulting in panics during boot
> for 32b powerpc bu
On Mon, Jul 29, 2019 at 01:45:35PM -0700, Nick Desaulniers wrote:
> On Mon, Jul 29, 2019 at 1:32 PM Nathan Chancellor
> wrote:
> >
> > On Mon, Jul 29, 2019 at 01:25:41PM -0700, Nick Desaulniers wrote:
> > > But I'm not sure how the inlined code generated would be affected.
> >
> > For the record:
On Mon, Jul 29, 2019 at 1:47 PM Nathan Chancellor
wrote:
>
> On Mon, Jul 29, 2019 at 01:45:35PM -0700, Nick Desaulniers wrote:
> > On Mon, Jul 29, 2019 at 1:32 PM Nathan Chancellor
> > wrote:
> > >
> > > On Mon, Jul 29, 2019 at 01:25:41PM -0700, Nick Desaulniers wrote:
> > > > But I'm not sure ho
On Mon, Jul 29, 2019 at 01:32:46PM -0700, Nathan Chancellor wrote:
> For the record:
>
> https://godbolt.org/z/z57VU7
>
> This seems consistent with what Michael found so I don't think a revert
> is entirely unreasonable.
Try this:
https://godbolt.org/z/6_ZfVi
This matters in non-trivial loo
https://bugzilla.kernel.org/show_bug.cgi?id=204375
Bug ID: 204375
Summary: kernel 5.2.4 w. KASAN enabled fails to boot on a
PowerMac G4 3,6 at very early stage
Product: Platform Specific/Hardware
Version: 2.5
Kernel Version: 5.2.
https://bugzilla.kernel.org/show_bug.cgi?id=204375
--- Comment #1 from Erhard F. (erhar...@mailbox.org) ---
Created attachment 284039
--> https://bugzilla.kernel.org/attachment.cgi?id=284039&action=edit
kernel .config (PowerMac G4 DP, kernel 5.2.4)
With this .config the G4 DP boots fine.
With t
https://bugzilla.kernel.org/show_bug.cgi?id=204371
Erhard F. (erhar...@mailbox.org) changed:
What|Removed |Added
CC||linuxppc-dev@lists.ozla
On 7/29/19 3:16 AM, Stephen Rothwell wrote:
> Hi Santosh,
>
> On Mon, 29 Jul 2019 11:25:36 +0530 Santosh Sivaraj wrote:
>>
>> Implicit fallthrough warning was enabled globally which broke
>> the build. Make it explicit with a `fall through` comment.
>>
>> Signed-off-by: Santosh Sivaraj
Revie
On 2019/7/29 22:31, Christoph Hellwig wrote:
I think you need to keep the more restrictive EXPORT_SYMBOL_GPL from
the 64-bit code to keep the intention of all authors intact.
Oh yes, I will fix in v2. Thanks.
.
Signed-off-by: Pei-Hsuan Hung
Acked-by: Liviu Dudau
Cc: triv...@kernel.org
---
Hi Liviu, thanks for your reply.
This patch is generated by a script so at first I didn't notice there is
also a typo in the word coefficient. I've fixed the typo in this
version.
arch/powerpc/kernel/eeh.c
From: Michael Petlan
Documentation source:
https://wiki.raptorcs.com/w/images/6/6b/POWER9_PMU_UG_v12_28NOV2018_pub.pdf
Signed-off-by: Michael Petlan
Reviewed-by: Madhavan Srinivasan
Cc: Ananth N Mavinakayanahalli
Cc: Carl Love
Cc: Michael Ellerman
Cc: Naveen N. Rao
Cc: Paul Clarke
Cc: Su
Hi all,
On Mon, 29 Jul 2019 18:45:40 -0500 "Gustavo A. R. Silva"
wrote:
>
> On 7/29/19 3:16 AM, Stephen Rothwell wrote:
> >
> > On Mon, 29 Jul 2019 11:25:36 +0530 Santosh Sivaraj
> > wrote:
> >>
> >> Implicit fallthrough warning was enabled globally which broke
> >> the build. Make it expli
Hi Stephen,
On 7/29/19 10:18 PM, Stephen Rothwell wrote:
> Hi all,
>
> On Mon, 29 Jul 2019 18:45:40 -0500 "Gustavo A. R. Silva"
> wrote:
>>
>> On 7/29/19 3:16 AM, Stephen Rothwell wrote:
>>>
>>> On Mon, 29 Jul 2019 11:25:36 +0530 Santosh Sivaraj
>>> wrote:
Implicit fallthrough war
Hi Gustavo,
On Mon, 29 Jul 2019 22:30:34 -0500 "Gustavo A. R. Silva"
wrote:
>
> If no one takes it by tomorrow, I'll take it in my tree.
I am assuming that Michael Ellerman will take it into his fixes tree
and send it to Lunis fairly soon as it actually breaks some powerpc
builds.
--
Cheers,
On 7/29/19 10:50 PM, Stephen Rothwell wrote:
> Hi Gustavo,
>
> On Mon, 29 Jul 2019 22:30:34 -0500 "Gustavo A. R. Silva"
> wrote:
>>
>> If no one takes it by tomorrow, I'll take it in my tree.
>
> I am assuming that Michael Ellerman will take it into his fixes tree
> and send it to Lunis fair
Hi Gustavo,
On Mon, 29 Jul 2019 22:57:05 -0500 "Gustavo A. R. Silva"
wrote:
>
> On 7/29/19 10:50 PM, Stephen Rothwell wrote:
> >
> > I am assuming that Michael Ellerman will take it into his fixes tree
> > and send it to Lunis fairly soon as it actually breaks some powerpc
> > builds.
>
> Yeah
Mark switch cases where we are expecting to fall through.
This patch fixes the following warning (Building: powerpc):
drivers/macintosh/smu.c: In function 'smu_queue_i2c':
drivers/macintosh/smu.c:854:21: warning: this statement may fall through
[-Wimplicit-fallthrough=]
cmd->info.devaddr &= 0
Hi all,
On Tue, 30 Jul 2019 14:37:04 +1000 Stephen Rothwell
wrote:
>
> Mark switch cases where we are expecting to fall through.
>
> This patch fixes the following warning (Building: powerpc):
>
> drivers/macintosh/smu.c: In function 'smu_queue_i2c':
> drivers/macintosh/smu.c:854:21: warning:
The Linux kernel for powerpc since v3.9 has a bug in the TM handling where any
unprivileged local user may crash the operating system.
This bug affects machines using 64-bit CPUs where Transactional Memory (TM) is
not present or has been disabled (see below for more details on affected CPUs).
To
Thanks everyone for reviewing this patch-set. The V4 got merged upstream which
didn't have this DOC-patch. So, I will re-spin a separate and independent
doc-patch incorporating your review comments.
Cheers,
--
Vaibhav Jain
Linux Technology Center, IBM India Pvt. Ltd.
Le 29/07/2019 à 22:32, Nathan Chancellor a écrit :
On Mon, Jul 29, 2019 at 01:25:41PM -0700, Nick Desaulniers wrote:
Commit 6c5875843b87 ("powerpc: slightly improve cache helpers") exposed
what looks like a codegen bug in Clang's handling of `%y` output
template with `Z` constraint. This is r
On Mon, Jul 29, 2019 at 11:57:19AM +0200, Geert Uytterhoeven wrote:
> Hi Christoph,
>
> On Thu, Jul 25, 2019 at 8:35 AM Christoph Hellwig wrote:
> > Most dma_map_ops instances are IOMMUs that work perfectly fine in 32-bits
> > of IOVA space, and the generic direct mapping code already provides it
73 matches
Mail list logo