2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00

powerpc updates for 6.17

- CONFIG_HZ changes to move the base_slice from 10ms to 1ms
 
  - Patchset to move some of the mutex handling to lock guard
 
  - Expose secvars relevant to the key management mode
 
  - Misc cleanups and fixes
 
 Thanks to: Ankit Chauhan, Christophe Leroy, Donet Tom, Gautam Menghani, Haren
 Myneni, Johan Korsnes, Madadi Vineeth Reddy, Paul Mackerras, Shrikanth Hegde,
 Srish Srinivasan, Thomas Fourier, Thomas Huth, Thomas Weißschuh, Souradeep,
 Amit Machhiwal, R Nageswara Sastry, Venkat Rao Bagalkote, Andrew Donnellan,
 Greg Kroah-Hartman, Mimi Zohar, Mukesh Kumar Chaurasiya, Nayna Jain, Ritesh
 Harjani (IBM), Sourabh Jain, Srikar Dronamraju, Stefan Berger, Tyrel Datwyler,
 Kowshik Jois
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEqX2DNAOgU8sBX3pRpnEsdPSHZJQFAmiIMYgACgkQpnEsdPSH
 ZJRwBhAAibjlhQrzxxGsk4AcLHDIlEqI/KRRIiYjM5gr1p9Ms+o3l8epgcwy4aQO
 ZcYhYIyyj4Q6ctR29fPdjb0simjOdoQm1gf5atXv7o6kaY/ooIrc4V8YWTXsxwC8
 KriPJZnrcvae7muYwzP9oVB6S4rets4Ch66FpXgR/pplxa4LwLmefgmnIB4zWXUi
 7u96ZxJ+F/kNGn0X/OtsHpgr9Hmuly6NDk3LH7Smcw0TiL/gTOTZknqm3bNuqw+I
 IJszbYbnaYslnZfNluJW4aluAv7VuUoYc5JVPn94Msw5rrio5UPcRHF5lBdqyKyE
 j++y9uuCi6oFfWw48B3o+7iUzeD6LZUqfWDb85nIc95mCKP0kX66WjuHHQlSmR/h
 WIA0nu9r+FpYOauu2i5fs1A90DnTC+7wdBCFQNYDnCbxxyPuJxBph2YN3ir4heDH
 VAxRfNw8g51HL5Sc3I8J7gP9+pubuJyS4wKCebghKSU4Uhdw7cWPC3dWACDi4b6t
 JWTV5+SrANyCy4B2bRj7p2g36xFFdFRXsoNV1RJtboWkcFRihLFDH9vN7mdB6kYi
 IMm5TQnEUw3UgwddCg2DuSXVg0fMe9R3Ph5VZcAooqYaMzLUWi0lt02Q0QVb4iES
 adAwIPn2mb/v9EeisL7nJmtYI2UZhfwanu19zrI0lrlH/G8jaKM=
 =i2VP
 -----END PGP SIGNATURE-----

Merge tag 'powerpc-6.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc updates from Madhavan Srinivasan:

 - CONFIG_HZ changes to move the base_slice from 10ms to 1ms

 - Patchset to move some of the mutex handling to lock guard

 - Expose secvars relevant to the key management mode

 - Misc cleanups and fixes

Thanks to Ankit Chauhan, Christophe Leroy, Donet Tom, Gautam Menghani,
Haren Myneni, Johan Korsnes, Madadi Vineeth Reddy, Paul Mackerras,
Shrikanth Hegde, Srish Srinivasan, Thomas Fourier, Thomas Huth, Thomas
Weißschuh, Souradeep, Amit Machhiwal, R Nageswara Sastry, Venkat Rao
Bagalkote, Andrew Donnellan, Greg Kroah-Hartman, Mimi Zohar, Mukesh
Kumar Chaurasiya, Nayna Jain, Ritesh Harjani (IBM), Sourabh Jain, Srikar
Dronamraju, Stefan Berger, Tyrel Datwyler, and Kowshik Jois.

* tag 'powerpc-6.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (23 commits)
  arch/powerpc: Remove .interp section in vmlinux
  powerpc: Drop GPL boilerplate text with obsolete FSF address
  powerpc: Don't use %pK through printk
  arch: powerpc: defconfig: Drop obsolete CONFIG_NET_CLS_TCINDEX
  misc: ocxl: Replace scnprintf() with sysfs_emit() in sysfs show functions
  integrity/platform_certs: Allow loading of keys in the static key management mode
  powerpc/secvar: Expose secvars relevant to the key management mode
  powerpc/pseries: Correct secvar format representation for static key management
  (powerpc/512) Fix possible `dma_unmap_single()` on uninitialized pointer
  powerpc: floppy: Add missing checks after DMA map
  book3s64/radix : Optimize vmemmap start alignment
  book3s64/radix : Handle error conditions properly in radix_vmemmap_populate
  powerpc/pseries/dlpar: Search DRC index from ibm,drc-indexes for IO add
  KVM: PPC: Book3S HV: Add H_VIRT mapping for tracing exits
  powerpc: sysdev: use lock guard for mutex
  powerpc: powernv: ocxl: use lock guard for mutex
  powerpc: book3s: vas: use lock guard for mutex
  powerpc: fadump: use lock guard for mutex
  powerpc: rtas: use lock guard for mutex
  powerpc: eeh: use lock guard for mutex
  ...
This commit is contained in:
Linus Torvalds 2025-07-29 20:28:38 -07:00
commit 5f5c9952b3
25 changed files with 225 additions and 224 deletions

View File

@ -22,9 +22,13 @@ Description: A string indicating which backend is in use by the firmware.
and is expected to be "ibm,edk2-compat-v1". and is expected to be "ibm,edk2-compat-v1".
On pseries/PLPKS, this is generated by the kernel based on the On pseries/PLPKS, this is generated by the kernel based on the
version number in the SB_VERSION variable in the keystore, and version number in the SB_VERSION variable in the keystore. The
has the form "ibm,plpks-sb-v<version>", or version numbering in the SB_VERSION variable starts from 1. The
"ibm,plpks-sb-unknown" if there is no SB_VERSION variable. format string takes the form "ibm,plpks-sb-v<version>" in the
case of dynamic key management mode. If the SB_VERSION variable
does not exist (or there is an error while reading it), it takes
the form "ibm,plpks-sb-v0", indicating that the key management
mode is static.
What: /sys/firmware/secvar/vars/<variable name> What: /sys/firmware/secvar/vars/<variable name>
Date: August 2019 Date: August 2019
@ -34,6 +38,13 @@ Description: Each secure variable is represented as a directory named as
representation. The data and size can be determined by reading representation. The data and size can be determined by reading
their respective attribute files. their respective attribute files.
Only secvars relevant to the key management mode are exposed.
Only in the dynamic key management mode should the user have
access (read and write) to the secure boot secvars db, dbx,
grubdb, grubdbx, and sbat. These secvars are not consumed in the
static key management mode. PK, trustedcadb and moduledb are the
secvars common to both static and dynamic key management modes.
What: /sys/firmware/secvar/vars/<variable_name>/size What: /sys/firmware/secvar/vars/<variable_name>/size
Date: August 2019 Date: August 2019
Contact: Nayna Jain <nayna@linux.ibm.com> Contact: Nayna Jain <nayna@linux.ibm.com>

View File

@ -101,7 +101,7 @@ KBUILD_LDFLAGS += -m elf$(BITS)$(LDEMULATION)
endif endif
LDFLAGS_vmlinux-y := -Bstatic LDFLAGS_vmlinux-y := -Bstatic
LDFLAGS_vmlinux-$(CONFIG_RELOCATABLE) := -pie LDFLAGS_vmlinux-$(CONFIG_RELOCATABLE) := -pie --no-dynamic-linker
LDFLAGS_vmlinux-$(CONFIG_RELOCATABLE) += -z notext LDFLAGS_vmlinux-$(CONFIG_RELOCATABLE) += -z notext
LDFLAGS_vmlinux := $(LDFLAGS_vmlinux-y) LDFLAGS_vmlinux := $(LDFLAGS_vmlinux-y)

View File

@ -37,7 +37,7 @@
ibm,powerpc-cpu-features { ibm,powerpc-cpu-features {
display-name = "Microwatt"; display-name = "Microwatt";
isa = <3010>; isa = <3100>;
device_type = "cpu-features"; device_type = "cpu-features";
compatible = "ibm,powerpc-cpu-features"; compatible = "ibm,powerpc-cpu-features";

View File

@ -46,7 +46,7 @@ CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE=y
CONFIG_HZ_100=y CONFIG_HZ_1000=y
CONFIG_BINFMT_MISC=m CONFIG_BINFMT_MISC=m
CONFIG_PPC_TRANSACTIONAL_MEM=y CONFIG_PPC_TRANSACTIONAL_MEM=y
CONFIG_PPC_UV=y CONFIG_PPC_UV=y
@ -340,3 +340,4 @@ CONFIG_KVM_BOOK3S_64_HV=m
CONFIG_VHOST_NET=m CONFIG_VHOST_NET=m
CONFIG_PRINTK_TIME=y CONFIG_PRINTK_TIME=y
CONFIG_PRINTK_CALLER=y CONFIG_PRINTK_CALLER=y
CONFIG_KALLSYMS_ALL=y

View File

@ -57,7 +57,7 @@ CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_CPU_FREQ_PMAC64=y CONFIG_CPU_FREQ_PMAC64=y
CONFIG_HZ_100=y CONFIG_HZ_1000=y
CONFIG_PPC_TRANSACTIONAL_MEM=y CONFIG_PPC_TRANSACTIONAL_MEM=y
CONFIG_KEXEC=y CONFIG_KEXEC=y
CONFIG_KEXEC_FILE=y CONFIG_KEXEC_FILE=y
@ -465,3 +465,4 @@ CONFIG_TEST_MEMCAT_P=m
CONFIG_TEST_MEMINIT=m CONFIG_TEST_MEMINIT=m
CONFIG_TEST_FREE_PAGES=m CONFIG_TEST_FREE_PAGES=m
CONFIG_MEMTEST=y CONFIG_MEMTEST=y
CONFIG_KALLSYMS_ALL=y

View File

@ -252,7 +252,6 @@ CONFIG_NET_SCH_DSMARK=m
CONFIG_NET_SCH_NETEM=m CONFIG_NET_SCH_NETEM=m
CONFIG_NET_SCH_INGRESS=m CONFIG_NET_SCH_INGRESS=m
CONFIG_NET_CLS_BASIC=m CONFIG_NET_CLS_BASIC=m
CONFIG_NET_CLS_TCINDEX=m
CONFIG_NET_CLS_ROUTE4=m CONFIG_NET_CLS_ROUTE4=m
CONFIG_NET_CLS_FW=m CONFIG_NET_CLS_FW=m
CONFIG_NET_CLS_U32=m CONFIG_NET_CLS_U32=m

View File

@ -144,9 +144,12 @@ static int hard_dma_setup(char *addr, unsigned long size, int mode, int io)
bus_addr = 0; bus_addr = 0;
} }
if (!bus_addr) /* need to map it */ if (!bus_addr) { /* need to map it */
bus_addr = dma_map_single(&isa_bridge_pcidev->dev, addr, size, bus_addr = dma_map_single(&isa_bridge_pcidev->dev, addr, size,
dir); dir);
if (dma_mapping_error(&isa_bridge_pcidev->dev, bus_addr))
return -ENOMEM;
}
/* remember this one as prev */ /* remember this one as prev */
prev_addr = addr; prev_addr = addr;

View File

@ -1,18 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/* /*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2, as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Copyright IBM Corp. 2015 * Copyright IBM Corp. 2015
* *
* Authors: Gavin Shan <gwshan@linux.vnet.ibm.com> * Authors: Gavin Shan <gwshan@linux.vnet.ibm.com>

View File

@ -1,18 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/* /*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2, as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Copyright IBM Corp. 2007 * Copyright IBM Corp. 2007
* *
* Authors: Hollis Blanchard <hollisb@us.ibm.com> * Authors: Hollis Blanchard <hollisb@us.ibm.com>

View File

@ -1,18 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/* /*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2, as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Copyright IBM Corp. 2008 * Copyright IBM Corp. 2008
* *
* Authors: Hollis Blanchard <hollisb@us.ibm.com> * Authors: Hollis Blanchard <hollisb@us.ibm.com>

View File

@ -2,19 +2,6 @@
/* /*
* Copyright (C) 2006 Sony Computer Entertainment Inc. * Copyright (C) 2006 Sony Computer Entertainment Inc.
* Copyright 2006, 2007 Sony Corporation * Copyright 2006, 2007 Sony Corporation
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published
* by the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#ifndef _ASM_POWERPC_PS3FB_H_ #ifndef _ASM_POWERPC_PS3FB_H_

View File

@ -1208,16 +1208,16 @@ int eeh_dev_open(struct pci_dev *pdev)
struct eeh_dev *edev; struct eeh_dev *edev;
int ret = -ENODEV; int ret = -ENODEV;
mutex_lock(&eeh_dev_mutex); guard(mutex)(&eeh_dev_mutex);
/* No PCI device ? */ /* No PCI device ? */
if (!pdev) if (!pdev)
goto out; return ret;
/* No EEH device or PE ? */ /* No EEH device or PE ? */
edev = pci_dev_to_eeh_dev(pdev); edev = pci_dev_to_eeh_dev(pdev);
if (!edev || !edev->pe) if (!edev || !edev->pe)
goto out; return ret;
/* /*
* The PE might have been put into frozen state, but we * The PE might have been put into frozen state, but we
@ -1227,16 +1227,12 @@ int eeh_dev_open(struct pci_dev *pdev)
*/ */
ret = eeh_pe_change_owner(edev->pe); ret = eeh_pe_change_owner(edev->pe);
if (ret) if (ret)
goto out; return ret;
/* Increase PE's pass through count */ /* Increase PE's pass through count */
atomic_inc(&edev->pe->pass_dev_cnt); atomic_inc(&edev->pe->pass_dev_cnt);
mutex_unlock(&eeh_dev_mutex);
return 0; return 0;
out:
mutex_unlock(&eeh_dev_mutex);
return ret;
} }
EXPORT_SYMBOL_GPL(eeh_dev_open); EXPORT_SYMBOL_GPL(eeh_dev_open);
@ -1252,22 +1248,20 @@ void eeh_dev_release(struct pci_dev *pdev)
{ {
struct eeh_dev *edev; struct eeh_dev *edev;
mutex_lock(&eeh_dev_mutex); guard(mutex)(&eeh_dev_mutex);
/* No PCI device ? */ /* No PCI device ? */
if (!pdev) if (!pdev)
goto out; return;
/* No EEH device ? */ /* No EEH device ? */
edev = pci_dev_to_eeh_dev(pdev); edev = pci_dev_to_eeh_dev(pdev);
if (!edev || !edev->pe || !eeh_pe_passed(edev->pe)) if (!edev || !edev->pe || !eeh_pe_passed(edev->pe))
goto out; return;
/* Decrease PE's pass through count */ /* Decrease PE's pass through count */
WARN_ON(atomic_dec_if_positive(&edev->pe->pass_dev_cnt) < 0); WARN_ON(atomic_dec_if_positive(&edev->pe->pass_dev_cnt) < 0);
eeh_pe_change_owner(edev->pe); eeh_pe_change_owner(edev->pe);
out:
mutex_unlock(&eeh_dev_mutex);
} }
EXPORT_SYMBOL(eeh_dev_release); EXPORT_SYMBOL(eeh_dev_release);

View File

@ -907,7 +907,7 @@ void eeh_handle_normal_event(struct eeh_pe *pe)
/* FIXME: Use the same format as dump_stack() */ /* FIXME: Use the same format as dump_stack() */
pr_err("EEH: Call Trace:\n"); pr_err("EEH: Call Trace:\n");
for (i = 0; i < pe->trace_entries; i++) for (i = 0; i < pe->trace_entries; i++)
pr_err("EEH: [%pK] %pS\n", ptrs[i], ptrs[i]); pr_err("EEH: [%p] %pS\n", ptrs[i], ptrs[i]);
pe->trace_entries = 0; pe->trace_entries = 0;
} }

View File

@ -1373,15 +1373,12 @@ static void fadump_free_elfcorehdr_buf(void)
static void fadump_invalidate_release_mem(void) static void fadump_invalidate_release_mem(void)
{ {
mutex_lock(&fadump_mutex); scoped_guard(mutex, &fadump_mutex) {
if (!fw_dump.dump_active) { if (!fw_dump.dump_active)
mutex_unlock(&fadump_mutex); return;
return; fadump_cleanup();
} }
fadump_cleanup();
mutex_unlock(&fadump_mutex);
fadump_free_elfcorehdr_buf(); fadump_free_elfcorehdr_buf();
fadump_release_memory(fw_dump.boot_mem_top, memblock_end_of_DRAM()); fadump_release_memory(fw_dump.boot_mem_top, memblock_end_of_DRAM());
fadump_free_cpu_notes_buf(); fadump_free_cpu_notes_buf();

View File

@ -312,13 +312,13 @@ static ssize_t rtas_flash_write(struct file *file, const char __user *buffer,
{ {
struct rtas_update_flash_t *const uf = &rtas_update_flash_data; struct rtas_update_flash_t *const uf = &rtas_update_flash_data;
char *p; char *p;
int next_free, rc; int next_free;
struct flash_block_list *fl; struct flash_block_list *fl;
mutex_lock(&rtas_update_flash_mutex); guard(mutex)(&rtas_update_flash_mutex);
if (uf->status == FLASH_AUTH || count == 0) if (uf->status == FLASH_AUTH || count == 0)
goto out; /* discard data */ return count; /* discard data */
/* In the case that the image is not ready for flashing, the memory /* In the case that the image is not ready for flashing, the memory
* allocated for the block list will be freed upon the release of the * allocated for the block list will be freed upon the release of the
@ -327,7 +327,7 @@ static ssize_t rtas_flash_write(struct file *file, const char __user *buffer,
if (uf->flist == NULL) { if (uf->flist == NULL) {
uf->flist = kmem_cache_zalloc(flash_block_cache, GFP_KERNEL); uf->flist = kmem_cache_zalloc(flash_block_cache, GFP_KERNEL);
if (!uf->flist) if (!uf->flist)
goto nomem; return -ENOMEM;
} }
fl = uf->flist; fl = uf->flist;
@ -338,7 +338,7 @@ static ssize_t rtas_flash_write(struct file *file, const char __user *buffer,
/* Need to allocate another block_list */ /* Need to allocate another block_list */
fl->next = kmem_cache_zalloc(flash_block_cache, GFP_KERNEL); fl->next = kmem_cache_zalloc(flash_block_cache, GFP_KERNEL);
if (!fl->next) if (!fl->next)
goto nomem; return -ENOMEM;
fl = fl->next; fl = fl->next;
next_free = 0; next_free = 0;
} }
@ -347,25 +347,17 @@ static ssize_t rtas_flash_write(struct file *file, const char __user *buffer,
count = RTAS_BLK_SIZE; count = RTAS_BLK_SIZE;
p = kmem_cache_zalloc(flash_block_cache, GFP_KERNEL); p = kmem_cache_zalloc(flash_block_cache, GFP_KERNEL);
if (!p) if (!p)
goto nomem; return -ENOMEM;
if(copy_from_user(p, buffer, count)) { if(copy_from_user(p, buffer, count)) {
kmem_cache_free(flash_block_cache, p); kmem_cache_free(flash_block_cache, p);
rc = -EFAULT; return -EFAULT;
goto error;
} }
fl->blocks[next_free].data = p; fl->blocks[next_free].data = p;
fl->blocks[next_free].length = count; fl->blocks[next_free].length = count;
fl->num_blocks++; fl->num_blocks++;
out:
mutex_unlock(&rtas_update_flash_mutex);
return count;
nomem: return count;
rc = -ENOMEM;
error:
mutex_unlock(&rtas_update_flash_mutex);
return rc;
} }
/* /*
@ -405,19 +397,18 @@ static ssize_t manage_flash_write(struct file *file, const char __user *buf,
static const char reject_str[] = "0"; static const char reject_str[] = "0";
static const char commit_str[] = "1"; static const char commit_str[] = "1";
char stkbuf[10]; char stkbuf[10];
int op, rc; int op;
mutex_lock(&rtas_manage_flash_mutex); guard(mutex)(&rtas_manage_flash_mutex);
if ((args_buf->status == MANAGE_AUTH) || (count == 0)) if ((args_buf->status == MANAGE_AUTH) || (count == 0))
goto out; return count;
op = -1; op = -1;
if (buf) { if (buf) {
if (count > 9) count = 9; if (count > 9) count = 9;
rc = -EFAULT;
if (copy_from_user (stkbuf, buf, count)) if (copy_from_user (stkbuf, buf, count))
goto error; return -EFAULT;
if (strncmp(stkbuf, reject_str, strlen(reject_str)) == 0) if (strncmp(stkbuf, reject_str, strlen(reject_str)) == 0)
op = RTAS_REJECT_TMP_IMG; op = RTAS_REJECT_TMP_IMG;
else if (strncmp(stkbuf, commit_str, strlen(commit_str)) == 0) else if (strncmp(stkbuf, commit_str, strlen(commit_str)) == 0)
@ -425,18 +416,11 @@ static ssize_t manage_flash_write(struct file *file, const char __user *buf,
} }
if (op == -1) { /* buf is empty, or contains invalid string */ if (op == -1) { /* buf is empty, or contains invalid string */
rc = -EINVAL; return -EINVAL;
goto error;
} }
manage_flash(args_buf, op); manage_flash(args_buf, op);
out:
mutex_unlock(&rtas_manage_flash_mutex);
return count; return count;
error:
mutex_unlock(&rtas_manage_flash_mutex);
return rc;
} }
/* /*
@ -499,16 +483,14 @@ static ssize_t validate_flash_write(struct file *file, const char __user *buf,
{ {
struct rtas_validate_flash_t *const args_buf = struct rtas_validate_flash_t *const args_buf =
&rtas_validate_flash_data; &rtas_validate_flash_data;
int rc;
mutex_lock(&rtas_validate_flash_mutex); guard(mutex)(&rtas_validate_flash_mutex);
/* We are only interested in the first 4K of the /* We are only interested in the first 4K of the
* candidate image */ * candidate image */
if ((*off >= VALIDATE_BUF_SIZE) || if ((*off >= VALIDATE_BUF_SIZE) ||
(args_buf->status == VALIDATE_AUTH)) { (args_buf->status == VALIDATE_AUTH)) {
*off += count; *off += count;
mutex_unlock(&rtas_validate_flash_mutex);
return count; return count;
} }
@ -519,20 +501,14 @@ static ssize_t validate_flash_write(struct file *file, const char __user *buf,
args_buf->status = VALIDATE_INCOMPLETE; args_buf->status = VALIDATE_INCOMPLETE;
} }
if (!access_ok(buf, count)) { if (!access_ok(buf, count))
rc = -EFAULT; return -EFAULT;
goto done;
} if (copy_from_user(args_buf->buf + *off, buf, count))
if (copy_from_user(args_buf->buf + *off, buf, count)) { return -EFAULT;
rc = -EFAULT;
goto done;
}
*off += count; *off += count;
rc = count; return count;
done:
mutex_unlock(&rtas_validate_flash_mutex);
return rc;
} }
static int validate_flash_release(struct inode *inode, struct file *file) static int validate_flash_release(struct inode *inode, struct file *file)

View File

@ -25,6 +25,7 @@
{0xe00, "H_DATA_STORAGE"}, \ {0xe00, "H_DATA_STORAGE"}, \
{0xe20, "H_INST_STORAGE"}, \ {0xe20, "H_INST_STORAGE"}, \
{0xe40, "H_EMUL_ASSIST"}, \ {0xe40, "H_EMUL_ASSIST"}, \
{0xea0, "H_VIRT"}, \
{0xf00, "PERFMON"}, \ {0xf00, "PERFMON"}, \
{0xf20, "ALTIVEC"}, \ {0xf20, "ALTIVEC"}, \
{0xf40, "VSX"} {0xf40, "VSX"}

View File

@ -1122,18 +1122,25 @@ int __meminit radix__vmemmap_populate(unsigned long start, unsigned long end, in
pte_t *pte; pte_t *pte;
/* /*
* Make sure we align the start vmemmap addr so that we calculate * If altmap is present, Make sure we align the start vmemmap addr
* the correct start_pfn in altmap boundary check to decided whether * to PAGE_SIZE so that we calculate the correct start_pfn in
* we should use altmap or RAM based backing memory allocation. Also * altmap boundary check to decide whether we should use altmap or
* the address need to be aligned for set_pte operation. * RAM based backing memory allocation. Also the address need to be
* aligned for set_pte operation. If the start addr is already
* If the start addr is already PMD_SIZE aligned we will try to use * PMD_SIZE aligned and with in the altmap boundary then we will
* a pmd mapping. We don't want to be too aggressive here beacause * try to use a pmd size altmap mapping else we go for page size
* that will cause more allocations in RAM. So only if the namespace * mapping.
* vmemmap start addr is PMD_SIZE aligned we will use PMD mapping. *
* If altmap is not present, align the vmemmap addr to PMD_SIZE and
* always allocate a PMD size page for vmemmap backing.
*
*/ */
start = ALIGN_DOWN(start, PAGE_SIZE); if (altmap)
start = ALIGN_DOWN(start, PAGE_SIZE);
else
start = ALIGN_DOWN(start, PMD_SIZE);
for (addr = start; addr < end; addr = next) { for (addr = start; addr < end; addr = next) {
next = pmd_addr_end(addr, end); next = pmd_addr_end(addr, end);
@ -1159,7 +1166,7 @@ int __meminit radix__vmemmap_populate(unsigned long start, unsigned long end, in
* in altmap block allocation failures, in which case * in altmap block allocation failures, in which case
* we fallback to RAM for vmemmap allocation. * we fallback to RAM for vmemmap allocation.
*/ */
if (!IS_ALIGNED(addr, PMD_SIZE) || (altmap && if (altmap && (!IS_ALIGNED(addr, PMD_SIZE) ||
altmap_cross_boundary(altmap, addr, PMD_SIZE))) { altmap_cross_boundary(altmap, addr, PMD_SIZE))) {
/* /*
* make sure we don't create altmap mappings * make sure we don't create altmap mappings
@ -1173,7 +1180,7 @@ int __meminit radix__vmemmap_populate(unsigned long start, unsigned long end, in
vmemmap_set_pmd(pmd, p, node, addr, next); vmemmap_set_pmd(pmd, p, node, addr, next);
pr_debug("PMD_SIZE vmemmap mapping\n"); pr_debug("PMD_SIZE vmemmap mapping\n");
continue; continue;
} else if (altmap) { } else {
/* /*
* A vmemmap block allocation can fail due to * A vmemmap block allocation can fail due to
* alignment requirements and we trying to align * alignment requirements and we trying to align

View File

@ -713,12 +713,12 @@ static ssize_t catalog_event_len_validate(struct hv_24x7_event_data *event,
ev_len = be16_to_cpu(event->length); ev_len = be16_to_cpu(event->length);
if (ev_len % 16) if (ev_len % 16)
pr_info("event %zu has length %zu not divisible by 16: event=%pK\n", pr_info("event %zu has length %zu not divisible by 16: event=%p\n",
event_idx, ev_len, event); event_idx, ev_len, event);
ev_end = (__u8 *)event + ev_len; ev_end = (__u8 *)event + ev_len;
if (ev_end > end) { if (ev_end > end) {
pr_warn("event %zu has .length=%zu, ends after buffer end: ev_end=%pK > end=%pK, offset=%zu\n", pr_warn("event %zu has .length=%zu, ends after buffer end: ev_end=%p > end=%p, offset=%zu\n",
event_idx, ev_len, ev_end, end, event_idx, ev_len, ev_end, end,
offset); offset);
return -1; return -1;
@ -726,14 +726,14 @@ static ssize_t catalog_event_len_validate(struct hv_24x7_event_data *event,
calc_ev_end = event_end(event, end); calc_ev_end = event_end(event, end);
if (!calc_ev_end) { if (!calc_ev_end) {
pr_warn("event %zu has a calculated length which exceeds buffer length %zu: event=%pK end=%pK, offset=%zu\n", pr_warn("event %zu has a calculated length which exceeds buffer length %zu: event=%p end=%p, offset=%zu\n",
event_idx, event_data_bytes, event, end, event_idx, event_data_bytes, event, end,
offset); offset);
return -1; return -1;
} }
if (calc_ev_end > ev_end) { if (calc_ev_end > ev_end) {
pr_warn("event %zu exceeds its own length: event=%pK, end=%pK, offset=%zu, calc_ev_end=%pK\n", pr_warn("event %zu exceeds its own length: event=%p, end=%p, offset=%zu, calc_ev_end=%p\n",
event_idx, event, ev_end, offset, calc_ev_end); event_idx, event, ev_end, offset, calc_ev_end);
return -1; return -1;
} }

View File

@ -240,10 +240,8 @@ static int mpc512x_lpbfifo_kick(void)
dma_conf.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; dma_conf.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
/* Make DMA channel work with LPB FIFO data register */ /* Make DMA channel work with LPB FIFO data register */
if (dma_dev->device_config(lpbfifo.chan, &dma_conf)) { if (dma_dev->device_config(lpbfifo.chan, &dma_conf))
ret = -EINVAL; return -EINVAL;
goto err_dma_prep;
}
sg_init_table(&sg, 1); sg_init_table(&sg, 1);

View File

@ -425,23 +425,22 @@ static vm_fault_t vas_mmap_fault(struct vm_fault *vmf)
return VM_FAULT_SIGBUS; return VM_FAULT_SIGBUS;
} }
mutex_lock(&txwin->task_ref.mmap_mutex);
/* /*
* The window may be inactive due to lost credit (Ex: core * The window may be inactive due to lost credit (Ex: core
* removal with DLPAR). If the window is active again when * removal with DLPAR). If the window is active again when
* the credit is available, map the new paste address at the * the credit is available, map the new paste address at the
* window virtual address. * window virtual address.
*/ */
if (txwin->status == VAS_WIN_ACTIVE) { scoped_guard(mutex, &txwin->task_ref.mmap_mutex) {
paste_addr = cp_inst->coproc->vops->paste_addr(txwin); if (txwin->status == VAS_WIN_ACTIVE) {
if (paste_addr) { paste_addr = cp_inst->coproc->vops->paste_addr(txwin);
fault = vmf_insert_pfn(vma, vma->vm_start, if (paste_addr) {
(paste_addr >> PAGE_SHIFT)); fault = vmf_insert_pfn(vma, vma->vm_start,
mutex_unlock(&txwin->task_ref.mmap_mutex); (paste_addr >> PAGE_SHIFT));
return fault; return fault;
}
} }
} }
mutex_unlock(&txwin->task_ref.mmap_mutex);
/* /*
* Received this fault due to closing the actual window. * Received this fault due to closing the actual window.
@ -494,9 +493,8 @@ static void vas_mmap_close(struct vm_area_struct *vma)
return; return;
} }
mutex_lock(&txwin->task_ref.mmap_mutex); scoped_guard(mutex, &txwin->task_ref.mmap_mutex)
txwin->task_ref.vma = NULL; txwin->task_ref.vma = NULL;
mutex_unlock(&txwin->task_ref.mmap_mutex);
} }
static const struct vm_operations_struct vas_vm_ops = { static const struct vm_operations_struct vas_vm_ops = {
@ -552,18 +550,16 @@ static int coproc_mmap(struct file *fp, struct vm_area_struct *vma)
* close/open event and allows mmap() only when the window is * close/open event and allows mmap() only when the window is
* active. * active.
*/ */
mutex_lock(&txwin->task_ref.mmap_mutex); guard(mutex)(&txwin->task_ref.mmap_mutex);
if (txwin->status != VAS_WIN_ACTIVE) { if (txwin->status != VAS_WIN_ACTIVE) {
pr_err("Window is not active\n"); pr_err("Window is not active\n");
rc = -EACCES; return -EACCES;
goto out;
} }
paste_addr = cp_inst->coproc->vops->paste_addr(txwin); paste_addr = cp_inst->coproc->vops->paste_addr(txwin);
if (!paste_addr) { if (!paste_addr) {
pr_err("Window paste address failed\n"); pr_err("Window paste address failed\n");
rc = -EINVAL; return -EINVAL;
goto out;
} }
pfn = paste_addr >> PAGE_SHIFT; pfn = paste_addr >> PAGE_SHIFT;
@ -583,8 +579,6 @@ static int coproc_mmap(struct file *fp, struct vm_area_struct *vma)
txwin->task_ref.vma = vma; txwin->task_ref.vma = vma;
vma->vm_ops = &vas_vm_ops; vma->vm_ops = &vas_vm_ops;
out:
mutex_unlock(&txwin->task_ref.mmap_mutex);
return rc; return rc;
} }

View File

@ -172,12 +172,11 @@ static void pnv_ocxl_fixup_actag(struct pci_dev *dev)
if (phb->type != PNV_PHB_NPU_OCAPI) if (phb->type != PNV_PHB_NPU_OCAPI)
return; return;
mutex_lock(&links_list_lock); guard(mutex)(&links_list_lock);
link = find_link(dev); link = find_link(dev);
if (!link) { if (!link) {
dev_warn(&dev->dev, "couldn't update actag information\n"); dev_warn(&dev->dev, "couldn't update actag information\n");
mutex_unlock(&links_list_lock);
return; return;
} }
@ -206,7 +205,6 @@ static void pnv_ocxl_fixup_actag(struct pci_dev *dev)
dev_dbg(&dev->dev, "total actags for function: %d\n", dev_dbg(&dev->dev, "total actags for function: %d\n",
link->fn_desired_actags[PCI_FUNC(dev->devfn)]); link->fn_desired_actags[PCI_FUNC(dev->devfn)]);
mutex_unlock(&links_list_lock);
} }
DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pnv_ocxl_fixup_actag); DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pnv_ocxl_fixup_actag);
@ -253,12 +251,11 @@ int pnv_ocxl_get_actag(struct pci_dev *dev, u16 *base, u16 *enabled,
{ {
struct npu_link *link; struct npu_link *link;
mutex_lock(&links_list_lock); guard(mutex)(&links_list_lock);
link = find_link(dev); link = find_link(dev);
if (!link) { if (!link) {
dev_err(&dev->dev, "actag information not found\n"); dev_err(&dev->dev, "actag information not found\n");
mutex_unlock(&links_list_lock);
return -ENODEV; return -ENODEV;
} }
/* /*
@ -274,7 +271,6 @@ int pnv_ocxl_get_actag(struct pci_dev *dev, u16 *base, u16 *enabled,
*enabled = link->fn_actags[PCI_FUNC(dev->devfn)].count; *enabled = link->fn_actags[PCI_FUNC(dev->devfn)].count;
*supported = link->fn_desired_actags[PCI_FUNC(dev->devfn)]; *supported = link->fn_desired_actags[PCI_FUNC(dev->devfn)];
mutex_unlock(&links_list_lock);
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(pnv_ocxl_get_actag); EXPORT_SYMBOL_GPL(pnv_ocxl_get_actag);
@ -293,12 +289,11 @@ int pnv_ocxl_get_pasid_count(struct pci_dev *dev, int *count)
* *
* We only support one AFU-carrying function for now. * We only support one AFU-carrying function for now.
*/ */
mutex_lock(&links_list_lock); guard(mutex)(&links_list_lock);
link = find_link(dev); link = find_link(dev);
if (!link) { if (!link) {
dev_err(&dev->dev, "actag information not found\n"); dev_err(&dev->dev, "actag information not found\n");
mutex_unlock(&links_list_lock);
return -ENODEV; return -ENODEV;
} }
@ -309,7 +304,6 @@ int pnv_ocxl_get_pasid_count(struct pci_dev *dev, int *count)
break; break;
} }
mutex_unlock(&links_list_lock);
dev_dbg(&dev->dev, "%d PASIDs available for function\n", dev_dbg(&dev->dev, "%d PASIDs available for function\n",
rc ? 0 : *count); rc ? 0 : *count);
return rc; return rc;

View File

@ -404,6 +404,45 @@ get_device_node_with_drc_info(u32 index)
return NULL; return NULL;
} }
static struct device_node *
get_device_node_with_drc_indexes(u32 drc_index)
{
struct device_node *np = NULL;
u32 nr_indexes, index;
int i, rc;
for_each_node_with_property(np, "ibm,drc-indexes") {
/*
* First element in the array is the total number of
* DRC indexes returned.
*/
rc = of_property_read_u32_index(np, "ibm,drc-indexes",
0, &nr_indexes);
if (rc)
goto out_put_np;
/*
* Retrieve DRC index from the list and return the
* device node if matched with the specified index.
*/
for (i = 0; i < nr_indexes; i++) {
rc = of_property_read_u32_index(np, "ibm,drc-indexes",
i+1, &index);
if (rc)
goto out_put_np;
if (drc_index == index)
return np;
}
}
return NULL;
out_put_np:
of_node_put(np);
return NULL;
}
static int dlpar_hp_dt_add(u32 index) static int dlpar_hp_dt_add(u32 index)
{ {
struct device_node *np, *nodes; struct device_node *np, *nodes;
@ -423,10 +462,19 @@ static int dlpar_hp_dt_add(u32 index)
goto out; goto out;
} }
/*
* Recent FW provides ibm,drc-info property. So search
* for the user specified DRC index from ibm,drc-info
* property. If this property is not available, search
* in the indexes array from ibm,drc-indexes property.
*/
np = get_device_node_with_drc_info(index); np = get_device_node_with_drc_info(index);
if (!np) if (!np) {
return -EIO; np = get_device_node_with_drc_indexes(index);
if (!np)
return -EIO;
}
/* Next, configure the connector. */ /* Next, configure the connector. */
nodes = dlpar_configure_connector(cpu_to_be32(index), np); nodes = dlpar_configure_connector(cpu_to_be32(index), np);

View File

@ -59,7 +59,14 @@ static u32 get_policy(const char *name)
return PLPKS_SIGNEDUPDATE; return PLPKS_SIGNEDUPDATE;
} }
static const char * const plpks_var_names[] = { static const char * const plpks_var_names_static[] = {
"PK",
"moduledb",
"trustedcadb",
NULL,
};
static const char * const plpks_var_names_dynamic[] = {
"PK", "PK",
"KEK", "KEK",
"db", "db",
@ -152,39 +159,55 @@ err:
return rc; return rc;
} }
// PLPKS dynamic secure boot doesn't give us a format string in the same way OPAL does. /*
// Instead, report the format using the SB_VERSION variable in the keystore. * Return the key management mode.
// The string is made up by us, and takes the form "ibm,plpks-sb-v<n>" (or "ibm,plpks-sb-unknown" *
// if the SB_VERSION variable doesn't exist). Hypervisor defines the SB_VERSION variable as a * SB_VERSION is defined as a "1 byte unsigned integer value", taking values
// "1 byte unsigned integer value". * starting from 1. It is owned by the Partition Firmware and its presence
* indicates that the key management mode is dynamic. Any failure in
* reading SB_VERSION defaults the key management mode to static. The error
* codes -ENOENT or -EPERM are expected in static key management mode. An
* unexpected error code will have to be investigated. Only signed variables
* have null bytes in their names, SB_VERSION does not.
*
* Return 0 to indicate that the key management mode is static. Otherwise
* return the SB_VERSION value to indicate that the key management mode is
* dynamic.
*/
static u8 plpks_get_sb_keymgmt_mode(void)
{
u8 mode;
ssize_t rc;
struct plpks_var var = {
.component = NULL,
.name = "SB_VERSION",
.namelen = 10,
.datalen = 1,
.data = &mode,
};
rc = plpks_read_fw_var(&var);
if (rc) {
if (rc != -ENOENT && rc != -EPERM)
pr_info("Error %ld reading SB_VERSION from firmware\n", rc);
mode = 0;
}
return mode;
}
/*
* PLPKS dynamic secure boot doesn't give us a format string in the same way
* OPAL does. Instead, report the format using the SB_VERSION variable in the
* keystore. The string, made up by us, takes the form of either
* "ibm,plpks-sb-v<n>" or "ibm,plpks-sb-v0", based on the key management mode,
* and return the length of the secvar format property.
*/
static ssize_t plpks_secvar_format(char *buf, size_t bufsize) static ssize_t plpks_secvar_format(char *buf, size_t bufsize)
{ {
struct plpks_var var = {0}; u8 mode;
ssize_t ret;
u8 version;
var.component = NULL; mode = plpks_get_sb_keymgmt_mode();
// Only the signed variables have null bytes in their names, this one doesn't return snprintf(buf, bufsize, "ibm,plpks-sb-v%hhu", mode);
var.name = "SB_VERSION";
var.namelen = strlen(var.name);
var.datalen = 1;
var.data = &version;
// Unlike the other vars, SB_VERSION is owned by firmware instead of the OS
ret = plpks_read_fw_var(&var);
if (ret) {
if (ret == -ENOENT) {
ret = snprintf(buf, bufsize, "ibm,plpks-sb-unknown");
} else {
pr_err("Error %ld reading SB_VERSION from firmware\n", ret);
ret = -EIO;
}
goto err;
}
ret = snprintf(buf, bufsize, "ibm,plpks-sb-v%hhu", version);
err:
return ret;
} }
static int plpks_max_size(u64 *max_size) static int plpks_max_size(u64 *max_size)
@ -197,21 +220,34 @@ static int plpks_max_size(u64 *max_size)
return 0; return 0;
} }
static const struct secvar_operations plpks_secvar_ops_static = {
static const struct secvar_operations plpks_secvar_ops = {
.get = plpks_get_variable, .get = plpks_get_variable,
.set = plpks_set_variable, .set = plpks_set_variable,
.format = plpks_secvar_format, .format = plpks_secvar_format,
.max_size = plpks_max_size, .max_size = plpks_max_size,
.config_attrs = config_attrs, .config_attrs = config_attrs,
.var_names = plpks_var_names, .var_names = plpks_var_names_static,
};
static const struct secvar_operations plpks_secvar_ops_dynamic = {
.get = plpks_get_variable,
.set = plpks_set_variable,
.format = plpks_secvar_format,
.max_size = plpks_max_size,
.config_attrs = config_attrs,
.var_names = plpks_var_names_dynamic,
}; };
static int plpks_secvar_init(void) static int plpks_secvar_init(void)
{ {
u8 mode;
if (!plpks_is_available()) if (!plpks_is_available())
return -ENODEV; return -ENODEV;
return set_secvar_ops(&plpks_secvar_ops); mode = plpks_get_sb_keymgmt_mode();
if (mode)
return set_secvar_ops(&plpks_secvar_ops_dynamic);
return set_secvar_ops(&plpks_secvar_ops_static);
} }
machine_device_initcall(pseries, plpks_secvar_init); machine_device_initcall(pseries, plpks_secvar_init);

View File

@ -75,7 +75,7 @@ static ssize_t fsl_timer_wakeup_store(struct device *dev,
if (kstrtoll(buf, 0, &interval)) if (kstrtoll(buf, 0, &interval))
return -EINVAL; return -EINVAL;
mutex_lock(&sysfs_lock); guard(mutex)(&sysfs_lock);
if (fsl_wakeup->timer) { if (fsl_wakeup->timer) {
disable_irq_wake(fsl_wakeup->timer->irq); disable_irq_wake(fsl_wakeup->timer->irq);
@ -83,31 +83,23 @@ static ssize_t fsl_timer_wakeup_store(struct device *dev,
fsl_wakeup->timer = NULL; fsl_wakeup->timer = NULL;
} }
if (!interval) { if (!interval)
mutex_unlock(&sysfs_lock);
return count; return count;
}
fsl_wakeup->timer = mpic_request_timer(fsl_mpic_timer_irq, fsl_wakeup->timer = mpic_request_timer(fsl_mpic_timer_irq,
fsl_wakeup, interval); fsl_wakeup, interval);
if (!fsl_wakeup->timer) { if (!fsl_wakeup->timer)
mutex_unlock(&sysfs_lock);
return -EINVAL; return -EINVAL;
}
ret = enable_irq_wake(fsl_wakeup->timer->irq); ret = enable_irq_wake(fsl_wakeup->timer->irq);
if (ret) { if (ret) {
mpic_free_timer(fsl_wakeup->timer); mpic_free_timer(fsl_wakeup->timer);
fsl_wakeup->timer = NULL; fsl_wakeup->timer = NULL;
mutex_unlock(&sysfs_lock);
return ret; return ret;
} }
mpic_start_timer(fsl_wakeup->timer); mpic_start_timer(fsl_wakeup->timer);
mutex_unlock(&sysfs_lock);
return count; return count;
} }

View File

@ -75,12 +75,13 @@ static int __init load_powerpc_certs(void)
return -ENODEV; return -ENODEV;
// Check for known secure boot implementations from OPAL or PLPKS // Check for known secure boot implementations from OPAL or PLPKS
if (strcmp("ibm,edk2-compat-v1", buf) && strcmp("ibm,plpks-sb-v1", buf)) { if (strcmp("ibm,edk2-compat-v1", buf) && strcmp("ibm,plpks-sb-v1", buf) &&
strcmp("ibm,plpks-sb-v0", buf)) {
pr_err("Unsupported secvar implementation \"%s\", not loading certs\n", buf); pr_err("Unsupported secvar implementation \"%s\", not loading certs\n", buf);
return -ENODEV; return -ENODEV;
} }
if (strcmp("ibm,plpks-sb-v1", buf) == 0) if (strcmp("ibm,plpks-sb-v1", buf) == 0 || strcmp("ibm,plpks-sb-v0", buf) == 0)
/* PLPKS authenticated variables ESL data is prefixed with 8 bytes of timestamp */ /* PLPKS authenticated variables ESL data is prefixed with 8 bytes of timestamp */
offset = 8; offset = 8;