<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/arch/powerpc/platforms/pseries/plpks.c, branch linux-6.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2022-11-24T12:31:50Z</updated>
<entry>
<title>powerpc/pseries: fix plpks_read_var() code for different consumers</title>
<updated>2022-11-24T12:31:50Z</updated>
<author>
<name>Nayna Jain</name>
<email>nayna@linux.ibm.com</email>
</author>
<published>2022-11-06T20:58:39Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1f622f3f80cbf8999ff5955a2fcfbd801a1f32e0'/>
<id>urn:sha1:1f622f3f80cbf8999ff5955a2fcfbd801a1f32e0</id>
<content type='text'>
Even though plpks_read_var() is currently called to read variables
owned by different consumers, it internally supports only OS consumer.

Fix plpks_read_var() to handle different consumers correctly.

Fixes: 2454a7af0f2a ("powerpc/pseries: define driver for Platform KeyStore")
Signed-off-by: Nayna Jain &lt;nayna@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20221106205839.600442-7-nayna@linux.ibm.com

</content>
</entry>
<entry>
<title>powerpc/pseries: replace kmalloc with kzalloc in PLPKS driver</title>
<updated>2022-11-24T12:31:50Z</updated>
<author>
<name>Nayna Jain</name>
<email>nayna@linux.ibm.com</email>
</author>
<published>2022-11-06T20:58:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=212dd5cfbee7815f3c665a51c501701edb881599'/>
<id>urn:sha1:212dd5cfbee7815f3c665a51c501701edb881599</id>
<content type='text'>
Replace kmalloc with kzalloc in construct_auth() function to default
initialize structure with zeroes.

Signed-off-by: Nayna Jain &lt;nayna@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20221106205839.600442-6-nayna@linux.ibm.com

</content>
</entry>
<entry>
<title>powerpc/pseries: cleanup error logs in plpks driver</title>
<updated>2022-11-24T12:31:50Z</updated>
<author>
<name>Nayna Jain</name>
<email>nayna@linux.ibm.com</email>
</author>
<published>2022-11-06T20:58:37Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8888ea772972323362660e9a1339175294664a6c'/>
<id>urn:sha1:8888ea772972323362660e9a1339175294664a6c</id>
<content type='text'>
Logging H_CALL return codes in PLPKS driver are easy to confuse with
Linux error codes.

Let the caller of the function log the converted linux error code.

Signed-off-by: Nayna Jain &lt;nayna@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20221106205839.600442-5-nayna@linux.ibm.com

</content>
</entry>
<entry>
<title>powerpc/pseries: Return -EIO instead of -EINTR for H_ABORTED error</title>
<updated>2022-11-24T12:31:50Z</updated>
<author>
<name>Nayna Jain</name>
<email>nayna@linux.ibm.com</email>
</author>
<published>2022-11-06T20:58:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bb8e4c7cb759b90a04f2e94056b50288ff46a0ed'/>
<id>urn:sha1:bb8e4c7cb759b90a04f2e94056b50288ff46a0ed</id>
<content type='text'>
Some commands for eg. "cat" might continue to retry on encountering
EINTR. This is not expected for original error code H_ABORTED.

Map H_ABORTED to more relevant Linux error code EIO.

Fixes: 2454a7af0f2a ("powerpc/pseries: define driver for Platform KeyStore")
Signed-off-by: Nayna Jain &lt;nayna@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20221106205839.600442-4-nayna@linux.ibm.com

</content>
</entry>
<entry>
<title>powerpc/pseries: Fix the H_CALL error code in PLPKS driver</title>
<updated>2022-11-24T12:31:50Z</updated>
<author>
<name>Nayna Jain</name>
<email>nayna@linux.ibm.com</email>
</author>
<published>2022-11-06T20:58:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=af223e1728c448073d1e12fe464bf344310edeba'/>
<id>urn:sha1:af223e1728c448073d1e12fe464bf344310edeba</id>
<content type='text'>
PAPR Spec defines H_P1 actually as H_PARAMETER and maps H_ABORTED to
a different numerical value.

Fix the error codes as per PAPR Specification.

Fixes: 2454a7af0f2a ("powerpc/pseries: define driver for Platform KeyStore")
Signed-off-by: Nayna Jain &lt;nayna@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20221106205839.600442-3-nayna@linux.ibm.com

</content>
</entry>
<entry>
<title>powerpc/pseries: Fix plpks crash on non-pseries</title>
<updated>2022-09-08T00:45:57Z</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2022-09-06T23:37:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a66de5283e16602b74658289360505ceeb308c90'/>
<id>urn:sha1:a66de5283e16602b74658289360505ceeb308c90</id>
<content type='text'>
As reported[1] by Nathan, the recently added plpks driver will crash if
it's built into the kernel and booted on a non-pseries machine, eg
powernv:

  kernel BUG at arch/powerpc/kernel/syscall.c:39!
  Oops: Exception in kernel mode, sig: 5 [#1]
  LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA PowerNV
  ...
  NIP system_call_exception+0x90/0x3d0
  LR  system_call_common+0xec/0x250
  Call Trace:
    0xc0000000035c3e10 (unreliable)
    system_call_common+0xec/0x250
  --- interrupt: c00 at plpar_hcall+0x38/0x60
  NIP:  c0000000000e4300 LR: c00000000202945c CTR: 0000000000000000
  REGS: c0000000035c3e80 TRAP: 0c00   Not tainted  (6.0.0-rc4)
  MSR:  9000000002009033 &lt;SF,HV,VEC,EE,ME,IR,DR,RI,LE&gt;  CR: 28000284  XER: 00000000
  ...
  NIP plpar_hcall+0x38/0x60
  LR  pseries_plpks_init+0x64/0x23c
  --- interrupt: c00

On powernv Linux is the hypervisor, so a hypercall just ends up going to
the syscall path, which BUGs if the syscall (hypercall) didn't come from
userspace.

The fix is simply to not probe the plpks driver on non-pseries machines.

[1] https://lore.kernel.org/linuxppc-dev/Yxe06fbq18Wv9y3W@dev-arch.thelio-3990X/

Fixes: 2454a7af0f2a ("powerpc/pseries: define driver for Platform KeyStore")
Reported-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Tested-by: Dan Horák &lt;dan@danny.cz&gt;
Reviewed-by: Dan Horák &lt;dan@danny.cz&gt;
Tested-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Link: https://lore.kernel.org/r/20220907065038.1604504-1-mpe@ellerman.id.au
</content>
</entry>
<entry>
<title>powerpc/pseries: define driver for Platform KeyStore</title>
<updated>2022-07-28T06:22:13Z</updated>
<author>
<name>Nayna Jain</name>
<email>nayna@linux.ibm.com</email>
</author>
<published>2022-07-23T11:30:46Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2454a7af0f2a42918aa972147a0bec38e6656cd8'/>
<id>urn:sha1:2454a7af0f2a42918aa972147a0bec38e6656cd8</id>
<content type='text'>
PowerVM provides an isolated Platform Keystore(PKS) storage allocation
for each LPAR with individually managed access controls to store
sensitive information securely. It provides a new set of hypervisor
calls for Linux kernel to access PKS storage.

Define POWER LPAR Platform KeyStore(PLPKS) driver using H_CALL interface
to access PKS storage.

Signed-off-by: Nayna Jain &lt;nayna@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220723113048.521744-2-nayna@linux.ibm.com

</content>
</entry>
</feed>
