On Tue, 2023-08-22 at 16:33 -0500, Nathan Lynch via B4 Relay wrote:
> From: Nathan Lynch
Hi Nathan,
snowpatch has found a compiler error with this patch.
Error: papr_vpd.c:346:33: error: passing argument 2 of 'test_harness'
discards 'const' qualifier from pointer target type [-Werror=dis
abled.
Instead of disabling preemption on the caller side, rework
lppaca_shared_proc() to not take a pointer and instead directly access
the lppaca, bypassing any potential preemption checks.
Fixes: f13c13a00512 ("powerpc: Stop using non-architected shared_proc field in
lppaca")
Signed-
aesp10-ppc.S and ghashp10-ppc.S are autogenerated and not tracked by
git, so they should be ignored. This is doing the same as the P8 files
in drivers/crypto/vmx/.gitignore but for the P10 files in
arch/powerpc/crypto.
Signed-off-by: Russell Currey
---
Fixes: 81d358b118dc ("powerpc/crypto
ck and expanding the
> comment
> to cover both cases, rewrite the three cases to be separate so they
> can
> be commented separately for clarity.
>
> Fixes: 84ed26fd00c5 ("powerpc/security: Add a security feature for
> STF barrier")
> Cc: sta...@vger.kernel.org # v5.14+
> Reported-by: Nageswara R Sastry
> Signed-off-by: Michael Ellerman
Reviewed-by: Russell Currey
nd ARRAY_SIZE will be used by the following
> DEXCR selftests.
>
> Signed-off-by: Benjamin Gray
>
I'd prefer if your commit message led with adding FAIL_IF_MSG etc and
then mentioned the other changes to support it. It's unintuitive to
read as-is.
Reviewed-by: Russell Currey
config
> option
>
> This documentation is a little bare for now, but will be expanded on
> when dynamic DEXCR control is added.
Reviewed-by: Russell Currey
reased security or migratable ROP
> protected processes. This is similar to how ARM exposes its PAC keys.
>
> Signed-off-by: Benjamin Gray
Seems sensible
Reviewed-by: Russell Currey
DEXCR setting it).
>
> Signed-off-by: Benjamin Gray
>
I don't know much about ptrace but this looks sane.
Reviewed-by: Russell Currey
em state.
> This should be safe, as generally software needs to request these
> instructions be included in the first place.
>
> Signed-off-by: Benjamin Gray
>
Reviewed-by: Russell Currey
> ---
> New in v1
>
> Preface with: I'm note sure on the best place t
reate
> valid hash values for a victim process.
>
> Add support for storing a per-thread hash key, and setting/clearing
> HASHKEYR appropriately.
>
> Signed-off-by: Benjamin Gray
Reviewed-by: Russell Currey
On Thu, 2023-03-30 at 16:50 +1100, Benjamin Gray wrote:
> Recognise and pass the appropriate signal to the user program when a
> hashchk instruction triggers. This is independent of allowing
> configuration of DEXCR[NPHIE], as a hypervisor can enforce this
> aspect
> regardless of the kernel.
>
>
o a compilation
> error when a translation unit does not also include
> indirectly.
>
> Signed-off-by: Benjamin Gray
> Reviewed-by: Nicholas Piggin
Reviewed-by: Russell Currey
currently only detect it on pseries.
>
> Signed-off-by: Benjamin Gray
>
LGTM.
Reviewed-by: Russell Currey
hat tries to inspect ptrace-decl.h by itself.
>
> Signed-off-by: Benjamin Gray
Reviewed-by: Russell Currey
Signed-off-by: Russell Currey
---
arch/powerpc/kernel/iommu.c | 15 ---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
index ee95937bdaf1..6f1117fe3870 100644
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch
() check for
PROT_NONE mappings, and adding a separate check for Radix PROT_EXEC-only
mappings.
Fixes: 395cac7752b9 ("powerpc/mm: Support execute-only memory on the Radix MMU")
Reported-by: Michal Suchánek
Tested-by: Benjamin Gray
Signed-off-by: Russell Currey
---
arch/powerpc/mm/fa
On Wed, 2023-03-08 at 16:27 +0100, Michal Suchánek wrote:
> Hello,
>
> On Wed, Aug 31, 2022 at 11:13:59PM +1000, Michael Ellerman wrote:
> > On Wed, 17 Aug 2022 15:06:39 +1000, Russell Currey wrote:
> > > Add support for execute-only memory (XOM) for the Radix MMU by
>
fig values, support
additional fields")
Reported-by: Murphy Zhou
Signed-off-by: Russell Currey
---
arch/powerpc/platforms/pseries/plpks.c | 4
1 file changed, 4 insertions(+)
diff --git a/arch/powerpc/platforms/pseries/plpks.c
b/arch/powerpc/platforms/pseries/plpks.c
index cdf09e5bd741..6f7b
On Mon, 2023-01-30 at 15:43 +1100, Andrew Donnellan wrote:
> On Tue, 2023-01-24 at 14:16 +1000, Nicholas Piggin wrote:
> > > diff --git a/arch/powerpc/platforms/pseries/plpks.c
> > > b/arch/powerpc/platforms/pseries/plpks.c
> > > index 1189246b03dc..796ed5544ee5 100644
> > > --- a/arch/powerpc/plat
On Tue, 2023-01-24 at 14:36 +1000, Nicholas Piggin wrote:
> On Fri Jan 20, 2023 at 5:43 PM AEST, Andrew Donnellan wrote:
> > From: Russell Currey
> >
> > Before interacting with the PLPKS, we ask the hypervisor to
> > generate a
> > password for the current boot
On Tue, 2023-01-24 at 10:14 -0500, Mimi Zohar wrote:
> On Fri, 2023-01-20 at 18:43 +1100, Andrew Donnellan wrote:
> > From: Russell Currey
> >
> > The secvar object format is only in the device tree under powernv.
> > We now have an API call to retrieve it in a ge
On Thu, 2023-01-19 at 11:17 +1000, Nicholas Piggin wrote:
> On Wed Jan 18, 2023 at 4:10 PM AEST, Andrew Donnellan wrote:
> > From: Russell Currey
> >
> > The code that handles the format string in secvar-sysfs.c is
> > entirely
> > OPAL specific, so create a new
> Change all the secvar related routines to use u64.
>
> Signed-off-by: Michael Ellerman
Reviewed-by: Russell Currey
On Mon, 2023-01-09 at 16:20 +1100, Andrew Donnellan wrote:
> On Mon, 2023-01-09 at 14:34 +1100, Russell Currey wrote:
> >
> > > > +static int plpks_secvar_init(void)
> > > > +{
> > > > + if (!plpks_is_availa
On Fri, 2023-01-06 at 21:49 +1100, Michael Ellerman wrote:
> Russell Currey writes:
> > The pseries platform can support dynamic secure boot (i.e. secure
> > boot
> > using user-defined keys) using variables contained with the PowerVM
> > LPAR
> > Platform Key
On Thu, 2023-01-05 at 19:15 +1100, Andrew Donnellan wrote:
> On Fri, 2022-12-30 at 15:20 +1100, Russell Currey wrote:
> > The pseries platform can support dynamic secure boot (i.e. secure
> > boot
> > using user-defined keys) using variables contained with the PowerVM
On Fri, 2023-01-06 at 15:15 +1100, Michael Ellerman wrote:
> Russell Currey writes:
> > The forthcoming pseries consumer of the secvar API wants to expose
> > a
> > number of config variables. Allowing secvar implementations to
> > provide
> > their own s
On Thu, 2023-01-05 at 18:28 +1100, Andrew Donnellan wrote:
> On Fri, 2022-12-30 at 15:20 +1100, Russell Currey wrote:
> > The forthcoming pseries consumer of the secvar API wants to expose
> > a
> > number of config variables. Allowing secvar implementations to
> >
On Tue, 2022-12-20 at 18:16 +1100, Andrew Donnellan wrote:
> From: Nayna Jain
>
> The Platform Keystore provides a signed update interface which can be
> used
> to create, replace or append to certain variables in the PKS in a
> secure
> fashion, with the hypervisor requiring that the update be s
On Tue, 2022-12-20 at 18:16 +1100, Andrew Donnellan wrote:
> From: Nayna Jain
>
> The plpks driver uses the H_PKS_GET_CONFIG hcall to retrieve
> configuration
> and status information about the PKS from the hypervisor.
>
> Update _plpks_get_config() to handle some additional fields. Add
> getter
ay
> Fixes: 2454a7af0f2a ("powerpc/pseries: define driver for Platform
> KeyStore")
> Signed-off-by: Andrew Donnellan
>
Reviewed-by: Russell Currey
series: define driver for Platform
> KeyStore")
> Reported-by: Benjamin Gray
> Signed-off-by: Andrew Donnellan
Tested-by: Russell Currey
Reviewed-by: Russell Currey
ff-by: Russell Currey
---
v2: Remove unnecessary config vars from sysfs and document the others,
thanks to review from Greg. If we end up needing to expose more, we
can add them later and update the docs.
Use sysfs_emit() instead of sprintf(), thanks to Greg.
Change the size o
the config directory will not be created if no attributes are set.
Signed-off-by: Russell Currey
---
I played around with adding an API call to facilitate a more generic
key/value interface for config variables and it seemed like unnecessary
complexity. I think this is cleaner. If there was
Currently the max object size is handled in the core secvar code with an
entirely OPAL-specific implementation, so create a new max_size() op and
move the existing implementation into the powernv platform. Should be
no functional change.
Signed-off-by: Russell Currey
---
arch/powerpc/include
The code that handles the format string in secvar-sysfs.c is entirely
OPAL specific, so create a new "format" op in secvar_operations to make
the secvar code more generic. No functional change.
Signed-off-by: Russell Currey
---
arch/powerpc/include/asm/secvar.h| 1 +
ar
The secvar format string and object size sysfs files are both ASCII
text, and should use sysfs_emit(). No functional change.
Suggested-by: Greg Kroah-Hartman
Signed-off-by: Russell Currey
---
v2: new
arch/powerpc/kernel/secvar-sysfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions
The secvar code only supports one consumer at a time.
Multiple consumers aren't possible at this point in time, but we'd want
it to be obvious if it ever could happen.
Signed-off-by: Russell Currey
---
arch/powerpc/kernel/secvar-ops.c | 4 +++-
1 file changed, 3 insertions(+),
06210744.603240-1-na...@linux.ibm.com/
[1]:
https://lore.kernel.org/linuxppc-dev/20221220071626.1426786-1-...@linux.ibm.com/
v1:
https://lore.kernel.org/linuxppc-dev/20221228072943.429266-1-rus...@russell.cc/
Russell Currey (7):
powerpc/pseries: Log hcall return codes for PLPKS debug
powerpc/secva
The plpks code converts hypervisor return codes into their Linux
equivalents so that users can understand them. Having access to the
original return codes is really useful for debugging, so add a
pr_debug() so we don't lose information from the conversion.
Signed-off-by: Russell C
The code that handles the format string in secvar-sysfs.c is entirely
OPAL specific, so create a new "format" op in secvar_operations to make
the secvar code more generic. No functional change.
Signed-off-by: Russell Currey
---
arch/powerpc/include/asm/secvar.h| 1 +
ar
the config directory will not be created if no attributes are set.
Signed-off-by: Russell Currey
---
I played around with adding an API call to facilitate a more generic
key/value interface for config variables and it seemed like unnecessary
complexity. I think this is cleaner. If there was
The plpks code converts hypervisor return codes into their Linux
equivalents so that users can understand them. Having access to the
original return codes is really useful for debugging, so add a
pr_debug() so we don't lose information from the conversion.
Signed-off-by: Russell C
The secvar code only supports one consumer at a time.
Multiple consumers aren't possible at this point in time, but we'd want
it to be obvious if it ever could happen.
Signed-off-by: Russell Currey
---
arch/powerpc/kernel/secvar-ops.c | 4 +++-
1 file changed, 3 insertions(+),
e one being added in future.
With this series, both powernv and pseries platforms support dynamic
secure boot through the same interface.
[0]:
https://lore.kernel.org/linuxppc-dev/20221106210744.603240-1-na...@linux.ibm.com/
[1]:
https://lore.kernel.org/linuxppc-dev/20221220071626.1426786-1-...@lin
ff-by: Russell Currey
---
Documentation/ABI/testing/sysfs-secvar| 8 +
arch/powerpc/platforms/pseries/Kconfig| 13 +
arch/powerpc/platforms/pseries/Makefile | 4 +-
arch/powerpc/platforms/pseries/plpks-secvar.c | 250 ++
4 files changed, 273 insertions(
Currently the max object size is handled in the core secvar code with an
entirely OPAL-specific implementation, so create a new max_size() op and
move the existing implementation into the powernv platform. Should be
no functional change.
Signed-off-by: Russell Currey
---
arch/powerpc/include
On Mon, 2022-11-28 at 13:44 +1100, Benjamin Gray wrote:
> This series is based on initial work by Chris Riedl that was not sent
> to the list.
>
> Adds a kernel interface for userspace to interact with the DEXCR.
> The DEXCR is a SPR that allows control over various execution
> 'aspects', such as
On Thu, 2022-11-03 at 09:45 +1100, Rohan McLure wrote:
> Zero user state in gprs (assign to zero) to reduce the influence of
> user
> registers on speculation within kernel syscall handlers. Clears occur
> at the very beginning of the sc and scv 0 interrupt handlers, with
> restores occurring follo
On Mon, 2022-10-31 at 15:54 +1000, Nicholas Piggin wrote:
> Most callers just want to validate an arbitrary kernel stack pointer,
> some need a particular size. Make the size case the exceptional one
> with an extra function.
>
> Signed-off-by: Nicholas Piggin
> ---
> arch/powerpc/include/asm/pr
On Sat, 2022-11-05 at 04:27 +1100, Andrew Donnellan wrote:
> A number of OPAL calls take addresses as arguments (e.g. buffers with
> strings to print, etc). These addresses need to be physical
> addresses, as
> OPAL runs in real mode.
>
> Since the hardware ignores the top two bits of the address
scv support in commit 3fee229a8eb9 ("riscv/mm: enable
> ARCH_SUPPORTS_PAGE_TABLE_CHECK")
> arm64 in commit 42b2547137f5 ("arm64/mm: enable
> ARCH_SUPPORTS_PAGE_TABLE_CHECK")
> x86_64 in commit d283d422c6c4 ("x86: mm: add x86_64 support for page
> table
> check")
>
> Signed-off-by: Rohan McLure
Reviewed-by: Russell Currey
On Sun, 2022-10-23 at 20:44 +0800, KaiLong Wang wrote:
> Fix the following coccicheck warning:
>
> arch/powerpc/xmon/xmon.c:2987: WARNING opportunity for min()
> arch/powerpc/xmon/xmon.c:2583: WARNING opportunity for min()
>
> Signed-off-by: KaiLong Wang
Hello,
This fails to compile on some pl
On Fri, 2022-10-21 at 16:22 +1100, Benjamin Gray wrote:
> Adds a local TLB flush operation that works given an mm_struct, VA to
> flush, and page size representation.
>
> This removes the need to create a vm_area_struct, which the temporary
> patching mm work does not need.
>
> Signed-off-by: Ben
In hw_breakpoint_handler(), ea is set by wp_get_instr_detail() except
for 8xx, leading the variable to be passed uninitialised to
wp_check_constraints(). This is safe as wp_check_constraints() returns
early without using ea, so just set it to make the compiler happy.
Signed-off-by: Russell
On Fri, 2022-10-21 at 16:22 +1100, Benjamin Gray wrote:
> From: "Christopher M. Riedl"
>
> x86 supports the notion of a temporary mm which restricts access to
> temporary PTEs to a single CPU. A temporary mm is useful for
> situations
> where a CPU needs to perform sensitive operations (such as p
On Fri, 2022-10-21 at 16:22 +1100, Benjamin Gray wrote:
> Adds a local TLB flush operation that works given an mm_struct, VA to
> flush, and page size representation.
>
> This removes the need to create a vm_area_struct, which the temporary
> patching mm work does not need.
>
> Signed-off-by: Ben
On Fri, 2022-10-21 at 16:22 +1100, Benjamin Gray wrote:
> Verifies that if the instruction patching did not return an error
> then
> the value stored at the given address to patch is now equal to the
> instruction we patched it to.
>
> Signed-off-by: Benjamin Gray
> ---
> arch/powerpc/lib/code-p
d a negative integer on failure.
>
> Signed-off-by: Benjamin Gray
Reviewed-by: Russell Currey
On Fri, 2022-10-21 at 16:22 +1100, Benjamin Gray wrote:
> From: Jordan Niethe
Hi Ben,
> For the coming temporary mm used for instruction patching, the
> breakpoint registers need to be cleared to prevent them from
> accidentally being triggered. As soon as the patching is done, the
> breakpoints
> Based on previous work by Christophe Leroy and Jordan Niethe.
>
> Signed-off-by: Nicholas Miehlbradt
LGTM. For the whole series:
Reviewed-by: Russell Currey
On Thu, 2022-09-01 at 08:42 -0400, Joe Lawrence wrote:
> On Thu, Sep 01, 2022 at 01:39:02PM +1000, Michael Ellerman wrote:
> > Joe Lawrence writes:
> > > On Thu, Sep 01, 2022 at 08:30:44AM +1000, Michael Ellerman wrote:
> > > > Joe Lawrence writes:
> > ...
> > >
> > > Hi Michael,
> > >
> > > Wh
On Thu, 2022-09-01 at 07:01 +, Christophe Leroy wrote:
>
>
> Le 01/09/2022 à 07:58, Benjamin Gray a écrit :
> > From: Russell Currey
> >
> > powerpc allocates a text poke area of one page that is used by
> > patch_instruction() to modify read-only text when
find_i2c_driver() contained the last usage of strlcpy() in arch/powerpc.
The return value was used to check if strlen(src) >= n, for which
strscpy() returns -E2BIG.
Signed-off-by: Russell Currey
---
arch/powerpc/platforms/pasemi/misc.c | 3 +--
1 file changed, 1 insertion(+), 2 deleti
Miehlbradt
Signed-off-by: Russell Currey
---
v4: new
tools/testing/selftests/powerpc/mm/Makefile | 3 +-
.../testing/selftests/powerpc/mm/exec_prot.c | 231 ++
2 files changed, 233 insertions(+), 1 deletion(-)
create mode 100644 tools/testing/selftests/powerpc/mm/exec_prot.c
nally equivalent for non-Radix MMUs, since it
follows write and execute checks. For Radix, the change enables
detecting faults on execute-only mappings where vma_is_accessible() would
return true.
Signed-off-by: Russell Currey
---
v4: Reword commit message, add changes suggested by Christophe and A
Some recently added selftests don't have their binaries in .gitignores,
so add them.
I also alphabetically sorted sampling_tests/.gitignore while I was in
there.
Signed-off-by: Russell Currey
---
.../powerpc/pmu/event_code_tests/.gitignore | 20 +++
.../powerp
hristophe Leroy
Signed-off-by: Russell Currey
---
v2: adopt Christophe's suggestion, which is better
arch/powerpc/kexec/file_load_64.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/kexec/file_load_64.c
b/arch/powerpc/kexec/file_load_64.c
index 683462
On Tue, 2022-08-09 at 05:51 +, Christophe Leroy wrote:
> Le 09/08/2022 à 04:44, Russell Currey a écrit :
> > The Hash MMU already supports XOM (i.e. mmap with PROT_EXEC only)
> > through the execute-only pkey. A PROT_EXEC-only mapping will
> > actually
> > map to RX
clang 14 won't build because ret is uninitialised and can be returned if
both prop and fdtprop are NULL.
Fixes: b1fc44eaa9ba ("pseries/iommu/ddw: Fix kdump to work in absence of
ibm,dma-window")
Signed-off-by: Russell Currey
---
Not sure what should be returned here, EINVAL se
ve to do to support XOM is expose it.
Signed-off-by: Russell Currey
---
v3: Incorporate Aneesh's suggestions, leave protection_map untouched
Basic test: https://github.com/ruscur/junkcode/blob/main/mmap_test.c
arch/powerpc/include/asm/book3s/64/pgtable.h | 2 ++
arch/powerpc/mm/book3s64
On Mon, 2022-08-08 at 18:54 +0530, Aneesh Kumar K V wrote:
> On 8/8/22 6:31 PM, Russell Currey wrote:
> > The Hash MMU already supports XOM (i.e. mmap with PROT_EXEC only)
> > through the execute-only pkey. A PROT_EXEC-only mapping will
> > actually
> > map to RX
On Mon, 2022-08-08 at 18:28 +0530, Aneesh Kumar K V wrote:
> On 8/8/22 5:28 PM, Russell Currey wrote:
> > The Hash MMU already supports XOM (i.e. mmap with PROT_EXEC only)
> > through the execute-only pkey. A PROT_ONLY mapping will actually
> > map to
> > RX, and then
On Mon, 2022-08-08 at 14:32 +, Christophe Leroy wrote:
>
>
> Le 08/08/2022 à 15:01, Russell Currey a écrit :
> > protection_map is about to be __ro_after_init instead of const, so
> > move
> > the only non-local function that consumes it to the same file so it
>
ve to do to support XOM is expose it.
That's not possible with protection_map being const, so make it RO after
init instead.
Signed-off-by: Russell Currey
---
v2: Make protection_map __ro_after_init and set it in an initcall
(v1 didn't work, I tested before rebasing on Anshuman's
protection_map is about to be __ro_after_init instead of const, so move
the only non-local function that consumes it to the same file so it can
at least be static.
Signed-off-by: Russell Currey
---
v2: new
arch/powerpc/mm/book3s64/pgtable.c | 16
arch/powerpc/mm/pgtable.c
to do to support XOM is expose it.
Signed-off-by: Russell Currey
---
quick test: https://raw.githubusercontent.com/ruscur/junkcode/main/mmap_test.c
I can make it a selftest.
arch/powerpc/include/asm/book3s/64/radix.h | 3 +++
arch/powerpc/mm/book3s64/radix_pgtable.c | 4
arch/power
I haven't touched EEH in a long time I don't have much knowledge of the
subsystem at this point either, so it's misleading to have me as a
maintainer.
I remain grateful to Oliver for picking up my slack over the years.
Signed-off-by: Russell Currey
---
MAINTAINERS | 1 -
1
, the selftest is unreliable as a pass/fail test without
the test runner knowing what they expect its behaviour to be. I don't
think the selftest is useless so we should keep it around, but we
shouldn't have run_tests run it by default.
Suggested-by: Eirik Fuller
Signed-off-by: Russell Cur
iommu_register_group(ppci->table_group,
> pci_domain_nr(bus), 0);
> pr_debug(" created table: %p\n", ppci->table_group);
> @@ -1429,16 +1448,22 @@ static bool enable_ddw(struct pci_dev *dev,
> struct device_node
On Fri, 2022-06-17 at 18:02 +1000, Michael Ellerman wrote:
> This header was recently cleaned up in commit 76222808fc25 ("powerpc:
> Move C prototypes out of asm-prototypes.h"), update the comment to
> reflect it's proper purpose.
>
> Signed-off-by: Michael Ellerman
Hi Michael, subject says "pow
On Thu, 2022-05-12 at 13:15 +0530, Hari Bathini wrote:
> This adds two atomic opcodes BPF_XCHG and BPF_CMPXCHG on ppc64, both
> of which include the BPF_FETCH flag. The kernel's atomic_cmpxchg
> operation fundamentally has 3 operands, but we only have two register
> fields. Therefore the operand w
On Tue, 2022-04-05 at 02:49 +, Joel Stanley wrote:
> I booted both patches in this series on a power10 powernv machine,
> applied on top of v5.18-rc1:
>
> $ dmesg |grep -i flush
> [ 0.00] rfi-flush: fallback displacement flush available
> [ 0.00] rfi-flush: patched 12 locations
On Wed, 2022-03-23 at 16:26 -0300, Murilo Opsfelder Araújo wrote:
> Hi, Russell.
>
> I think this patch could have been split in half with their
> corresponding Fixes: tag.
>
> This may sound nitpicking but doing this would certainly help distros
> doing their backports.
Hi Murilo,
I didn't use
lushes are unnecessarily
enabled on those systems. This patch corrects this.
Fixes: d02fa40d759f ("powerpc/powernv: Remove POWER9 PVR version check for
entry and uaccess flushes")
Reported-by: Joel Stanley
Signed-off-by: Russell Currey
---
arch/powerpc/platforms/powernv/setup.c | 6 ++
e property have been
enabling the STF barrier when they have no need for it. This patch
fixes this by clearing the STF barrier feature on those systems.
Fixes: 84ed26fd00c5 ("powerpc/security: Add a security feature for STF barrier")
Reported-by: Joel Stanley
Signed-off-by: Russell Curre
vice-tree
checks for newer processors on powernv, these flushes are unnecessarily
enabled on those systems. This patch fixes that too.
Reported-by: Joel Stanley
Signed-off-by: Russell Currey
---
arch/powerpc/platforms/powernv/setup.c | 9 +
1 file changed, 9 insertions(+)
diff
an sizeof(arr) / sizeof(arr[0]) and more
> standard.
>
> Signed-off-by: Guo Zhengkui
Reviewed-by: Russell Currey
On Fri, 2022-02-11 at 13:31 +1100, Alexey Kardashevskiy wrote:
> diff --git a/arch/powerpc/lib/memcpy_64.S
> b/arch/powerpc/lib/memcpy_64.S
> index 016c91e958d8..286c7e2d0883 100644
> --- a/arch/powerpc/lib/memcpy_64.S
> +++ b/arch/powerpc/lib/memcpy_64.S
> @@ -50,10 +50,11 @@ ALT_FTR_SECTION_END_I
gt; Reported-by: Nageswara R Sastry
> Signed-off-by: Sachin Sant
Reviewed-by: Russell Currey
On Sun, 2021-12-12 at 10:41 +, Christophe Leroy wrote:
>
>
> Le 12/12/2021 à 02:03, Russell Currey a écrit :
> > Livepatching a loaded module involves applying relocations through
> > apply_relocate_add(), which attempts to write to read-only memory
> > when
>
On Sun, 2021-12-12 at 09:08 +, Christophe Leroy wrote:
> Le 12/12/2021 à 02:03, Russell Currey a écrit :
> > +static int do_patch_memory(void *dest, const void *src, size_t
> > size, unsigned long poke_addr)
> > +{
> > + unsigned long patch_addr = poke_add
set_memory_attr().
>
> Reported-by: Maxime Bizon
> Fixes: c988cfd38e48 ("powerpc/32: use set_memory_attr()")
> Cc: sta...@vger.kernel.org
> Depends-on: 9f7853d7609d ("powerpc/mm: Fix set_memory_*() against
> concurrent accesses")
> Signed-off-by: Christophe Leroy
Rev
map/unmap/flush operations
when use of patch_memory() is necessary.
This patch also contains some trivial whitespace fixes.
Fixes: c35717c71e98 ("powerpc: Set ARCH_HAS_STRICT_MODULE_RWX")
Reported-by: Joe Lawrence
Signed-off-by: Russell Currey
---
v2: No changes.
Some discussion
/unmap, pte flush and syncs.
This patch introduces patch_memory(), implementing the same
interface as memcpy(), similar to x86's text_poke() and s390's
s390_kernel_write(). patch_memory() only needs to map the text
poke area once, unless the write would cross a page boundary.
Signed-off-b
map/unmap/flush operations
when use of patch_memory() is necessary.
This patch also contains some trivial whitespace fixes.
Fixes: c35717c71e98 ("powerpc: Set ARCH_HAS_STRICT_MODULE_RWX")
Reported-by: Joe Lawrence
Signed-off-by: Russell Currey
---
Some discussion here:https://github.co
/unmap, pte flush and syncs.
This patch introduces patch_memory(), implementing the same
interface as memcpy(), similar to x86's text_poke() and s390's
s390_kernel_write(). patch_memory() only needs to map the text
poke area once, unless the write would cross a page boundary.
Signed-off-b
On Tue, 2021-12-07 at 09:44 -0500, Joe Lawrence wrote:
> On 11/23/21 3:15 AM, Russell Currey wrote:
>
> [[ cc += livepatching list ]]
>
> Hi Russell,
>
> Thanks for writing a minimal fix for stable / backporting. As I
> mentioned on the github issue [1], this avoided
impact, I observed ~15% overhead in
module_load() on POWER8 bare metal with checksum verification off.
Fixes: c35717c71e98 ("powerpc: Set ARCH_HAS_STRICT_MODULE_RWX")
Cc: sta...@vger.kernel.org # v5.14+
Reported-by: Joe Lawrence
Signed-off-by: Russell Currey
---
Intended to be a minima
On Sun, 2021-10-31 at 22:43 -0400, Joe Lawrence wrote:
> Starting with 5.14 kernels, I can reliably reproduce a crash [1] on
> ppc64le when loading livepatches containing late klp-relocations [2].
> These are relocations, specific to livepatching, that are resolved not
> when a livepatch module is
1 - 100 of 429 matches
Mail list logo