1000;
> +
> + fsleep(delay_us);
> + timeout += delay_us;
> }
> rc = pseries_status_to_err(rc);
> } while (rc == -EBUSY && timeout < PLPKS_MAX_TIMEOUT);
--
Andrew DonnellanOzLabs, ADL Canberra
a...@linux.ibm.com IBM Australia Limited
list.
Signed-off-by: Andrew Donnellan
---
MAINTAINERS | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index aea47e04c3a5..34f605498873 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5780,10 +5780,9 @@ F: include/uapi/misc/cxl.h
CXLFLASH
The cxl driver is no longer actively maintained and we intend to remove it
in a future kernel release. Change its status to obsolete, and update the
sysfs ABI documentation accordingly.
Signed-off-by: Andrew Donnellan
---
Documentation/ABI/{testing => obsolete}/sysfs-class-cxl
ep() everywhere to
> insert delay.
>
> Reported-by: Nageswara R Sastry
> Fixes: 2454a7af0f2a ("powerpc/pseries: define driver for Platform
> KeyStore")
> Signed-off-by: Nayna Jain
> Tested-by: Nageswara R Sastry
Reviewed-by: Andrew Donnellan
> ---
> v
> help
> + The cxl driver is no longer actively maintained and we
> intend to
> + remove it in a future kernel release.
> +
> Select this option to enable driver support for IBM
> Coherent
> Accelerators (CXL). CXL is otherwise known as Coherent
> Accelerator
> Processor Interface (CAPI). CAPI allows accelerators in
> FPGAs to be
--
Andrew DonnellanOzLabs, ADL Canberra
a...@linux.ibm.com IBM Australia Limited
On Fri, 2024-05-03 at 13:15 +1000, Andrew Donnellan wrote:
> This doesn't seem quite right to me, I don't think we can just
> redefine
> CONFIG_CXL as a bool, but I'll do something like this. Probably won't
> bother for CXLFLASH since they'll see it for CX
urselves and be using the same addresses in the child.
>
> While -fno-pie is already added, -no-pie is also required.
>
> Fixes: ca64da7574f8 ("selftests/powerpc/dexcr: Add hashst/hashchk
> test")
> Signed-off-by: Benjamin Gray
This matches the gcc documentation
On 21/9/20 11:10 pm, Qinglang Miao wrote:
Simplify the return expression.
Signed-off-by: Qinglang Miao
Looks good
Acked-by: Andrew Donnellan
--
Andrew Donnellan OzLabs, ADL Canberra
a...@linux.ibm.com IBM Australia Limited
On 26/8/20 11:53 pm, Sasha Levin wrote:
How should we proceed with this patch?
mpe: I believe we came to the conclusion that we shouldn't put this in
stable just yet?
--
Andrew Donnellan OzLabs, ADL Canberra
a...@linux.ibm.com IBM Australia Limited
tion exists, the filtering can be disabled by
a Kconfig option specified during kernel build.
Credit
==
Thanks to Daniel Axtens (IBM) for initial discovery of this issue.
[0]
https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?h=next&id=bd59380c5ba41
attempting the
subsequent ibm,update-nodes call.
drmgr is the only known (or plausible) user of these ibm,suspend-me,
ibm,update-nodes, and ibm,update-properties, so allow them only in
big-endian configurations.
And there's a zero chance that drmgr will ever be fixed on LE?
--
Andrew Donn
7;device'
description in 'get_function_0'
Cc: Frederic Barrat
Cc: Andrew Donnellan
Cc: Arnd Bergmann
Cc: Greg Kroah-Hartman
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Lee Jones
Thanks!
Acked-by: Andrew Donnellan
--
Andrew Donnellan OzLabs, ADL Canberra
a...
Okay. librtas should handle the error fine, so I don't have any huge
objection to this, though perhaps a documentation patch to librtas to
mention that these calls are BE-only would be in order.
--
Andrew Donnellan OzLabs, ADL Canberra
a...@linux.ibm.com IBM Australia Limited
ion compared with zero: win < 0
Reported-by: Tosk Robot
Signed-off-by: Kaixu Xia
This seems like the right fix, the value assigned to win can indeed be
-1 so it should be signed. Thanks for sending the patch.
Reviewed-by: Andrew Donnellan
---
arch/powerpc/platforms/powernv/pci-sriov
gt; to use modern style, then I would be happy to include a patch that
> modernises the surrounding code first.
This series would be a good opportunity to clean the rest of that file
up; either way, as Christophe says we should avoid adding new uses
given that people have started actively trying
Fix these spots to use a scratch register or use two immediate mode
instructions instead, so we can later enable VMAP_STACK.
Signed-off-by: Andrew Donnellan
---
arch/powerpc/include/asm/asm-compat.h | 2 ++
arch/powerpc/kernel/entry_64.S | 4 +++-
arch/powerpc/kernel/irq.c
ing on
patches for KVM support but they're not quite ready yet.
If anyone has better suggestions for the extremely ugly approach to fixing
OPAL calls, suggest away!
Andrew Donnellan (6):
powerpc/64s: Fix assembly to support larger values of THREAD_SIZE
powerpc/64s: Helpers to swit
k - we
can restore the MSR first, then restore the PACA into r13.
Signed-off-by: Andrew Donnellan
---
.../powerpc/platforms/powernv/opal-wrappers.S | 43 +++
1 file changed, 26 insertions(+), 17 deletions(-)
diff --git a/arch/powerpc/platforms/powernv/opal-wrappers.S
b/arch/powerpc
linear map and the
vmalloc space in the PACA, and add some helper macros/functions to swap
between them.
Signed-off-by: Andrew Donnellan
---
Some of the helpers that are currently unused will be used in the next
version of the series for the KVM real mode handling
---
arch/powerpc/include/asm
to a
physical address using stack_pa() before going into idle, and restore the
original pointer on the way back out.
Signed-off-by: Andrew Donnellan
---
This currently doesn't boot on my POWER9. I'm also going to clean this up
to use the helpers from earlier in this series.
---
ar
Enable CONFIG_VMAP_STACK for book3s64.
To do this, we need to make some slight adjustments to set the stack SLB
entry up for vmalloc rather than linear.
For now, only enable if KVM_BOOK3S_64_HV is disabled (there's some real mode
handlers we need to fix there).
Signed-off-by: Andrew Donn
and __pa() for linear map addresses. Add it
to all the existing callsites where we pass pointers to OPAL.
Signed-off-by: Andrew Donnellan
---
arch/powerpc/kvm/book3s_hv_builtin.c | 2 +-
arch/powerpc/platforms/powernv/eeh-powernv.c | 20 ++-
arch/powerpc/platforms/powernv/ocxl
-off-by: Yang Yingliang
Thanks for the fix!
Acked-by: Andrew Donnellan
> ---
> drivers/misc/cxl/guest.c | 24 ++--
> 1 file changed, 14 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/misc/cxl/guest.c b/drivers/misc/cxl/guest.c
> index 375f692ae9d6..fb95
powernv PCIe based cards
> for userspace access")
> Signed-off-by: Yang Yingliang
See reply to patch #1.
This patch puts a few things between the device_del() call and the
put_device() call, but that looks fine - we don't touch afu->dev in the
middle.
Thanks for the fix!
Acked
s for the fix - as you point out, put_device() should clean
everything up that needs cleaning up.
Acked-by: Andrew Donnellan
> ---
> drivers/misc/ocxl/file.c | 7 +--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/misc/ocxl/file.c b/drivers/misc/oc
reset_reload &= ~BIT(0);
> pci_write_config_dword(dev0, pos +
> OCXL_DVSEC_VENDOR_RESET_RELOAD,
> reset_reload);
> + if (PCI_FUNC(dev->devfn) != 0)
> + pci_dev_put(dev0);
> return 0;
> }
>
--
Andrew DonnellanOzLabs, ADL Canberra
a...@linux.ibm.com IBM Australia Limited
) is not called, so
> pci_dev_put() can be called in the error path and callers
> unconditionally. And add comment above get_dvsec_vendor0() to tell
> callers to call pci_dev_put().
>
> Fixes: 87db7579ebd5 ("ocxl: control via sysfs whether the FPGA is
> reloaded on a link re
ax which I see you clean up later in
the series.
Reviewed-by: Andrew Donnellan
> ---
> arch/powerpc/kernel/rtasd.c | 7 +--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/kernel/rtasd.c
> b/arch/powerpc/kernel/rtasd.c
> index 5270b450
I'm not overly familiar with some of the RTAS internal stuff you
describe, but I've checked the status codes against my copy of PAPR and
they concur, so I'll give this a:
Reviewed-by: Andrew Donnellan
> ---
> arch/powerpc/include/asm/rtas.h | 15 -
>
() since
> it is a boolean property, not a RTAS function token.
>
> Signed-off-by: Nathan Lynch
This seems sensible, minor comment below.
Reviewed-by: Andrew Donnellan
> ---
> arch/powerpc/kernel/rtas.c | 14 +++---
> 1 file changed, 11 insertions(+), 3 deletions(-)
&
effects
> whether to attempt the ibm,os-term RTAS call again.
>
> Signed-off-by: Nathan Lynch
Makes sense.
Reviewed-by: Andrew Donnellan
> ---
> arch/powerpc/kernel/rtas.c | 7 ++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kernel/r
VICE) {
This is now impossible, and the whole block makes little sense after
the next patch
> pr_info("%s: unknown EEH error log size\n",
> __func__);
--
Andrew DonnellanOzLabs, ADL Canberra
a...@linux.ibm.com IBM Australia Limited
not the name of
> an
> RTAS function. Convert use of printk() to pr_warn() and distinguish
> the possible error cases.
>
> Signed-off-by: Nathan Lynch
Reviewed-by: Andrew Donnellan
> ---
> arch/powerpc/kernel/rtas.c | 37 ++--
> -
> 1
s_halt() all
> currently use printk() without specifying a log level. These have
> been
> changed to use pr_emerg(), which matches the behavior of
> rtas_os_term().
>
> Signed-off-by: Nathan Lynch
Reviewed-by: Andrew Donnellan
> ---
> arch/powerpc/kernel/rtas.c | 19 +
revents harmful abuses of the rtas syscall.
>
> Let's make it unconditional.
>
> Signed-off-by: Nathan Lynch
Agreed.
Reviewed-by: Andrew Donnellan
> ---
> arch/powerpc/Kconfig | 13 -
> arch/powerpc/kernel/rtas.c | 16
> 2
es that have been rendered unnecessary. Sort the
> remainder (with linux/ before asm/) to impose some order on where
> future additions go.
>
> Signed-off-by: Nathan Lynch
Compiles for me.
Reviewed-by: Andrew Donnellan
> ---
> arch/powerpc/kernel/rtas.c | 42 +++-
On Mon, 2022-11-14 at 12:42 +, Christophe Leroy wrote:
> Should this be applied by Bjorn as most recent changes to that file ?
We usually take cxl patches through powerpc, though sometimes Greg
picks them up through char-misc.
--
Andrew DonnellanOzLabs, ADL Canberra
a...@linux.ibm.
for the userspace API, and switch kernel users over
to using rtas_function_index directly?
> +enum rtas_function_flags {
> + RTAS_FN_FLAG_BANNED_FOR_SYSCALL_ON_LE = (1 << 0),
> +};
This seems to be new, what's the justification?
--
Andrew DonnellanOzLabs, ADL Ca
tas_args struct fields.
>
> There's no apparent reason to force inlining of do_enter_rtas()
> either, and it seems to bloat the code a bit. Let the compiler
> decide.
>
> Signed-off-by: Nathan Lynch
Makes sense!
Reviewed-by: Andrew Donnellan
> ---
> arch/powerpc/ker
On Wed, 2022-11-23 at 13:32 -0600, Nick Child wrote:
> On 11/22/22 20:51, Andrew Donnellan wrote:
> > On Fri, 2022-11-18 at 09:07 -0600, Nathan Lynch wrote:
> > > +enum rtas_function_flags {
> > > + RTAS_FN_FLAG_BANNED_FOR_SYSCALL_ON_LE = (1 << 0),
> &
On Wed, 2022-11-23 at 10:10 +1100, Benjamin Gray wrote:
> No need to write inline asm for mtspr/mfspr, we have macros for this
> in reg.h
>
> Signed-off-by: Benjamin Gray
Good cleanup.
Reviewed-by: Andrew Donnellan
> ---
> tools/testing/selftests/powerpc/ds
b in
> the first place.
>
> Signed-off-by: Benjamin Gray
[+ Fred]
This seems fine to me.
Reviewed-by: Andrew Donnellan
> ---
> v10:* New in v10 to remove hash__flush_all_mm,
> hash__local_flush_all_mm
> ---
> arch/powerpc/include/asm/mmu_context.h | 6 +++---
> 1 file c
On Wed, 2022-11-09 at 15:51 +1100, Benjamin Gray wrote:
> Remove the extern keyword from function declarations. It is redundant
> and would cause inconsistent style when new functions are added
> without
> it.
>
> Signed-off-by: Benjamin Gray
Reviewed-by: Andrew Donne
> - if (consumer == PKS_FW_OWNER || consumer ==
> PKS_BOOTLOADER_OWNER) {
> - auth->passwordlength = 0;
> + if (consumer == PKS_FW_OWNER || consumer ==
> PKS_BOOTLOADER_OWNER)
> return auth;
> - }
This bit seems spurious.
>
>
@@ -17,7 +17,7 @@
> #define WORLDREADABLE 0x0800
> #define SIGNEDUPDATE 0x0100
>
> -#define PLPKS_VAR_LINUX0x01
> +#define PLPKS_VAR_LINUX 0x02
> #define PLPKS_VAR_COMMON 0x04
>
> struct plpks_var {
--
Andrew DonnellanOzLabs, ADL Canberra
a...@linux.ibm.com IBM Australia Limited
for Platform
> KeyStore")
> Signed-off-by: Nayna Jain
This does indeed match my understanding of the PAPR spec.
Reviewed-by: Andrew Donnellan
> ---
> arch/powerpc/include/asm/hvcall.h | 3 +--
> arch/powerpc/platforms/pseries/plpks.c | 2 +-
> 2 files changed, 2 insert
On Mon, 2022-11-28 at 18:08 -0600, Nathan Lynch wrote:
> Andrew Donnellan writes:
> > On Fri, 2022-11-18 at 09:07 -0600, Nathan Lynch wrote:
> > > Convert rtas_token() to use a lockless binary search on the
> > > function
> > > table. Fall back to the ol
2a ("powerpc/pseries: define driver for Platform
> KeyStore")
> Signed-off-by: Nayna Jain
The interface spec states that, for PKS-related hcalls, H_Aborted means
"error occurred processing request" rather than something that would
specifically map to EINTR, so I think E
ations on the buffer is risky. Explicitly add a
> null
> character to the end to make it safer.
>
> Signed-off-by: Benjamin Gray
Reviewed-by: Andrew Donnellan
> ---
> tools/testing/selftests/powerpc/ptrace/core-pkey.c | 4 +++-
> 1 file changed, 3 insertions(+), 1
ful
> before we develop the next patch.
Ping - it would be helpful for us to know your thoughts on this.
Andrew
--
Andrew DonnellanOzLabs, ADL Canberra
a...@linux.ibm.com IBM Australia Limited
-2-na...@linux.ibm.com/
Many thanks to Russell Currey and Ben Gray for their help on this series.
Andrew Donnellan (2):
powerpc/pseries: Fix handling of PLPKS object flushing timeout
powerpc/pseries: Fix alignment of PLPKS structures and buffers
Nayna Jain (2):
powerpc/pseries: Expose PLPKS c
urned to the user.
Handle the timeout case separately and return ETIMEDOUT if triggered.
Fixes: 2454a7af0f2a ("powerpc/pseries: define driver for Platform KeyStore")
Reported-by: Benjamin Gray
Signed-off-by: Andrew Donnellan
---
arch/powerpc/platforms/pseries/plpks.c | 11 +--
ommit message, add timeout handling]
Co-developed-by: Andrew Donnellan
Signed-off-by: Andrew Donnellan
---
arch/powerpc/include/asm/hvcall.h | 3 +-
arch/powerpc/platforms/pseries/plpks.c | 81 +++---
arch/powerpc/platforms/pseries/plpks.h | 5 ++
3 files changed, 79 inser
Co-developed-by: Andrew Donnellan
Signed-off-by: Andrew Donnellan
---
arch/powerpc/platforms/pseries/plpks.c | 118 ++---
arch/powerpc/platforms/pseries/plpks.h | 58
2 files changed, 164 insertions(+), 12 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/
not cross page boundaries
Round up the allocations of these structures/buffers to the next power of
2 to make sure this happens.
Reported-by: Benjamin Gray
Fixes: 2454a7af0f2a ("powerpc/pseries: define driver for Platform KeyStore")
Signed-off-by: Andrew Donnellan
---
arch/powerpc
e don't lose information from the conversion.
>
> Signed-off-by: Russell Currey
This is indeed useful to have.
Reviewed-by: Andrew Donnellan
Tested-by: Andrew Donnellan
> ---
> arch/powerpc/platforms/pseries/plpks.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff
On Mon, 2022-12-26 at 10:51 +0800, Dong Chuanjian wrote:
> remove unnecessary void* type casting.
>
> Signed-off-by: Dong Chuanjian
[+linuxppc-dev, which was misspelled in the original email]
Acked-by: Andrew Donnellan
>
> diff --git a/drivers/misc/ocxl/context.c
> b
t; +const struct secvar_operations *secvar_ops __ro_after_init = NULL;
I think this is implicitly NULL, but it's fine to make it explicit.
Reviewed-by: Andrew Donnellan
>
> void set_secvar_ops(const struct secvar_operations *ops)
> {
> + WARN_ON_ONCE(secvar_ops);
On Fri, 2022-12-30 at 15:20 +1100, Russell Currey wrote:
> 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
LGTM
Reviewed-by: A
igned-off-by: Russell Currey
LGTM
Reviewed-by: Andrew Donnellan
> ---
> arch/powerpc/include/asm/secvar.h | 1 +
> arch/powerpc/kernel/secvar-sysfs.c | 21 +---
> arch/powerpc/platforms/powernv/opal-secvar.c | 25
>
> 3
> friendly
> error code? If I'm reading this right, we'd be replacing any non-
> zero
> return code with -EINVAL.
Good catch, will fix.
--
Andrew DonnellanOzLabs, ADL Canberra
a...@linux.ibm.com IBM Australia Limited
ocumentation also says this value must be at least 255, if we sanity
> check that we don't have to worry about underflow.
Agreed, and it makes more sense for the value that we return to the
user to be the same as the number we actually get from the hypervisor.
I'll fix it in the next
hould
> be
> no functional change.
>
> Signed-off-by: Russell Currey
LGTM
Reviewed-by: Andrew Donnellan
> ---
> arch/powerpc/include/asm/secvar.h | 1 +
> arch/powerpc/kernel/secvar-sysfs.c | 17 +++--
> arch/powerpc/platforms/powernv/opal-s
t; they need to.
>
> This is not being used by the OPAL secvar implementation at present,
> and
> the config directory will not be created if no attributes are set.
>
> Signed-off-by: Russell Currey
Minor comments below, but regardless:
Reviewed-by: Andrew Donnellan
> ---
>
he hypervisor will give you anyway).
In a previous internal version, we printed a message when PAGE_SIZE <
plpks_get_maxobjectsize(), might be worth still doing that?
>
> Co-developed-by: Nayna Jain
> Signed-off-by: Nayna Jain
> Co-developed-by: Andrew Donnellan
> Signed-off-by:
e shortly we
need to wire plpks up with the integrity subsystem to load keys into
kernel keyrings.
>
> > diff --git a/arch/powerpc/platforms/pseries/plpks-secvar.c
> > b/arch/powerpc/platforms/pseries/plpks-secvar.c
> > new file mode 100644
> > index ..829
ll make the
> other multi-line comments similarly old-fashioned for consistency.
Sigh, I was trying to encourage you to move into the future...
--
Andrew DonnellanOzLabs, ADL Canberra
a...@linux.ibm.com IBM Australia Limited
On Fri, 2023-01-06 at 21:54 +1100, Michael Ellerman wrote:
> > +int plpks_signed_update_var(struct plpks_var var, u64 flags)
> > +{
>
> I don't see a reason why var is passed by value here? A pointer would
> be
> more typical.
Will change.
--
Andrew Donnel
both pseries and powernv support, in which
case plpks_secvar_init() will be called unconditionally even when
booting on a powernv machine.
I can confirm that as it is, booting this on powernv qemu causes a
panic.
--
Andrew DonnellanOzLabs, ADL Canberra
a...@linux.ibm.com IBM Australia Limited
into "buf". Maybe we want to avoid writing into "buf"
> directly
> in case the hcall fails or something, but the other 3 copies seem
> unnecessary.
In the general case, I don't like passing buffer pointers straight from
parameters into hcalls, since the address has to be in the linear map,
and that's a detail I'd rather hide from callers. But otherwise, yes I
think we can probably shift to having the caller allocate the buffers.
--
Andrew DonnellanOzLabs, ADL Canberra
a...@linux.ibm.com IBM Australia Limited
x27;t think we need that config option at all, or if we do it
> should
> not be user selectable and just enabled automatically by
> PSERIES_PLPKS.
I actually think we should get rid of both PSERIES_PLPKS_SECVAR and
PSERIES_PLPKS, and just use PPC_SECURE_BOOT / PPC_SECVAR_SYSFS.
--
Andrew DonnellanOzLabs, ADL Canberra
a...@linux.ibm.com IBM Australia Limited
> Change all the secvar related routines to use u64.
>
> Signed-off-by: Michael Ellerman
Reviewed-by: Andrew Donnellan
--
Andrew DonnellanOzLabs, ADL Canberra
a...@linux.ibm.com IBM Australia Limited
> Change all the secvar related routines to use u64.
>
> Signed-off-by: Michael Ellerman
We're going to include this patch in the next revision of our dynamic
key management series.
--
Andrew DonnellanOzLabs, ADL Canberra
a...@linux.ibm.com IBM Australia Limited
From: Russell Currey
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
Signed-off-by: Andrew Donnellan
---
v2: New patch (gregkh)
---
arch/powerpc
chael Ellerman
Reviewed-by: Russell Currey
Reviewed-by: Andrew Donnellan
Signed-off-by: Andrew Donnellan
---
v3: Include new patch
---
arch/powerpc/include/asm/secvar.h| 9 +++--
arch/powerpc/kernel/secvar-sysfs.c | 8
arch/powerpc/platforms/powernv
From: Russell Currey
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
Signed-off-by: Andrew Donnellan
---
arch/powerpc/kernel/secvar
later and update the docs.
Use sysfs_emit() instead of sprintf() for all sysfs strings
Change the size of the sysfs binary attributes to include the 8-byte
flags header, preventing truncation of large writes.
Andrew Donnellan (8):
powerpc/secvar: Clean up init error message
From: Russell Currey
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
Signed-off-by: Andrew Donnellan
--
Remove unnecessary prefixes from error messages in secvar_sysfs_init()
(the file defines pr_fmt, so putting "secvar:" in every message is
unnecessary). Make capitalisation and punctuation more consistent.
Signed-off-by: Andrew Donnellan
Signed-off-by: Russell Currey
---
v3: New
urned to the user.
Handle the timeout case separately and return ETIMEDOUT if triggered.
Fixes: 2454a7af0f2a ("powerpc/pseries: define driver for Platform KeyStore")
Reported-by: Benjamin Gray
Signed-off-by: Andrew Donnellan
Tested-by: Russell Currey
Reviewed-by: Russell Currey
From: Russell Currey
Move plpks.h from platforms/pseries/ to include/asm/. This is necessary
for later patches to make use of the PLPKS from code in other subsystems.
Signed-off-by: Russell Currey
Signed-off-by: Andrew Donnellan
---
v3: New patch
---
.../powerpc/{platforms/pseries
ead, let the backend put
a NULL-terminated array of variable names into secvar_ops->var_names,
which will be used if get_next() is undefined.
Signed-off-by: Andrew Donnellan
Signed-off-by: Russell Currey
---
v3: New patch (ajd/mpe)
---
arch/powerpc/include/asm/secvar.h | 4 ++
arch/powerpc/
Due to sysfs constraints, when writing to a variable, we can only handle
writes of up to PAGE_SIZE.
It's possible that the maximum object size is larger than PAGE_SIZE, in
which case, print a warning on boot so that the user is aware.
Signed-off-by: Andrew Donnellan
Signed-off-by: Ru
: Sudhakar Kuppusamy
Signed-off-by: Andrew Donnellan
---
v3: New patch
---
arch/powerpc/kernel/secvar-sysfs.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/secvar-sysfs.c
b/arch/powerpc/kernel/secvar-sysfs.c
index 68fb0b857442..2499bfd04fad 100644
Signed-off-by: Andrew Donnellan
---
v3: Change uint64_t type to u64 (mpe)
---
arch/powerpc/include/asm/secvar.h| 1 +
arch/powerpc/kernel/secvar-sysfs.c | 17 +++--
arch/powerpc/platforms/powernv/opal-secvar.c | 19 +++
3 files changed, 23
From: Russell Currey
Move the constants defined in plpks.c to plpks.h, and standardise their
naming, so that PLPKS consumers can make use of them later on.
Signed-off-by: Russell Currey
Co-developed-by: Andrew Donnellan
Signed-off-by: Andrew Donnellan
---
v3: New patch
---
arch/powerpc
ff-by: Russell Currey
Signed-off-by: Andrew Donnellan
---
arch/powerpc/platforms/pseries/plpks.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/platforms/pseries/plpks.c
b/arch/powerpc/platforms/pseries/plpks.c
index 796ed5544ee5..96a026a37285 100644
--- a/arch/powerpc/plat
e keyrings.
However, we can't get of the separate option completely, because it will
also be used for SED Opal purposes.
Change PSERIES_PLPKS into a hidden option, which is selected by
PPC_SECURE_BOOT.
Signed-off-by: Andrew Donnellan
Signed-off-by: Russell Currey
---
v3: New patch
--
not cross page boundaries
Round up the allocations of these structures/buffers to the next power of
2 to make sure this happens.
Reported-by: Benjamin Gray
Fixes: 2454a7af0f2a ("powerpc/pseries: define driver for Platform KeyStore")
Signed-off-by: Andrew Donnellan
Reviewed-by: Russ
data to NULL and var->datalen will be populated. Update header file
to document this.
Suggested-by: Michael Ellerman
Signed-off-by: Andrew Donnellan
Signed-off-by: Russell Currey
---
v3: New patch (mpe)
---
arch/powerpc/include/asm/plpks.h | 12
arch/powerpc/platforms/p
lit patch, extend to support additional v3 API fields, minor fixes]
Co-developed-by: Andrew Donnellan
Signed-off-by: Andrew Donnellan
Signed-off-by: Russell Currey
---
v3: Merge plpks fixes and signed update series with secvar series
Refresh config values in plpks_get_usedspace() (ajd)
format is expected to be the same, so there shouldn't be any
functional differences between objects retrieved from powernv and
pseries.
Signed-off-by: Russell Currey
Signed-off-by: Andrew Donnellan
---
v3: New patch
---
.../integrity/platform_certs/load_powerpc.c | 17 ++
From: Russell Currey
Add helper functions to get the PLPKS password. This will be used in a
later patch to support passing the password between kernels over kexec.
Signed-off-by: Russell Currey
Signed-off-by: Andrew Donnellan
---
v3: New patch
---
arch/powerpc/include/asm/plpks.h
ue to the underlying implementation of sysfs binary
attributes, as is the case for the OPAL secvar implementation -
partial writes are unsupported and writes cannot be larger than PAGE_SIZE.
Co-developed-by: Nayna Jain
Signed-off-by: Nayna Jain
Co-developed-by: Andrew Donnellan
Signed-off-by: A
dling and misc cleanups]
Co-developed-by: Andrew Donnellan
Signed-off-by: Andrew Donnellan
Signed-off-by: Russell Currey
---
v3: Merge plpks fixes and signed update series with secvar series
Fix error code handling in plpks_confirm_object_flushed() (ruscur)
Pass plpks_var stru
From: Russell Currey
A few improvements to load_powerpc.c:
- include integrity.h for the pr_fmt()
- move all error reporting out of get_cert_list()
- use ERR_PTR() to better preserve error detail
- don't use pr_err() for missing keys
Signed-off-by: Russell Currey
Signed-off-by: A
implementation at present, and
the config directory will not be created if no attributes are set.
Signed-off-by: Russell Currey
Co-developed-by: Andrew Donnellan
Signed-off-by: Andrew Donnellan
---
v3: Remove unnecessary "secvar:" prefix from error messages (ajd)
Merge config attri
-off-by: Andrew Donnellan
---
v3: New patch
---
arch/powerpc/kexec/file_load_64.c | 17 -
arch/powerpc/platforms/pseries/plpks.c | 18 +-
2 files changed, 33 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kexec/file_load_64.c
b/arch/powerpc/kexec
On Wed, 2023-01-18 at 17:10 +1100, Andrew Donnellan wrote:
>
> struct umem_info {
> u64 *buf; /* data buffer for usable-memory
> property */
> @@ -1155,7 +1156,7 @@ int setup_new_fdt_ppc64(const struct kimage
> *image, void *fdt,
>
to separate the registers into different rows and add
headings.
Fixes: 209b44c804c ("docs: powerpc: syscall64-abi.rst: fix a malformed table")
Signed-off-by: Andrew Donnellan
---
Documentation/powerpc/syscall64-abi.rst | 51 -
1 file changed, 32 insertions(+), 19 d
501 - 600 of 1086 matches
Mail list logo