* Re: [PATCH v3 01/13] powerpc/64s/exception: clean up system call entry
From: Michael Ellerman @ 2019-07-04 15:52 UTC (permalink / raw)
To: Nicholas Piggin, linuxppc-dev; +Cc: Nicholas Piggin
In-Reply-To: <20190628053332.22366-2-npiggin@gmail.com>
On Fri, 2019-06-28 at 05:33:20 UTC, Nicholas Piggin wrote:
> syscall / hcall entry unnecessarily differs between KVM and non-KVM
> builds. Move the SMT priority instruction to the same location
> (after INTERRUPT_TO_KERNEL).
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Series applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/b0b2a93da4c95ac808c4c43f24a1873ae3166a1a
cheers
^ permalink raw reply
* Re: [PATCH 1/5] powerpc/64s/exception: remove bad stack branch
From: Michael Ellerman @ 2019-07-04 15:52 UTC (permalink / raw)
To: Nicholas Piggin, linuxppc-dev; +Cc: Nicholas Piggin
In-Reply-To: <20190628063322.11628-2-npiggin@gmail.com>
On Fri, 2019-06-28 at 06:33:18 UTC, Nicholas Piggin wrote:
> The bad stack test in interrupt handlers has a few problems. For
> performance it is taken in the common case, which is a fetch bubble
> and a waste of i-cache.
>
> For code development and maintainence, it requires yet another stack
> frame setup routine, and that constrains all exception handlers to
> follow the same register save pattern which inhibits future
> optimisation.
>
> Remove the test/branch and replace it with a trap. Teach the program
> check handler to use the emergency stack for this case.
>
> This does not result in quite so nice a message, however the SRR0 and
> SRR1 of the crashed interrupt can be seen in r11 and r12, as is the
> original r1 (adjusted by INT_FRAME_SIZE). These are the most important
> parts to debugging the issue.
>
> The original r9-12 and cr0 is lost, which is the main downside.
>
> kernel BUG at linux/arch/powerpc/kernel/exceptions-64s.S:847!
> Oops: Exception in kernel mode, sig: 5 [#1]
> BE SMP NR_CPUS=2048 NUMA PowerNV
> Modules linked in:
> CPU: 0 PID: 1 Comm: swapper/0 Not tainted
> NIP: c000000000009108 LR: c000000000cadbcc CTR: c0000000000090f0
> REGS: c0000000fffcbd70 TRAP: 0700 Not tainted
> MSR: 9000000000021032 <SF,HV,ME,IR,DR,RI> CR: 28222448 XER: 20040000
> CFAR: c000000000009100 IRQMASK: 0
> GPR00: 000000000000003d fffffffffffffd00 c0000000018cfb00 c0000000f02b3166
> GPR04: fffffffffffffffd 0000000000000007 fffffffffffffffb 0000000000000030
> GPR08: 0000000000000037 0000000028222448 0000000000000000 c000000000ca8de0
> GPR12: 9000000002009032 c000000001ae0000 c000000000010a00 0000000000000000
> GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> GPR20: c0000000f00322c0 c000000000f85200 0000000000000004 ffffffffffffffff
> GPR24: fffffffffffffffe 0000000000000000 0000000000000000 000000000000000a
> GPR28: 0000000000000000 0000000000000000 c0000000f02b391c c0000000f02b3167
> NIP [c000000000009108] decrementer_common+0x18/0x160
> LR [c000000000cadbcc] .vsnprintf+0x3ec/0x4f0
> Call Trace:
> Instruction dump:
> 996d098a 994d098b 38610070 480246ed 48005518 60000000 38200000 718a4000
> 7c2a0b78 3821fd00 41c20008 e82d0970 <0981fd00> f92101a0 f9610170 f9810178
>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Series applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/0a882e28468f48ab3d9a36dde0a5723ea29ed1ed
cheers
^ permalink raw reply
* Re: [PATCH] powerpc: remove device_to_mask
From: Michael Ellerman @ 2019-07-04 15:52 UTC (permalink / raw)
To: Christoph Hellwig, paulus; +Cc: linuxppc-dev
In-Reply-To: <20190629080359.23182-1-hch@lst.de>
On Sat, 2019-06-29 at 08:03:59 UTC, Christoph Hellwig wrote:
> Use the dma_get_mask helper from dma-mapping.h instead.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/24911acd64cee411c9e626d3d0ca0733805b009b
cheers
^ permalink raw reply
* Re: [PATCH] powerpc/64s/exception: Remove unused SOFTEN_VALUE_0x980
From: Michael Ellerman @ 2019-07-04 15:52 UTC (permalink / raw)
To: Michael Ellerman, linuxppc-dev; +Cc: npiggin
In-Reply-To: <20190702082801.29975-1-mpe@ellerman.id.au>
On Tue, 2019-07-02 at 08:28:01 UTC, Michael Ellerman wrote:
> Remove SOFTEN_VALUE_0x980, it's been unused since commit
> dabe859ec636 ("powerpc: Give hypervisor decrementer interrupts their
> own handler") (Sep 2012).
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Applied to powerpc next.
https://git.kernel.org/powerpc/c/1efd8caa9a9192e6820d267c780c110a9f54336f
cheers
^ permalink raw reply
* Re: [PATCH v12 01/11] MODSIGN: Export module signature definitions
From: Thiago Jung Bauermann @ 2019-07-04 18:57 UTC (permalink / raw)
To: Philipp Rudo
Cc: linux-s390, Herbert Xu, linux-doc, Dmitry Kasatkin,
David S. Miller, Jonathan Corbet, Heiko Carstens, linux-kernel,
Mimi Zohar, James Morris, David Howells, AKASHI, Takahiro,
linux-security-module, keyrings, linux-crypto, Jessica Yu,
linux-integrity, linuxppc-dev, David Woodhouse, Serge E. Hallyn
In-Reply-To: <20190704125427.31146026@laptop-ibm>
Hello Philipp,
Philipp Rudo <prudo@linux.ibm.com> writes:
> Hi Thiago,
>
>
> On Thu, 04 Jul 2019 03:42:57 -0300
> Thiago Jung Bauermann <bauerman@linux.ibm.com> wrote:
>
>> Jessica Yu <jeyu@kernel.org> writes:
>>
>> > +++ Thiago Jung Bauermann [27/06/19 23:19 -0300]:
>> >>IMA will use the module_signature format for append signatures, so export
>> >>the relevant definitions and factor out the code which verifies that the
>> >>appended signature trailer is valid.
>> >>
>> >>Also, create a CONFIG_MODULE_SIG_FORMAT option so that IMA can select it
>> >>and be able to use mod_check_sig() without having to depend on either
>> >>CONFIG_MODULE_SIG or CONFIG_MODULES.
>> >>
>> >>Signed-off-by: Thiago Jung Bauermann <bauerman@linux.ibm.com>
>> >>Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
>> >>Cc: Jessica Yu <jeyu@kernel.org>
>> >>---
>> >> include/linux/module.h | 3 --
>> >> include/linux/module_signature.h | 44 +++++++++++++++++++++++++
>> >> init/Kconfig | 6 +++-
>> >> kernel/Makefile | 1 +
>> >> kernel/module.c | 1 +
>> >> kernel/module_signature.c | 46 ++++++++++++++++++++++++++
>> >> kernel/module_signing.c | 56 +++++---------------------------
>> >> scripts/Makefile | 2 +-
>> >> 8 files changed, 106 insertions(+), 53 deletions(-)
>> >>
>> >>diff --git a/include/linux/module.h b/include/linux/module.h
>> >>index 188998d3dca9..aa56f531cf1e 100644
>> >>--- a/include/linux/module.h
>> >>+++ b/include/linux/module.h
>> >>@@ -25,9 +25,6 @@
>> >> #include <linux/percpu.h>
>> >> #include <asm/module.h>
>> >>
>> >>-/* In stripped ARM and x86-64 modules, ~ is surprisingly rare. */
>> >>-#define MODULE_SIG_STRING "~Module signature appended~\n"
>> >>-
>> >
>> > Hi Thiago, apologies for the delay.
>>
>> Hello Jessica, thanks for reviewing the patch!
>>
>> > It looks like arch/s390/kernel/machine_kexec_file.c also relies on
>> > MODULE_SIG_STRING being defined, so module_signature.h will need to be
>> > included there too, otherwise we'll run into a compilation error.
>>
>> Indeed. Thanks for spotting that. The patch below fixes it. It's
>> identical to the previous version except for the changes in
>> arch/s390/kernel/machine_kexec_file.c and their description in the
>> commit message. I'm also copying some s390 people in this email.
>
> to me the s390 part looks good but for one minor nit.
Thanks for the prompt review!
> In arch/s390/Kconfig KEXEC_VERIFY_SIG currently depends on
> SYSTEM_DATA_VERIFICATION. I'd prefer when you update this to the new
> MODULE_SIG_FORMAT. It shouldn't make any difference right now, as we don't
> use mod_check_sig in our code path. But it could cause problems in the future,
> when more code might be shared.
Makes sense. Here is the updated patch with the Kconfig change.
--
Thiago Jung Bauermann
IBM Linux Technology Center
From d0e870a6eccc7126c0416ad7369888052c15eb18 Mon Sep 17 00:00:00 2001
From: Thiago Jung Bauermann <bauerman@linux.ibm.com>
Date: Thu, 17 May 2018 21:46:12 -0300
Subject: [PATCH 1/1] MODSIGN: Export module signature definitions
IMA will use the module_signature format for append signatures, so export
the relevant definitions and factor out the code which verifies that the
appended signature trailer is valid.
Also, create a CONFIG_MODULE_SIG_FORMAT option so that IMA can select it
and be able to use mod_check_sig() without having to depend on either
CONFIG_MODULE_SIG or CONFIG_MODULES.
s390 duplicated the definition of struct module_signature so now they can
use the new <linux/module_signature.h> header instead.
Signed-off-by: Thiago Jung Bauermann <bauerman@linux.ibm.com>
Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
Acked-by: Jessica Yu <jeyu@kernel.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Philipp Rudo <prudo@linux.ibm.com>
---
arch/s390/Kconfig | 2 +-
arch/s390/kernel/machine_kexec_file.c | 24 +-----------
include/linux/module.h | 3 --
include/linux/module_signature.h | 44 +++++++++++++++++++++
init/Kconfig | 6 ++-
kernel/Makefile | 1 +
kernel/module.c | 1 +
kernel/module_signature.c | 46 ++++++++++++++++++++++
kernel/module_signing.c | 56 ++++-----------------------
scripts/Makefile | 2 +-
10 files changed, 108 insertions(+), 77 deletions(-)
create mode 100644 include/linux/module_signature.h
create mode 100644 kernel/module_signature.c
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 109243fdb6ec..446b7ffa1294 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -557,7 +557,7 @@ config ARCH_HAS_KEXEC_PURGATORY
config KEXEC_VERIFY_SIG
bool "Verify kernel signature during kexec_file_load() syscall"
- depends on KEXEC_FILE && SYSTEM_DATA_VERIFICATION
+ depends on KEXEC_FILE && MODULE_SIG_FORMAT
help
This option makes kernel signature verification mandatory for
the kexec_file_load() syscall.
diff --git a/arch/s390/kernel/machine_kexec_file.c b/arch/s390/kernel/machine_kexec_file.c
index fbdd3ea73667..1ac9fbc6e01e 100644
--- a/arch/s390/kernel/machine_kexec_file.c
+++ b/arch/s390/kernel/machine_kexec_file.c
@@ -10,7 +10,7 @@
#include <linux/elf.h>
#include <linux/errno.h>
#include <linux/kexec.h>
-#include <linux/module.h>
+#include <linux/module_signature.h>
#include <linux/verification.h>
#include <asm/boot_data.h>
#include <asm/ipl.h>
@@ -23,28 +23,6 @@ const struct kexec_file_ops * const kexec_file_loaders[] = {
};
#ifdef CONFIG_KEXEC_VERIFY_SIG
-/*
- * Module signature information block.
- *
- * The constituents of the signature section are, in order:
- *
- * - Signer's name
- * - Key identifier
- * - Signature data
- * - Information block
- */
-struct module_signature {
- u8 algo; /* Public-key crypto algorithm [0] */
- u8 hash; /* Digest algorithm [0] */
- u8 id_type; /* Key identifier type [PKEY_ID_PKCS7] */
- u8 signer_len; /* Length of signer's name [0] */
- u8 key_id_len; /* Length of key identifier [0] */
- u8 __pad[3];
- __be32 sig_len; /* Length of signature data */
-};
-
-#define PKEY_ID_PKCS7 2
-
int s390_verify_sig(const char *kernel, unsigned long kernel_len)
{
const unsigned long marker_len = sizeof(MODULE_SIG_STRING) - 1;
diff --git a/include/linux/module.h b/include/linux/module.h
index 188998d3dca9..aa56f531cf1e 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -25,9 +25,6 @@
#include <linux/percpu.h>
#include <asm/module.h>
-/* In stripped ARM and x86-64 modules, ~ is surprisingly rare. */
-#define MODULE_SIG_STRING "~Module signature appended~\n"
-
/* Not Yet Implemented */
#define MODULE_SUPPORTED_DEVICE(name)
diff --git a/include/linux/module_signature.h b/include/linux/module_signature.h
new file mode 100644
index 000000000000..523617fc5b6a
--- /dev/null
+++ b/include/linux/module_signature.h
@@ -0,0 +1,44 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Module signature handling.
+ *
+ * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ */
+
+#ifndef _LINUX_MODULE_SIGNATURE_H
+#define _LINUX_MODULE_SIGNATURE_H
+
+/* In stripped ARM and x86-64 modules, ~ is surprisingly rare. */
+#define MODULE_SIG_STRING "~Module signature appended~\n"
+
+enum pkey_id_type {
+ PKEY_ID_PGP, /* OpenPGP generated key ID */
+ PKEY_ID_X509, /* X.509 arbitrary subjectKeyIdentifier */
+ PKEY_ID_PKCS7, /* Signature in PKCS#7 message */
+};
+
+/*
+ * Module signature information block.
+ *
+ * The constituents of the signature section are, in order:
+ *
+ * - Signer's name
+ * - Key identifier
+ * - Signature data
+ * - Information block
+ */
+struct module_signature {
+ u8 algo; /* Public-key crypto algorithm [0] */
+ u8 hash; /* Digest algorithm [0] */
+ u8 id_type; /* Key identifier type [PKEY_ID_PKCS7] */
+ u8 signer_len; /* Length of signer's name [0] */
+ u8 key_id_len; /* Length of key identifier [0] */
+ u8 __pad[3];
+ __be32 sig_len; /* Length of signature data */
+};
+
+int mod_check_sig(const struct module_signature *ms, size_t file_len,
+ const char *name);
+
+#endif /* _LINUX_MODULE_SIGNATURE_H */
diff --git a/init/Kconfig b/init/Kconfig
index 8b9ffe236e4f..c2286a3c74c5 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1852,6 +1852,10 @@ config BASE_SMALL
default 0 if BASE_FULL
default 1 if !BASE_FULL
+config MODULE_SIG_FORMAT
+ def_bool n
+ select SYSTEM_DATA_VERIFICATION
+
menuconfig MODULES
bool "Enable loadable module support"
option modules
@@ -1929,7 +1933,7 @@ config MODULE_SRCVERSION_ALL
config MODULE_SIG
bool "Module signature verification"
depends on MODULES
- select SYSTEM_DATA_VERIFICATION
+ select MODULE_SIG_FORMAT
help
Check modules for valid signatures upon load: the signature
is simply appended to the module. For more information see
diff --git a/kernel/Makefile b/kernel/Makefile
index 33824f0385b3..f29ae2997a43 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -58,6 +58,7 @@ endif
obj-$(CONFIG_UID16) += uid16.o
obj-$(CONFIG_MODULES) += module.o
obj-$(CONFIG_MODULE_SIG) += module_signing.o
+obj-$(CONFIG_MODULE_SIG_FORMAT) += module_signature.o
obj-$(CONFIG_KALLSYMS) += kallsyms.o
obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o
obj-$(CONFIG_CRASH_CORE) += crash_core.o
diff --git a/kernel/module.c b/kernel/module.c
index 6e6712b3aaf5..2712f4d217f5 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -19,6 +19,7 @@
#include <linux/export.h>
#include <linux/extable.h>
#include <linux/moduleloader.h>
+#include <linux/module_signature.h>
#include <linux/trace_events.h>
#include <linux/init.h>
#include <linux/kallsyms.h>
diff --git a/kernel/module_signature.c b/kernel/module_signature.c
new file mode 100644
index 000000000000..4224a1086b7d
--- /dev/null
+++ b/kernel/module_signature.c
@@ -0,0 +1,46 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Module signature checker
+ *
+ * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved.
+ * Written by David Howells (dhowells@redhat.com)
+ */
+
+#include <linux/errno.h>
+#include <linux/printk.h>
+#include <linux/module_signature.h>
+#include <asm/byteorder.h>
+
+/**
+ * mod_check_sig - check that the given signature is sane
+ *
+ * @ms: Signature to check.
+ * @file_len: Size of the file to which @ms is appended.
+ * @name: What is being checked. Used for error messages.
+ */
+int mod_check_sig(const struct module_signature *ms, size_t file_len,
+ const char *name)
+{
+ if (be32_to_cpu(ms->sig_len) >= file_len - sizeof(*ms))
+ return -EBADMSG;
+
+ if (ms->id_type != PKEY_ID_PKCS7) {
+ pr_err("%s: Module is not signed with expected PKCS#7 message\n",
+ name);
+ return -ENOPKG;
+ }
+
+ if (ms->algo != 0 ||
+ ms->hash != 0 ||
+ ms->signer_len != 0 ||
+ ms->key_id_len != 0 ||
+ ms->__pad[0] != 0 ||
+ ms->__pad[1] != 0 ||
+ ms->__pad[2] != 0) {
+ pr_err("%s: PKCS#7 signature info has unexpected non-zero params\n",
+ name);
+ return -EBADMSG;
+ }
+
+ return 0;
+}
diff --git a/kernel/module_signing.c b/kernel/module_signing.c
index 6b9a926fd86b..cdd04a6b8074 100644
--- a/kernel/module_signing.c
+++ b/kernel/module_signing.c
@@ -11,37 +11,13 @@
#include <linux/kernel.h>
#include <linux/errno.h>
+#include <linux/module.h>
+#include <linux/module_signature.h>
#include <linux/string.h>
#include <linux/verification.h>
#include <crypto/public_key.h>
#include "module-internal.h"
-enum pkey_id_type {
- PKEY_ID_PGP, /* OpenPGP generated key ID */
- PKEY_ID_X509, /* X.509 arbitrary subjectKeyIdentifier */
- PKEY_ID_PKCS7, /* Signature in PKCS#7 message */
-};
-
-/*
- * Module signature information block.
- *
- * The constituents of the signature section are, in order:
- *
- * - Signer's name
- * - Key identifier
- * - Signature data
- * - Information block
- */
-struct module_signature {
- u8 algo; /* Public-key crypto algorithm [0] */
- u8 hash; /* Digest algorithm [0] */
- u8 id_type; /* Key identifier type [PKEY_ID_PKCS7] */
- u8 signer_len; /* Length of signer's name [0] */
- u8 key_id_len; /* Length of key identifier [0] */
- u8 __pad[3];
- __be32 sig_len; /* Length of signature data */
-};
-
/*
* Verify the signature on a module.
*/
@@ -49,6 +25,7 @@ int mod_verify_sig(const void *mod, struct load_info *info)
{
struct module_signature ms;
size_t sig_len, modlen = info->len;
+ int ret;
pr_devel("==>%s(,%zu)\n", __func__, modlen);
@@ -56,32 +33,15 @@ int mod_verify_sig(const void *mod, struct load_info *info)
return -EBADMSG;
memcpy(&ms, mod + (modlen - sizeof(ms)), sizeof(ms));
- modlen -= sizeof(ms);
+
+ ret = mod_check_sig(&ms, modlen, info->name);
+ if (ret)
+ return ret;
sig_len = be32_to_cpu(ms.sig_len);
- if (sig_len >= modlen)
- return -EBADMSG;
- modlen -= sig_len;
+ modlen -= sig_len + sizeof(ms);
info->len = modlen;
- if (ms.id_type != PKEY_ID_PKCS7) {
- pr_err("%s: Module is not signed with expected PKCS#7 message\n",
- info->name);
- return -ENOPKG;
- }
-
- if (ms.algo != 0 ||
- ms.hash != 0 ||
- ms.signer_len != 0 ||
- ms.key_id_len != 0 ||
- ms.__pad[0] != 0 ||
- ms.__pad[1] != 0 ||
- ms.__pad[2] != 0) {
- pr_err("%s: PKCS#7 signature info has unexpected non-zero params\n",
- info->name);
- return -EBADMSG;
- }
-
return verify_pkcs7_signature(mod, modlen, mod + modlen, sig_len,
VERIFY_USE_SECONDARY_KEYRING,
VERIFYING_MODULE_SIGNATURE,
diff --git a/scripts/Makefile b/scripts/Makefile
index 9d442ee050bd..52098b080ab7 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -17,7 +17,7 @@ hostprogs-$(CONFIG_VT) += conmakehash
hostprogs-$(BUILD_C_RECORDMCOUNT) += recordmcount
hostprogs-$(CONFIG_BUILDTIME_EXTABLE_SORT) += sortextable
hostprogs-$(CONFIG_ASN1) += asn1_compiler
-hostprogs-$(CONFIG_MODULE_SIG) += sign-file
+hostprogs-$(CONFIG_MODULE_SIG_FORMAT) += sign-file
hostprogs-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += extract-cert
hostprogs-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert
^ permalink raw reply related
* [PATCH 0/8] treewide: correct misuses of strscpy/strlcpy
From: Joe Perches @ 2019-07-04 23:57 UTC (permalink / raw)
To: Dan Murphy, linux-leds, linux-media, linux-arm-kernel,
linuxppc-dev, linux-nfs
Cc: netdev, linux-kernel, linux-input
These are all likely copy/paste defects where the field size of the
'copied to' array is incorrect.
Each patch in this series is independent.
Joe Perches (8):
Input: synaptics: Fix misuse of strlcpy
leds: as3645a: Fix misuse of strlcpy
media: m2m-deinterlace: Fix misuse of strscpy
media: go7007: Fix misuse of strscpy
net: ethernet: sun4i-emac: Fix misuse of strlcpy
net: nixge: Fix misuse of strlcpy
tty: hvcs: Fix odd use of strlcpy
nfsd: Fix misuse of strlcpy
drivers/input/mouse/synaptics.c | 2 +-
drivers/leds/leds-as3645a.c | 2 +-
drivers/media/platform/m2m-deinterlace.c | 2 +-
drivers/media/usb/go7007/snd-go7007.c | 2 +-
drivers/net/ethernet/allwinner/sun4i-emac.c | 4 ++--
drivers/net/ethernet/ni/nixge.c | 2 +-
drivers/tty/hvc/hvcs.c | 4 ++--
fs/nfsd/nfs4idmap.c | 2 +-
8 files changed, 10 insertions(+), 10 deletions(-)
--
2.15.0
^ permalink raw reply
* [PATCH 7/8] tty: hvcs: Fix odd use of strlcpy
From: Joe Perches @ 2019-07-04 23:57 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, linuxppc-dev, Jiri Slaby
In-Reply-To: <cover.1562283944.git.joe@perches.com>
Use the typical style of array, not the equivalent &array[0].
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/tty/hvc/hvcs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
index cb4db1b3ca3c..b6c1c1be06f9 100644
--- a/drivers/tty/hvc/hvcs.c
+++ b/drivers/tty/hvc/hvcs.c
@@ -871,8 +871,8 @@ static void hvcs_set_pi(struct hvcs_partner_info *pi, struct hvcs_struct *hvcsd)
hvcsd->p_partition_ID = pi->partition_ID;
/* copy the null-term char too */
- strlcpy(&hvcsd->p_location_code[0],
- &pi->location_code[0], sizeof(hvcsd->p_location_code));
+ strlcpy(hvcsd->p_location_code, pi->location_code,
+ sizeof(hvcsd->p_location_code));
}
/*
--
2.15.0
^ permalink raw reply related
* Re: [v2 09/12] powerpc/mce: Enable MCE notifiers in external modules
From: Reza Arbab @ 2019-07-05 2:50 UTC (permalink / raw)
To: Nicholas Piggin
Cc: Santosh Sivaraj, Aneesh Kumar K.V, Mahesh Salgaonkar,
Chandan Rajendra, linuxppc-dev
In-Reply-To: <1562207031.05iwu5t2xm.astroid@bobo.none>
On Thu, Jul 04, 2019 at 12:36:18PM +1000, Nicholas Piggin wrote:
>Reza Arbab's on July 4, 2019 3:20 am:
>> Since the notifier chain is actually part of the decision between (1)
>> and (2), it's a hard limitation then that callbacks be in real address
>> space. Is there any way to structure things so that's not the case?
>
>If we tested for KVM guest first, and went through and marked (maybe
>in a paca flag) everywhere else that put the MMU into a bad / non-host
>state, and had the notifiers use the machine check stack, then it
>would be possible to enable MMU here.
>
>Hmm, testing for IR|DR after testing for KVM guest might actually be
>enough without requiring changes outside the machine check handler...
>Actually no that may not quite work because the handler could take a
>SLB miss and it might have been triggered inside the SLB miss handler.
>
>All in all I'm pretty against turning on MMU in the MCE handler
>anywhere.
Hey, fair enough. Just making sure there really isnt't any room to make
things work the way I was trying.
>> Luckily this patch isn't really necessary for memcpy_mcsafe(), but we
>> have a couple of other potential users of the notifier from external
>> modules (so their callbacks would require virtual mode).
>
>What users are there? Do they do any significant amount of logic that
>can not be moved to vmlinux?
One I had in mind was the NVIDIA driver. When taking a UE from defective
GPU memory, it could use the notifier to save the bad address to a
blacklist in their nvram. Not so much recovering the machine check, just
logging before the system reboots.
The other user is a prototype driver for the IBM Research project we had
a talk about offline a while back.
We can make this patchset work for memcpy_mcsafe(), but I think it's
back to the drawing board for the others.
--
Reza Arbab
^ permalink raw reply
* Re: [v2 09/12] powerpc/mce: Enable MCE notifiers in external modules
From: Nicholas Piggin @ 2019-07-05 5:29 UTC (permalink / raw)
To: Reza Arbab
Cc: Santosh Sivaraj, Aneesh Kumar K.V, Mahesh Salgaonkar,
Chandan Rajendra, linuxppc-dev
In-Reply-To: <20190705025042.nnov5s45jc4jd5ld@arbab-vm>
Reza Arbab's on July 5, 2019 12:50 pm:
> On Thu, Jul 04, 2019 at 12:36:18PM +1000, Nicholas Piggin wrote:
>>Reza Arbab's on July 4, 2019 3:20 am:
>>> Since the notifier chain is actually part of the decision between (1)
>>> and (2), it's a hard limitation then that callbacks be in real address
>>> space. Is there any way to structure things so that's not the case?
>>
>>If we tested for KVM guest first, and went through and marked (maybe
>>in a paca flag) everywhere else that put the MMU into a bad / non-host
>>state, and had the notifiers use the machine check stack, then it
>>would be possible to enable MMU here.
>>
>>Hmm, testing for IR|DR after testing for KVM guest might actually be
>>enough without requiring changes outside the machine check handler...
>>Actually no that may not quite work because the handler could take a
>>SLB miss and it might have been triggered inside the SLB miss handler.
>>
>>All in all I'm pretty against turning on MMU in the MCE handler
>>anywhere.
>
> Hey, fair enough. Just making sure there really isnt't any room to make
> things work the way I was trying.
Understand.
>
>>> Luckily this patch isn't really necessary for memcpy_mcsafe(), but we
>>> have a couple of other potential users of the notifier from external
>>> modules (so their callbacks would require virtual mode).
>>
>>What users are there? Do they do any significant amount of logic that
>>can not be moved to vmlinux?
>
> One I had in mind was the NVIDIA driver. When taking a UE from defective
> GPU memory, it could use the notifier to save the bad address to a
> blacklist in their nvram. Not so much recovering the machine check, just
> logging before the system reboots.
>
> The other user is a prototype driver for the IBM Research project we had
> a talk about offline a while back.
Okay. It might be possible to save the address in the kernel and
then notify the driver afterward. For user-mode and any non-atomic
user copy AFAIK the irq_work should practically run synchronously
after the machine check returns so it might be enough to have a
notifier in the irq work processing.
> We can make this patchset work for memcpy_mcsafe(), but I think it's
> back to the drawing board for the others.
For the first stage that would be preferable.
Thanks,
Nick
^ permalink raw reply
* [PATCH] mm/kprobes: Add generic kprobe_fault_handler() fallback definition
From: Anshuman Khandual @ 2019-07-05 5:30 UTC (permalink / raw)
To: linux-mm
Cc: Kate Stewart, Mark Rutland, Rich Felker, linux-ia64, linux-sh,
Heiko Carstens, linux-mips, Richard Fontana, Paul Mackerras,
H. Peter Anvin, sparclinux, Will Deacon, linux-s390,
Yoshinori Sato, x86, Russell King, Anil S Keshavamurthy,
Christian Borntraeger, Ingo Molnar, linux-arm-kernel,
Catalin Marinas, James Hogan, linux-snps-arc, Guenter Roeck,
Fenghua Yu, Vasily Gorbik, Anshuman Khandual, linuxppc-dev,
Naveen N. Rao, Borislav Petkov, Thomas Gleixner, Allison Randal,
Tony Luck, Vineet Gupta, linux-kernel, Ralf Baechle, Paul Burton,
Masami Hiramatsu, Greg Kroah-Hartman, Andrew Morton,
Enrico Weigelt, David S. Miller
Architectures like parisc enable CONFIG_KROBES without having a definition
for kprobe_fault_handler() which results in a build failure. Arch needs to
provide kprobe_fault_handler() as it is platform specific and cannot have
a generic working alternative. But in the event when platform lacks such a
definition there needs to be a fallback.
This adds a stub kprobe_fault_handler() definition which not only prevents
a build failure but also makes sure that kprobe_page_fault() if called will
always return negative in absence of a sane platform specific alternative.
While here wrap kprobe_page_fault() in CONFIG_KPROBES. This enables stud
definitions for generic kporbe_fault_handler() and kprobes_built_in() can
just be dropped. Only on x86 it needs to be added back locally as it gets
used in a !CONFIG_KPROBES function do_general_protection().
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Burton <paul.burton@mips.com>
Cc: James Hogan <jhogan@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: "Naveen N. Rao" <naveen.n.rao@linux.ibm.com>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Allison Randal <allison@lohutok.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Enrico Weigelt <info@metux.net>
Cc: Richard Fontana <rfontana@redhat.com>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: x86@kernel.org
Cc: linux-snps-arc@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-ia64@vger.kernel.org
Cc: linux-mips@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-s390@vger.kernel.org
Cc: linux-sh@vger.kernel.org
Cc: sparclinux@vger.kernel.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
arch/arc/include/asm/kprobes.h | 1 +
arch/arm/include/asm/kprobes.h | 1 +
arch/arm64/include/asm/kprobes.h | 1 +
arch/ia64/include/asm/kprobes.h | 1 +
arch/mips/include/asm/kprobes.h | 1 +
arch/powerpc/include/asm/kprobes.h | 1 +
arch/s390/include/asm/kprobes.h | 1 +
arch/sh/include/asm/kprobes.h | 1 +
arch/sparc/include/asm/kprobes.h | 1 +
arch/x86/include/asm/kprobes.h | 6 ++++++
include/linux/kprobes.h | 32 ++++++++++++++++++------------
11 files changed, 34 insertions(+), 13 deletions(-)
diff --git a/arch/arc/include/asm/kprobes.h b/arch/arc/include/asm/kprobes.h
index 2134721dce44..ee8efe256675 100644
--- a/arch/arc/include/asm/kprobes.h
+++ b/arch/arc/include/asm/kprobes.h
@@ -45,6 +45,7 @@ struct kprobe_ctlblk {
struct prev_kprobe prev_kprobe;
};
+#define kprobe_fault_handler kprobe_fault_handler
int kprobe_fault_handler(struct pt_regs *regs, unsigned long cause);
void kretprobe_trampoline(void);
void trap_is_kprobe(unsigned long address, struct pt_regs *regs);
diff --git a/arch/arm/include/asm/kprobes.h b/arch/arm/include/asm/kprobes.h
index 213607a1f45c..660f877b989f 100644
--- a/arch/arm/include/asm/kprobes.h
+++ b/arch/arm/include/asm/kprobes.h
@@ -38,6 +38,7 @@ struct kprobe_ctlblk {
struct prev_kprobe prev_kprobe;
};
+#define kprobe_fault_handler kprobe_fault_handler
void arch_remove_kprobe(struct kprobe *);
int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr);
int kprobe_exceptions_notify(struct notifier_block *self,
diff --git a/arch/arm64/include/asm/kprobes.h b/arch/arm64/include/asm/kprobes.h
index 97e511d645a2..667773f75616 100644
--- a/arch/arm64/include/asm/kprobes.h
+++ b/arch/arm64/include/asm/kprobes.h
@@ -42,6 +42,7 @@ struct kprobe_ctlblk {
struct kprobe_step_ctx ss_ctx;
};
+#define kprobe_fault_handler kprobe_fault_handler
void arch_remove_kprobe(struct kprobe *);
int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr);
int kprobe_exceptions_notify(struct notifier_block *self,
diff --git a/arch/ia64/include/asm/kprobes.h b/arch/ia64/include/asm/kprobes.h
index c5cf5e4fb338..c321e8585089 100644
--- a/arch/ia64/include/asm/kprobes.h
+++ b/arch/ia64/include/asm/kprobes.h
@@ -106,6 +106,7 @@ struct arch_specific_insn {
unsigned short slot;
};
+#define kprobe_fault_handler kprobe_fault_handler
extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
extern int kprobe_exceptions_notify(struct notifier_block *self,
unsigned long val, void *data);
diff --git a/arch/mips/include/asm/kprobes.h b/arch/mips/include/asm/kprobes.h
index 68b1e5d458cf..d1efe991ea22 100644
--- a/arch/mips/include/asm/kprobes.h
+++ b/arch/mips/include/asm/kprobes.h
@@ -40,6 +40,7 @@ do { \
#define kretprobe_blacklist_size 0
+#define kprobe_fault_handler kprobe_fault_handler
void arch_remove_kprobe(struct kprobe *p);
int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
diff --git a/arch/powerpc/include/asm/kprobes.h b/arch/powerpc/include/asm/kprobes.h
index 66b3f2983b22..c94f375ec957 100644
--- a/arch/powerpc/include/asm/kprobes.h
+++ b/arch/powerpc/include/asm/kprobes.h
@@ -84,6 +84,7 @@ struct arch_optimized_insn {
kprobe_opcode_t *insn;
};
+#define kprobe_fault_handler kprobe_fault_handler
extern int kprobe_exceptions_notify(struct notifier_block *self,
unsigned long val, void *data);
extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
diff --git a/arch/s390/include/asm/kprobes.h b/arch/s390/include/asm/kprobes.h
index b106aa29bf55..0ecaebb78092 100644
--- a/arch/s390/include/asm/kprobes.h
+++ b/arch/s390/include/asm/kprobes.h
@@ -73,6 +73,7 @@ struct kprobe_ctlblk {
void arch_remove_kprobe(struct kprobe *p);
void kretprobe_trampoline(void);
+#define kprobe_fault_handler kprobe_fault_handler
int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
int kprobe_exceptions_notify(struct notifier_block *self,
unsigned long val, void *data);
diff --git a/arch/sh/include/asm/kprobes.h b/arch/sh/include/asm/kprobes.h
index 6171682f7798..637a698393c0 100644
--- a/arch/sh/include/asm/kprobes.h
+++ b/arch/sh/include/asm/kprobes.h
@@ -45,6 +45,7 @@ struct kprobe_ctlblk {
struct prev_kprobe prev_kprobe;
};
+#define kprobe_fault_handler kprobe_fault_handler
extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
extern int kprobe_exceptions_notify(struct notifier_block *self,
unsigned long val, void *data);
diff --git a/arch/sparc/include/asm/kprobes.h b/arch/sparc/include/asm/kprobes.h
index bfcaa6326c20..9aa4d25a45a8 100644
--- a/arch/sparc/include/asm/kprobes.h
+++ b/arch/sparc/include/asm/kprobes.h
@@ -47,6 +47,7 @@ struct kprobe_ctlblk {
struct prev_kprobe prev_kprobe;
};
+#define kprobe_fault_handler kprobe_fault_handler
int kprobe_exceptions_notify(struct notifier_block *self,
unsigned long val, void *data);
int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
diff --git a/arch/x86/include/asm/kprobes.h b/arch/x86/include/asm/kprobes.h
index 5dc909d9ad81..1af2b6db13bd 100644
--- a/arch/x86/include/asm/kprobes.h
+++ b/arch/x86/include/asm/kprobes.h
@@ -101,11 +101,17 @@ struct kprobe_ctlblk {
struct prev_kprobe prev_kprobe;
};
+#define kprobe_fault_handler kprobe_fault_handler
extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
extern int kprobe_exceptions_notify(struct notifier_block *self,
unsigned long val, void *data);
extern int kprobe_int3_handler(struct pt_regs *regs);
extern int kprobe_debug_handler(struct pt_regs *regs);
+#else
+static inline int kprobe_fault_handler(struct pt_regs *regs, int trapnr)
+{
+ return 0;
+}
#endif /* CONFIG_KPROBES */
#endif /* _ASM_X86_KPROBES_H */
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index 04bdaf01112c..e106f3018804 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -182,11 +182,19 @@ DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk);
/*
* For #ifdef avoidance:
*/
-static inline int kprobes_built_in(void)
+
+/*
+ * Architectures need to override this with their own implementation
+ * if they care to call kprobe_page_fault(). This will just ensure
+ * that kprobe_page_fault() returns false when called without having
+ * a proper platform specific definition for kprobe_fault_handler().
+ */
+#ifndef kprobe_fault_handler
+static inline int kprobe_fault_handler(struct pt_regs *regs, int trapnr)
{
- return 1;
+ return 0;
}
-
+#endif
#ifdef CONFIG_KRETPROBES
extern void arch_prepare_kretprobe(struct kretprobe_instance *ri,
struct pt_regs *regs);
@@ -375,14 +383,6 @@ void free_insn_page(void *page);
#else /* !CONFIG_KPROBES: */
-static inline int kprobes_built_in(void)
-{
- return 0;
-}
-static inline int kprobe_fault_handler(struct pt_regs *regs, int trapnr)
-{
- return 0;
-}
static inline struct kprobe *get_kprobe(void *addr)
{
return NULL;
@@ -458,12 +458,11 @@ static inline bool is_kprobe_optinsn_slot(unsigned long addr)
}
#endif
+#ifdef CONFIG_KPROBES
/* Returns true if kprobes handled the fault */
static nokprobe_inline bool kprobe_page_fault(struct pt_regs *regs,
unsigned int trap)
{
- if (!kprobes_built_in())
- return false;
if (user_mode(regs))
return false;
/*
@@ -476,5 +475,12 @@ static nokprobe_inline bool kprobe_page_fault(struct pt_regs *regs,
return false;
return kprobe_fault_handler(regs, trap);
}
+#else
+static nokprobe_inline bool kprobe_page_fault(struct pt_regs *regs,
+ unsigned int trap)
+{
+ return false;
+}
+#endif
#endif /* _LINUX_KPROBES_H */
--
2.20.1
^ permalink raw reply related
* Re: [PATCH 18/39] docs: admin-guide: add kdump documentation into it
From: Dave Young @ 2019-07-05 5:55 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Rich Felker, Linux Doc Mailing List, Catalin Marinas,
Jerry Hoemann, Harry Wei, Paul Mackerras, H. Peter Anvin,
Alex Shi, Will Deacon, Yoshinori Sato, Jonathan Corbet, linux-sh,
x86, Russell King, Ingo Molnar, Guenter Roeck, linux-watchdog,
Mauro Carvalho Chehab, Borislav Petkov, Thomas Gleixner,
Wim Van Sebroeck, linux-arm-kernel, Baoquan He, kexec,
linux-kernel, Vivek Goyal, linuxppc-dev
In-Reply-To: <654e7591c044632c06257e0f069a52c0bb993554.1561724493.git.mchehab+samsung@kernel.org>
On 06/28/19 at 09:30am, Mauro Carvalho Chehab wrote:
> The Kdump documentation describes procedures with admins use
> in order to solve issues on their systems.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
> ---
> Documentation/admin-guide/bug-hunting.rst | 4 ++--
> Documentation/admin-guide/index.rst | 1 +
> Documentation/{ => admin-guide}/kdump/gdbmacros.txt | 0
> Documentation/{ => admin-guide}/kdump/index.rst | 1 -
> Documentation/{ => admin-guide}/kdump/kdump.rst | 0
> Documentation/{ => admin-guide}/kdump/vmcoreinfo.rst | 0
> Documentation/admin-guide/kernel-parameters.txt | 6 +++---
> Documentation/powerpc/firmware-assisted-dump.rst | 2 +-
> Documentation/translations/zh_CN/oops-tracing.txt | 4 ++--
> Documentation/watchdog/hpwdt.rst | 2 +-
> MAINTAINERS | 2 +-
> arch/arm/Kconfig | 2 +-
> arch/arm64/Kconfig | 2 +-
> arch/sh/Kconfig | 2 +-
> arch/x86/Kconfig | 4 ++--
> 15 files changed, 16 insertions(+), 16 deletions(-)
> rename Documentation/{ => admin-guide}/kdump/gdbmacros.txt (100%)
> rename Documentation/{ => admin-guide}/kdump/index.rst (97%)
> rename Documentation/{ => admin-guide}/kdump/kdump.rst (100%)
> rename Documentation/{ => admin-guide}/kdump/vmcoreinfo.rst (100%)
>
> diff --git a/Documentation/admin-guide/bug-hunting.rst b/Documentation/admin-guide/bug-hunting.rst
> index b761aa2a51d2..44b8a4edd348 100644
> --- a/Documentation/admin-guide/bug-hunting.rst
> +++ b/Documentation/admin-guide/bug-hunting.rst
> @@ -90,9 +90,9 @@ the disk is not available then you have three options:
> run a null modem to a second machine and capture the output there
> using your favourite communication program. Minicom works well.
>
> -(3) Use Kdump (see Documentation/kdump/kdump.rst),
> +(3) Use Kdump (see Documentation/admin-guide/kdump/kdump.rst),
> extract the kernel ring buffer from old memory with using dmesg
> - gdbmacro in Documentation/kdump/gdbmacros.txt.
> + gdbmacro in Documentation/admin-guide/kdump/gdbmacros.txt.
>
> Finding the bug's location
> --------------------------
> diff --git a/Documentation/admin-guide/index.rst b/Documentation/admin-guide/index.rst
> index 9899b78dbe50..65e821a03aca 100644
> --- a/Documentation/admin-guide/index.rst
> +++ b/Documentation/admin-guide/index.rst
> @@ -39,6 +39,7 @@ problems and bugs in particular.
> ramoops
> dynamic-debug-howto
> init
> + kdump/index
> perf/index
>
> This is the beginning of a section with information of interest to
> diff --git a/Documentation/kdump/gdbmacros.txt b/Documentation/admin-guide/kdump/gdbmacros.txt
> similarity index 100%
> rename from Documentation/kdump/gdbmacros.txt
> rename to Documentation/admin-guide/kdump/gdbmacros.txt
> diff --git a/Documentation/kdump/index.rst b/Documentation/admin-guide/kdump/index.rst
> similarity index 97%
> rename from Documentation/kdump/index.rst
> rename to Documentation/admin-guide/kdump/index.rst
> index 2b17fcf6867a..8e2ebd0383cd 100644
> --- a/Documentation/kdump/index.rst
> +++ b/Documentation/admin-guide/kdump/index.rst
> @@ -1,4 +1,3 @@
> -:orphan:
>
> ================================================================
> Documentation for Kdump - The kexec-based Crash Dumping Solution
> diff --git a/Documentation/kdump/kdump.rst b/Documentation/admin-guide/kdump/kdump.rst
> similarity index 100%
> rename from Documentation/kdump/kdump.rst
> rename to Documentation/admin-guide/kdump/kdump.rst
> diff --git a/Documentation/kdump/vmcoreinfo.rst b/Documentation/admin-guide/kdump/vmcoreinfo.rst
> similarity index 100%
> rename from Documentation/kdump/vmcoreinfo.rst
> rename to Documentation/admin-guide/kdump/vmcoreinfo.rst
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index e38b96d061f4..9b535c0e22f3 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -708,14 +708,14 @@
> [KNL, x86_64] select a region under 4G first, and
> fall back to reserve region above 4G when '@offset'
> hasn't been specified.
> - See Documentation/kdump/kdump.rst for further details.
> + See Documentation/admin-guide/kdump/kdump.rst for further details.
>
> crashkernel=range1:size1[,range2:size2,...][@offset]
> [KNL] Same as above, but depends on the memory
> in the running system. The syntax of range is
> start-[end] where start and end are both
> a memory unit (amount[KMG]). See also
> - Documentation/kdump/kdump.rst for an example.
> + Documentation/admin-guide/kdump/kdump.rst for an example.
>
> crashkernel=size[KMG],high
> [KNL, x86_64] range could be above 4G. Allow kernel
> @@ -1207,7 +1207,7 @@
> Specifies physical address of start of kernel core
> image elf header and optionally the size. Generally
> kexec loader will pass this option to capture kernel.
> - See Documentation/kdump/kdump.rst for details.
> + See Documentation/admin-guide/kdump/kdump.rst for details.
>
> enable_mtrr_cleanup [X86]
> The kernel tries to adjust MTRR layout from continuous
> diff --git a/Documentation/powerpc/firmware-assisted-dump.rst b/Documentation/powerpc/firmware-assisted-dump.rst
> index d7fa7c35dd12..9ca12830a48e 100644
> --- a/Documentation/powerpc/firmware-assisted-dump.rst
> +++ b/Documentation/powerpc/firmware-assisted-dump.rst
> @@ -61,7 +61,7 @@ as follows:
> the default calculated size. Use this option if default
> boot memory size is not sufficient for second kernel to
> boot successfully. For syntax of crashkernel= parameter,
> - refer to Documentation/kdump/kdump.rst. If any offset is
> + refer to Documentation/admin-guide/kdump/kdump.rst. If any offset is
> provided in crashkernel= parameter, it will be ignored
> as fadump uses a predefined offset to reserve memory
> for boot memory dump preservation in case of a crash.
> diff --git a/Documentation/translations/zh_CN/oops-tracing.txt b/Documentation/translations/zh_CN/oops-tracing.txt
> index 368ddd05b304..c5f3bda7abcb 100644
> --- a/Documentation/translations/zh_CN/oops-tracing.txt
> +++ b/Documentation/translations/zh_CN/oops-tracing.txt
> @@ -53,8 +53,8 @@ cat /proc/kmsg > file, 然而你必须介入中止传输, kmsg是一个“
> (2)用串口终端启动(请参看Documentation/admin-guide/serial-console.rst),运行一个null
> modem到另一台机器并用你喜欢的通讯工具获取输出。Minicom工作地很好。
>
> -(3)使用Kdump(请参看Documentation/kdump/kdump.rst),
> -使用在Documentation/kdump/gdbmacros.txt中定义的dmesg gdb宏,从旧的内存中提取内核
> +(3)使用Kdump(请参看Documentation/admin-guide/kdump/kdump.rst),
> +使用在Documentation/admin-guide/kdump/gdbmacros.txt中定义的dmesg gdb宏,从旧的内存中提取内核
> 环形缓冲区。
>
> 完整信息
> diff --git a/Documentation/watchdog/hpwdt.rst b/Documentation/watchdog/hpwdt.rst
> index 94a96371113e..49c647dba8aa 100644
> --- a/Documentation/watchdog/hpwdt.rst
> +++ b/Documentation/watchdog/hpwdt.rst
> @@ -59,7 +59,7 @@ Last reviewed: 08/20/2018
> and loop forever. This is generally not what a watchdog user wants.
>
> For those wishing to learn more please see:
> - Documentation/kdump/kdump.rst
> + Documentation/admin-guide/kdump/kdump.rst
> Documentation/admin-guide/kernel-parameters.txt (panic=)
> Your Linux Distribution specific documentation.
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index d35ff73f718a..4c622a19ab7d 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -8622,7 +8622,7 @@ R: Vivek Goyal <vgoyal@redhat.com>
> L: kexec@lists.infradead.org
> W: http://lse.sourceforge.net/kdump/
> S: Maintained
> -F: Documentation/kdump/
> +F: Documentation/admin-guide/kdump/
>
> KEENE FM RADIO TRANSMITTER DRIVER
> M: Hans Verkuil <hverkuil@xs4all.nl>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 8bf8985ec667..d5bd4350fcbd 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -2025,7 +2025,7 @@ config CRASH_DUMP
> kdump/kexec. The crash dump kernel must be compiled to a
> memory address not used by the main kernel
>
> - For more details see Documentation/kdump/kdump.rst
> + For more details see Documentation/admin-guide/kdump/kdump.rst
>
> config AUTO_ZRELADDR
> bool "Auto calculation of the decompressed kernel image address"
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index accb045997c6..e1ea69994e0f 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -997,7 +997,7 @@ config CRASH_DUMP
> reserved region and then later executed after a crash by
> kdump/kexec.
>
> - For more details see Documentation/kdump/kdump.rst
> + For more details see Documentation/admin-guide/kdump/kdump.rst
>
> config XEN_DOM0
> def_bool y
> diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
> index 31a7d12db705..c2858ac6a46a 100644
> --- a/arch/sh/Kconfig
> +++ b/arch/sh/Kconfig
> @@ -626,7 +626,7 @@ config CRASH_DUMP
> to a memory address not used by the main kernel using
> PHYSICAL_START.
>
> - For more details see Documentation/kdump/kdump.rst
> + For more details see Documentation/admin-guide/kdump/kdump.rst
>
> config KEXEC_JUMP
> bool "kexec jump (EXPERIMENTAL)"
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index c9d59ca5e3ac..489fd833b980 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -2057,7 +2057,7 @@ config CRASH_DUMP
> to a memory address not used by the main kernel or BIOS using
> PHYSICAL_START, or it must be built as a relocatable image
> (CONFIG_RELOCATABLE=y).
> - For more details see Documentation/kdump/kdump.rst
> + For more details see Documentation/admin-guide/kdump/kdump.rst
>
> config KEXEC_JUMP
> bool "kexec jump"
> @@ -2094,7 +2094,7 @@ config PHYSICAL_START
> the reserved region. In other words, it can be set based on
> the "X" value as specified in the "crashkernel=YM@XM"
> command line boot parameter passed to the panic-ed
> - kernel. Please take a look at Documentation/kdump/kdump.rst
> + kernel. Please take a look at Documentation/admin-guide/kdump/kdump.rst
> for more details about crash dumps.
>
> Usage of bzImage for capturing the crash dump is recommended as
> --
> 2.21.0
>
Acked-by: Dave Young <dyoung@redhat.com>
Thanks
Dave
^ permalink raw reply
* Re: [PATCH 18/39] docs: admin-guide: add kdump documentation into it
From: Dave Young @ 2019-07-05 5:59 UTC (permalink / raw)
To: Alex Shi
Cc: Rich Felker, Linux Doc Mailing List, Catalin Marinas,
Jerry Hoemann, Harry Wei, Paul Mackerras, H. Peter Anvin,
Mauro Carvalho Chehab, Will Deacon, Yoshinori Sato,
Jonathan Corbet, linux-sh, x86, Russell King, Ingo Molnar,
Guenter Roeck, linux-watchdog, Mauro Carvalho Chehab,
Borislav Petkov, Thomas Gleixner, Wim Van Sebroeck,
linux-arm-kernel, Baoquan He, kexec, linux-kernel, Vivek Goyal,
linuxppc-dev
In-Reply-To: <6911b74c-848f-0060-3db5-b5d7e8061cb5@linux.alibaba.com>
On 07/05/19 at 11:43am, Alex Shi wrote:
>
>
> 在 2019/6/28 下午8:30, Mauro Carvalho Chehab 写道:
> > The Kdump documentation describes procedures with admins use
> > in order to solve issues on their systems.
> >
> > Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
> > ---
> > Documentation/admin-guide/bug-hunting.rst | 4 ++--
> > Documentation/admin-guide/index.rst | 1 +
> > Documentation/{ => admin-guide}/kdump/gdbmacros.txt | 0
> > Documentation/{ => admin-guide}/kdump/index.rst | 1 -
> > Documentation/{ => admin-guide}/kdump/kdump.rst | 0
> > Documentation/{ => admin-guide}/kdump/vmcoreinfo.rst | 0
>
> I am not sure if it's convenience for people to have more levels in docs.
>
> But I guess, move archs into a Documentation/arch/ dir should be fine. like Documentation/arch/{x86,arm,arm64,ia64,m68k,s390,powerpc,...}
Alex, moving kdump to admin-guide sounds reasonable to me. I also agree
with you for those arch dependent files can be moved to
Documentation/arch/, maybe you are talking about some other patches in
the series for the arch/?
Thanks
dave
^ permalink raw reply
* Re: [PATCH 2/2] powerpc: expose secure variables via sysfs
From: Michael Ellerman @ 2019-07-05 6:05 UTC (permalink / raw)
To: Nayna Jain, linuxppc-dev, linux-efi
Cc: Ard Biesheuvel, Eric Ricther, Nayna Jain, linux-kernel,
Mimi Zohar, Claudio Carvalho, Matthew Garret, Paul Mackerras,
Jeremy Kerr, Elaine Palmer, Greg Kroah-Hartman, linux-integrity,
George Wilson
In-Reply-To: <1560459027-5248-3-git-send-email-nayna@linux.ibm.com>
Hi Nayna,
Nayna Jain <nayna@linux.ibm.com> writes:
> As part of PowerNV secure boot support, OS verification keys are stored
> and controlled by OPAL as secure variables. These need to be exposed to
> the userspace so that sysadmins can perform key management tasks.
>
> This patch adds the support to expose secure variables via a sysfs
> interface It reuses the the existing efi defined hooks and backend in
> order to maintain the compatibility with the userspace tools.
Which tools? Can you include a log demonstrating how they're used, ie.
so that I can test the sequence of commands.
> Though it reuses a great deal of efi, POWER platforms do not use EFI.
> A new config, POWER_SECVAR_SYSFS, is defined to enable this new sysfs
> interface.
Sorry I haven't been able to keep up with all the discussions, but I
thought the consensus was that pretending to be EFI-like was a bad idea,
because we don't have actual EFI and we're not implementing an entirely
compatible scheme to EFI anyway.
Greg suggested just putting the variables in sysfs, why does that not
work? Matthew mentioned "complex semantics around variable deletion and
immutability" but do we have to emulate those semantics on powerpc?
cheers
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index 9de77bb14f54..1548dd8cf1a0 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -916,6 +916,8 @@ config PPC_SECURE_BOOT
> allows user to enable OS Secure Boot on PowerPC systems that
> have firmware secure boot support.
>
> +source "drivers/firmware/powerpc/Kconfig"
> +
> endmenu
>
> config ISA_DMA_API
> diff --git a/drivers/firmware/Makefile b/drivers/firmware/Makefile
> index 3fa0b34eb72f..8cfaf7e6769d 100644
> --- a/drivers/firmware/Makefile
> +++ b/drivers/firmware/Makefile
> @@ -33,3 +33,4 @@ obj-$(CONFIG_UEFI_CPER) += efi/
> obj-y += imx/
> obj-y += tegra/
> obj-y += xilinx/
> +obj-$(CONFIG_POWER_SECVAR_SYSFS) += powerpc/
> diff --git a/drivers/firmware/efi/efivars.c b/drivers/firmware/efi/efivars.c
> index 7576450c8254..30ef53003c24 100644
> --- a/drivers/firmware/efi/efivars.c
> +++ b/drivers/firmware/efi/efivars.c
> @@ -664,7 +664,7 @@ int efivars_sysfs_init(void)
> struct kobject *parent_kobj = efivars_kobject();
> int error = 0;
>
> - if (!efi_enabled(EFI_RUNTIME_SERVICES))
> + if (IS_ENABLED(CONFIG_EFI) && !efi_enabled(EFI_RUNTIME_SERVICES))
> return -ENODEV;
>
> /* No efivars has been registered yet */
> diff --git a/drivers/firmware/powerpc/Kconfig b/drivers/firmware/powerpc/Kconfig
> new file mode 100644
> index 000000000000..e0303fc517d5
> --- /dev/null
> +++ b/drivers/firmware/powerpc/Kconfig
> @@ -0,0 +1,12 @@
> +config POWER_SECVAR_SYSFS
> + tristate "Enable sysfs interface for POWER secure variables"
> + default n
> + depends on PPC_SECURE_BOOT
> + select UCS2_STRING
> + help
> + POWER secure variables are managed and controlled by OPAL.
> + These variables are exposed to userspace via sysfs to allow
> + user to read/write these variables. Say Y if you have secure
> + boot enabled and want to expose variables to userspace.
> +
> +source "drivers/firmware/efi/Kconfig"
> diff --git a/drivers/firmware/powerpc/Makefile b/drivers/firmware/powerpc/Makefile
> new file mode 100644
> index 000000000000..d5fa3b007315
> --- /dev/null
> +++ b/drivers/firmware/powerpc/Makefile
> @@ -0,0 +1,3 @@
> +# SPDX-License-Identifier: GPL-2.0
> +
> +obj-$(CONFIG_POWER_SECVAR_SYSFS) += ../efi/efivars.o efi_error.o ../efi/vars.o secvar.o
> diff --git a/drivers/firmware/powerpc/efi_error.c b/drivers/firmware/powerpc/efi_error.c
> new file mode 100644
> index 000000000000..b5cabd52e6b4
> --- /dev/null
> +++ b/drivers/firmware/powerpc/efi_error.c
> @@ -0,0 +1,46 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (C) 2019 IBM Corporation
> + * Author: Nayna Jain <nayna@linux.ibm.com>
> + *
> + * efi_error.c
> + * - Error codes as understood by efi based tools
> + * Taken from drivers/firmware/efi/efi.c
> + */
> +#include<linux/efi.h>
> +
> +int efi_status_to_err(efi_status_t status)
> +{
> + int err;
> +
> + switch (status) {
> + case EFI_SUCCESS:
> + err = 0;
> + break;
> + case EFI_INVALID_PARAMETER:
> + err = -EINVAL;
> + break;
> + case EFI_OUT_OF_RESOURCES:
> + err = -ENOSPC;
> + break;
> + case EFI_DEVICE_ERROR:
> + err = -EIO;
> + break;
> + case EFI_WRITE_PROTECTED:
> + err = -EROFS;
> + break;
> + case EFI_SECURITY_VIOLATION:
> + err = -EACCES;
> + break;
> + case EFI_NOT_FOUND:
> + err = -ENOENT;
> + break;
> + case EFI_ABORTED:
> + err = -EINTR;
> + break;
> + default:
> + err = -EINVAL;
> + }
> +
> + return err;
> +}
> diff --git a/drivers/firmware/powerpc/secvar.c b/drivers/firmware/powerpc/secvar.c
> new file mode 100644
> index 000000000000..f1f134a0bb7c
> --- /dev/null
> +++ b/drivers/firmware/powerpc/secvar.c
> @@ -0,0 +1,326 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (C) 2019 IBM Corporation
> + * Author: Nayna Jain <nayna@linux.ibm.com>
> + *
> + * secvar.c
> + * - wrappers to expose secure variables to userspace
> + */
> +#include <linux/kernel.h>
> +#include <linux/init.h>
> +#include <linux/types.h>
> +#include <linux/errno.h>
> +#include <linux/string.h>
> +#include <linux/spinlock.h>
> +#include <linux/fs.h>
> +#include <linux/slab.h>
> +#include <linux/ioctl.h>
> +#include <linux/uaccess.h>
> +#include <linux/kdebug.h>
> +#include <linux/efi.h>
> +#include <linux/module.h>
> +#include <linux/ucs2_string.h>
> +#include <asm/opal-secvar.h>
> +#include <asm/opal.h>
> +
> +static struct efivars efivars;
> +struct kobject *powerpc_kobj;
> +
> +efi_status_t opal_to_efi_status_log(int rc, const char *func_name)
> +{
> + efi_status_t status;
> +
> + switch (rc) {
> + case OPAL_EMPTY:
> + status = EFI_NOT_FOUND;
> + break;
> + case OPAL_HARDWARE:
> + status = EFI_DEVICE_ERROR;
> + break;
> + case OPAL_NO_MEM:
> + pr_err("%s: No space in the volatile storage\n", func_name);
> + status = EFI_OUT_OF_RESOURCES;
> + break;
> + case OPAL_PARAMETER:
> + status = EFI_INVALID_PARAMETER;
> + break;
> + case OPAL_PARTIAL:
> + status = EFI_BUFFER_TOO_SMALL;
> + break;
> + case OPAL_PERMISSION:
> + status = EFI_WRITE_PROTECTED;
> + break;
> + case OPAL_RESOURCE:
> + pr_err("%s: No space in the non-volatile storage\n", func_name);
> + status = EFI_OUT_OF_RESOURCES;
> + break;
> + case OPAL_SUCCESS:
> + status = EFI_SUCCESS;
> + break;
> + default:
> + pr_err("%s: Unknown OPAL error %d\n", func_name, rc);
> + status = EFI_DEVICE_ERROR;
> + break;
> + }
> +
> + return status;
> +}
> +
> +#define opal_to_efi_status(rc) opal_to_efi_status_log(rc, __func__)
> +
> +static void createkey(efi_char16_t *name, u8 **key, unsigned long *keylen)
> +{
> + *keylen = ucs2_utf8size(name) + 1;
> +
> + *key = kzalloc(*keylen, GFP_KERNEL);
> + if (!*key) {
> + *keylen = 0;
> + *key = NULL;
> + return;
> + }
> +
> + ucs2_as_utf8(*key, name, *keylen);
> +}
> +
> +static void createmetadata(efi_char16_t *name, efi_guid_t *vendor, u32 *attr,
> + u8 **mdata, unsigned long *mdsize)
> +{
> + int size = 0;
> +
> + *mdsize = ucs2_strsize(name, 1024) + sizeof(efi_guid_t) + sizeof(u32);
> + *mdata = kzalloc(*mdsize, GFP_KERNEL);
> +
> + memcpy(*mdata, name, ucs2_strsize(name, 1024));
> + size = ucs2_strsize(name, 1024);
> +
> + memcpy(*mdata + size, vendor, sizeof(efi_guid_t));
> + size += sizeof(efi_guid_t);
> +
> + if (attr != NULL)
> + memcpy(*mdata + size, attr, sizeof(u32));
> + else
> + memset(*mdata + size, 0, sizeof(u32));
> +}
> +
> +static int convert_buffer_to_efi_guid(u8 *buffer, efi_guid_t *guid)
> +{
> + u32 *a1;
> + u16 *a2;
> + u16 *a3;
> +
> + a1 = kzalloc(4, GFP_KERNEL);
> + memcpy(a1, buffer, 4);
> + *a1 = be32_to_cpu(*a1);
> +
> + a2 = kzalloc(2, GFP_KERNEL);
> + memcpy(a2, buffer+4, 2);
> + *a2 = be16_to_cpu(*a2);
> +
> + a3 = kzalloc(2, GFP_KERNEL);
> + memcpy(a3, buffer+6, 2);
> + *a3 = be16_to_cpu(*a3);
> +
> + *guid = EFI_GUID(*a1, *a2, *a3, *(buffer + 8),
> + *(buffer + 9),
> + *(buffer + 10),
> + *(buffer + 11),
> + *(buffer + 12),
> + *(buffer + 13),
> + *(buffer + 14),
> + *(buffer + 15));
> +
> + kfree(a1);
> + kfree(a2);
> + kfree(a3);
> + return 0;
> +}
> +
> +static efi_status_t powerpc_get_variable(efi_char16_t *name, efi_guid_t *vendor,
> + u32 *attr, unsigned long *data_size,
> + void *data)
> +{
> + int rc;
> + u8 *key;
> + unsigned long keylen;
> + u8 *metadata;
> + unsigned long mdsize;
> + unsigned long dsize;
> + unsigned long namesize;
> +
> + if (!name)
> + return EFI_INVALID_PARAMETER;
> +
> + if (!vendor)
> + return EFI_INVALID_PARAMETER;
> +
> + if (*data_size == 0) {
> + /* If *data_size is zero, it implies data size is being asked */
> + createkey(name, &key, &keylen);
> + rc = opal_get_variable_size(key, keylen, &mdsize, &dsize);
> + *data_size = dsize;
> + kfree(key);
> + return opal_to_efi_status(rc);
> + }
> +
> + createkey(name, &key, &keylen);
> + createmetadata(name, vendor, attr, &metadata, &mdsize);
> +
> + rc = opal_get_variable(key, keylen, metadata, &mdsize, data, data_size);
> +
> + if (rc)
> + return opal_to_efi_status(rc);
> +
> + if (mdsize > 0) {
> + namesize = mdsize - sizeof(efi_guid_t) - sizeof(u32);
> + if (!attr)
> + return opal_to_efi_status(rc);
> + memset(attr, 0, sizeof(u32));
> + memcpy(attr, metadata + namesize + sizeof(efi_guid_t),
> + sizeof(u32));
> + *attr = be32_to_cpu(*attr);
> + }
> +
> + kfree(key);
> + kfree(metadata);
> +
> + return opal_to_efi_status(rc);
> +}
> +
> +
> +static efi_status_t powerpc_get_next_variable(unsigned long *name_size,
> + efi_char16_t *name,
> + efi_guid_t *vendor)
> +{
> + int rc;
> + u8 *key;
> + int namesize;
> + unsigned long keylen;
> + unsigned long keysize = 1024;
> + unsigned long *mdsize;
> + u8 *mdata = NULL;
> + efi_guid_t guid;
> +
> + if (ucs2_strnlen(name, 1024) > 0) {
> + createkey(name, &key, &keylen);
> + } else {
> + keylen = 0;
> + key = kzalloc(1024, GFP_KERNEL);
> + }
> +
> + pr_info("%s: powerpc get next variable, key is %s\n", __func__, key);
> +
> + rc = opal_get_next_variable(key, &keylen, keysize);
> + if (rc) {
> + kfree(key);
> + return opal_to_efi_status(rc);
> + }
> +
> + mdsize = kzalloc(sizeof(unsigned long), GFP_KERNEL);
> + rc = opal_get_variable_size(key, keylen, mdsize, NULL);
> + if (rc)
> + goto out;
> +
> + if (*mdsize <= 0)
> + goto out;
> +
> + mdata = kzalloc(*mdsize, GFP_KERNEL);
> +
> + rc = opal_get_variable(key, keylen, mdata, mdsize, NULL, NULL);
> + if (rc)
> + goto out;
> +
> + if (*mdsize > 0) {
> + namesize = *mdsize - sizeof(efi_guid_t) - sizeof(u32);
> + if (namesize > 0) {
> + memset(&guid, 0, sizeof(efi_guid_t));
> + convert_buffer_to_efi_guid(mdata + namesize, &guid);
> + memcpy(vendor, &guid, sizeof(efi_guid_t));
> + memset(name, 0, namesize + 2);
> + memcpy(name, mdata, namesize);
> + *name_size = namesize + 2;
> + name[namesize++] = 0;
> + name[namesize] = 0;
> + }
> + }
> +
> +out:
> + kfree(mdsize);
> + kfree(mdata);
> +
> + return opal_to_efi_status(rc);
> +}
> +
> +static efi_status_t powerpc_set_variable(efi_char16_t *name, efi_guid_t *vendor,
> + u32 attr, unsigned long data_size,
> + void *data)
> +{
> + int rc;
> + u8 *key;
> + unsigned long keylen;
> + u8 *metadata;
> + unsigned long mdsize;
> +
> + if (!name)
> + return EFI_INVALID_PARAMETER;
> +
> + if (!vendor)
> + return EFI_INVALID_PARAMETER;
> +
> + createkey(name, &key, &keylen);
> + pr_info("%s: nayna key is %s\n", __func__, key);
> +
> + createmetadata(name, vendor, &attr, &metadata, &mdsize);
> +
> + rc = opal_set_variable(key, keylen, metadata, mdsize, data, data_size);
> +
> + return opal_to_efi_status(rc);
> +}
> +
> +
> +static const struct efivar_operations efivar_ops = {
> + .get_variable = powerpc_get_variable,
> + .set_variable = powerpc_set_variable,
> + .get_next_variable = powerpc_get_next_variable,
> +};
> +
> +
> +static __init int power_secvar_init(void)
> +{
> + int rc = 0;
> + unsigned long ver = 0;
> +
> + rc = opal_variable_version(&ver);
> + if (ver != BACKEND_TC_COMPAT_V1) {
> + pr_info("Compatible backend unsupported\n");
> + return -1;
> + }
> +
> + powerpc_kobj = kobject_create_and_add("secvar", firmware_kobj);
> + if (!powerpc_kobj) {
> + pr_info("secvar: Failed to create firmware kobj\n");
> + goto out_err;
> + }
> +
> + rc = efivars_register(&efivars, &efivar_ops, powerpc_kobj);
> + if (rc) {
> + pr_info("powerpc: Failed to register efivars\n");
> + return rc;
> + }
> +
> + return 0;
> +out_err:
> + kobject_put(powerpc_kobj);
> + pr_info("powerpc: failed to load: %d\n", rc);
> + return rc;
> +}
> +arch_initcall(power_secvar_init);
> +
> +static void __exit power_secvar_exit(void)
> +{
> + efivars_unregister(&efivars);
> + kobject_put(powerpc_kobj);
> +}
> +module_exit(power_secvar_exit);
> +
> +MODULE_AUTHOR("Nayna Jain");
> +MODULE_LICENSE("GPL");
> --
> 2.20.1
^ permalink raw reply
* [PATCH 2/3] powerpc: unify definition of M_IF_NEEDED
From: Jason Yan @ 2019-07-05 6:39 UTC (permalink / raw)
To: mpe, linuxppc-dev; +Cc: Jason Yan
In-Reply-To: <20190705063954.11674-1-yanaijie@huawei.com>
M_IF_NEEDED is defined too many times. Move it to a common place.
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
arch/powerpc/include/asm/nohash/mmu-book3e.h | 10 ++++++++++
arch/powerpc/kernel/exceptions-64e.S | 10 ----------
arch/powerpc/kernel/fsl_booke_entry_mapping.S | 10 ----------
arch/powerpc/kernel/misc_64.S | 5 -----
4 files changed, 10 insertions(+), 25 deletions(-)
diff --git a/arch/powerpc/include/asm/nohash/mmu-book3e.h b/arch/powerpc/include/asm/nohash/mmu-book3e.h
index 4c9777d256fb..0877362e48fa 100644
--- a/arch/powerpc/include/asm/nohash/mmu-book3e.h
+++ b/arch/powerpc/include/asm/nohash/mmu-book3e.h
@@ -221,6 +221,16 @@
#define TLBILX_T_CLASS2 6
#define TLBILX_T_CLASS3 7
+/*
+ * The mapping only needs to be cache-coherent on SMP, except on
+ * Freescale e500mc derivatives where it's also needed for coherent DMA.
+ */
+#if defined(CONFIG_SMP) || defined(CONFIG_PPC_E500MC)
+#define M_IF_NEEDED MAS2_M
+#else
+#define M_IF_NEEDED 0
+#endif
+
#ifndef __ASSEMBLY__
#include <asm/bug.h>
diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
index 1cfb3da4a84a..fd49ec07ce4a 100644
--- a/arch/powerpc/kernel/exceptions-64e.S
+++ b/arch/powerpc/kernel/exceptions-64e.S
@@ -1342,16 +1342,6 @@ skpinv: addi r6,r6,1 /* Increment */
sync
isync
-/*
- * The mapping only needs to be cache-coherent on SMP, except on
- * Freescale e500mc derivatives where it's also needed for coherent DMA.
- */
-#if defined(CONFIG_SMP) || defined(CONFIG_PPC_E500MC)
-#define M_IF_NEEDED MAS2_M
-#else
-#define M_IF_NEEDED 0
-#endif
-
/* 6. Setup KERNELBASE mapping in TLB[0]
*
* r3 = MAS0 w/TLBSEL & ESEL for the entry we started in
diff --git a/arch/powerpc/kernel/fsl_booke_entry_mapping.S b/arch/powerpc/kernel/fsl_booke_entry_mapping.S
index 235ae622e2ab..2b6c143d0d8b 100644
--- a/arch/powerpc/kernel/fsl_booke_entry_mapping.S
+++ b/arch/powerpc/kernel/fsl_booke_entry_mapping.S
@@ -153,16 +153,6 @@ skpinv: addi r6,r6,1 /* Increment */
tlbivax 0,r9
TLBSYNC
-/*
- * The mapping only needs to be cache-coherent on SMP, except on
- * Freescale e500mc derivatives where it's also needed for coherent DMA.
- */
-#if defined(CONFIG_SMP) || defined(CONFIG_PPC_E500MC)
-#define M_IF_NEEDED MAS2_M
-#else
-#define M_IF_NEEDED 0
-#endif
-
#if defined(ENTRY_MAPPING_BOOT_SETUP)
/* 6. Setup KERNELBASE mapping in TLB1[0] */
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S
index 1ad4089dd110..f1bd82ce62fa 100644
--- a/arch/powerpc/kernel/misc_64.S
+++ b/arch/powerpc/kernel/misc_64.S
@@ -484,11 +484,6 @@ kexec_create_tlb:
rlwimi r9,r10,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r9) */
/* Set up a temp identity mapping v:0 to p:0 and return to it. */
-#if defined(CONFIG_SMP) || defined(CONFIG_PPC_E500MC)
-#define M_IF_NEEDED MAS2_M
-#else
-#define M_IF_NEEDED 0
-#endif
mtspr SPRN_MAS0,r9
lis r9,(MAS1_VALID|MAS1_IPROT)@h
--
2.17.2
^ permalink raw reply related
* [PATCH 0/3] some misc tidy-up
From: Jason Yan @ 2019-07-05 6:39 UTC (permalink / raw)
To: mpe, linuxppc-dev; +Cc: Jason Yan
Unify some definitions and micros. No functional change.
Jason Yan (3):
powerpc/fsl_booke: replace PAGE_OFFSET with KERNELBASE
powerpc: unify definition of M_IF_NEEDED
powerpc: move memstart_addr and kernstart_addr to init-common.c
arch/powerpc/include/asm/nohash/mmu-book3e.h | 10 ++++++++++
arch/powerpc/kernel/exceptions-64e.S | 10 ----------
arch/powerpc/kernel/fsl_booke_entry_mapping.S | 14 ++------------
arch/powerpc/kernel/misc_64.S | 5 -----
arch/powerpc/mm/init-common.c | 5 +++++
arch/powerpc/mm/init_32.c | 5 -----
arch/powerpc/mm/init_64.c | 5 -----
7 files changed, 17 insertions(+), 37 deletions(-)
--
2.17.2
^ permalink raw reply
* [PATCH 3/3] powerpc: move memstart_addr and kernstart_addr to init-common.c
From: Jason Yan @ 2019-07-05 6:39 UTC (permalink / raw)
To: mpe, linuxppc-dev; +Cc: Jason Yan
In-Reply-To: <20190705063954.11674-1-yanaijie@huawei.com>
These two variables are both defined in init_32.c and init_64.c. Move
them to init-common.c.
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
arch/powerpc/mm/init-common.c | 5 +++++
arch/powerpc/mm/init_32.c | 5 -----
arch/powerpc/mm/init_64.c | 5 -----
3 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/arch/powerpc/mm/init-common.c b/arch/powerpc/mm/init-common.c
index a84da92920f7..9273c38009cb 100644
--- a/arch/powerpc/mm/init-common.c
+++ b/arch/powerpc/mm/init-common.c
@@ -21,6 +21,11 @@
#include <asm/pgtable.h>
#include <asm/kup.h>
+phys_addr_t memstart_addr = (phys_addr_t)~0ull;
+EXPORT_SYMBOL(memstart_addr);
+phys_addr_t kernstart_addr;
+EXPORT_SYMBOL(kernstart_addr);
+
static bool disable_kuep = !IS_ENABLED(CONFIG_PPC_KUEP);
static bool disable_kuap = !IS_ENABLED(CONFIG_PPC_KUAP);
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c
index b04896a88d79..872df48ae41b 100644
--- a/arch/powerpc/mm/init_32.c
+++ b/arch/powerpc/mm/init_32.c
@@ -56,11 +56,6 @@
phys_addr_t total_memory;
phys_addr_t total_lowmem;
-phys_addr_t memstart_addr = (phys_addr_t)~0ull;
-EXPORT_SYMBOL(memstart_addr);
-phys_addr_t kernstart_addr;
-EXPORT_SYMBOL(kernstart_addr);
-
#ifdef CONFIG_RELOCATABLE
/* Used in __va()/__pa() */
long long virt_phys_offset;
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c
index a4e17a979e45..59fe3db82d38 100644
--- a/arch/powerpc/mm/init_64.c
+++ b/arch/powerpc/mm/init_64.c
@@ -63,11 +63,6 @@
#include <mm/mmu_decl.h>
-phys_addr_t memstart_addr = ~0;
-EXPORT_SYMBOL_GPL(memstart_addr);
-phys_addr_t kernstart_addr;
-EXPORT_SYMBOL_GPL(kernstart_addr);
-
#ifdef CONFIG_SPARSEMEM_VMEMMAP
/*
* Given an address within the vmemmap, determine the pfn of the page that
--
2.17.2
^ permalink raw reply related
* [PATCH 1/3] powerpc/fsl_booke: replace PAGE_OFFSET with KERNELBASE
From: Jason Yan @ 2019-07-05 6:39 UTC (permalink / raw)
To: mpe, linuxppc-dev; +Cc: Jason Yan
In-Reply-To: <20190705063954.11674-1-yanaijie@huawei.com>
We setup a mapping in PAGE_OFFSET and jump to KERNELBASE. This is not a
problem when PAGE_OFFSET = KERNELBASE. Replace PAGE_OFFSET with
KERNELBASE here to make it consistent.
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
arch/powerpc/kernel/fsl_booke_entry_mapping.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/fsl_booke_entry_mapping.S b/arch/powerpc/kernel/fsl_booke_entry_mapping.S
index ea065282b303..235ae622e2ab 100644
--- a/arch/powerpc/kernel/fsl_booke_entry_mapping.S
+++ b/arch/powerpc/kernel/fsl_booke_entry_mapping.S
@@ -171,8 +171,8 @@ skpinv: addi r6,r6,1 /* Increment */
lis r6,(MAS1_VALID|MAS1_IPROT)@h
ori r6,r6,(MAS1_TSIZE(BOOK3E_PAGESZ_64M))@l
mtspr SPRN_MAS1,r6
- lis r6,MAS2_VAL(PAGE_OFFSET, BOOK3E_PAGESZ_64M, M_IF_NEEDED)@h
- ori r6,r6,MAS2_VAL(PAGE_OFFSET, BOOK3E_PAGESZ_64M, M_IF_NEEDED)@l
+ lis r6,MAS2_VAL(KERNELBASE, BOOK3E_PAGESZ_64M, M_IF_NEEDED)@h
+ ori r6,r6,MAS2_VAL(KERNELBASE, BOOK3E_PAGESZ_64M, M_IF_NEEDED)@l
mtspr SPRN_MAS2,r6
mtspr SPRN_MAS3,r8
tlbwe
--
2.17.2
^ permalink raw reply related
* Re: [PATCH V2 2/2] ASoC: fsl_esai: recover the channel swap after xrun
From: S.j. Wang @ 2019-07-05 7:03 UTC (permalink / raw)
To: Nicolin Chen
Cc: alsa-devel@alsa-project.org, timur@kernel.org,
Xiubo.Lee@gmail.com, festevam@gmail.com,
linux-kernel@vger.kernel.org, broonie@kernel.org,
linuxppc-dev@lists.ozlabs.org
>
> > +
> > + /* restore registers by regcache_sync */
> > + fsl_esai_register_restore(esai_priv);
> > +
> > + regmap_update_bits(esai_priv->regmap, REG_ESAI_TCR,
> > + ESAI_xCR_xPR_MASK, 0);
> > + regmap_update_bits(esai_priv->regmap, REG_ESAI_RCR,
> > + ESAI_xCR_xPR_MASK, 0);
>
> And just for curious, can (or shall) we stuff this personal reset to the reset()
> function? I found this one is a part of the reset routine being mentioned in
> the RM -- it was done after ESAI reset is done via ECR register.
>
There is a problem to do this, TPR/RPR need to be clear after configure the control
register. (TCCR, TCR). So it seems not only one place (reset function) need to be
changed.
Best regards
Wang shengjiu
^ permalink raw reply
* [PATCH] powerpc/prom: fix use-after-free on cpu_to_chip_id()
From: Wen Yang @ 2019-07-05 9:01 UTC (permalink / raw)
To: linux-kernel
Cc: wang.yi59, Thomas Gleixner, Greg Kroah-Hartman, Aneesh Kumar K.V,
Mike Rapoport, Paul Mackerras, xue.zhihong, cheng.shengyu,
Andrew Morton, linuxppc-dev, Wen Yang
The np variable is still being used after the of_node_put() call,
which may result in use-after-free.
We fix this issue by calling of_node_put() after the last usage.
Fixes: 3eb906c6b6c1 ("powerpc: Make cpu_to_chip_id() available when SMP=n")
Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org
---
arch/powerpc/kernel/prom.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 7159e79..ad87b94 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -872,13 +872,15 @@ EXPORT_SYMBOL(of_get_ibm_chip_id);
int cpu_to_chip_id(int cpu)
{
struct device_node *np;
+ int id;
np = of_get_cpu_node(cpu, NULL);
if (!np)
return -1;
+ id = of_get_ibm_chip_id(np);
of_node_put(np);
- return of_get_ibm_chip_id(np);
+ return id;
}
EXPORT_SYMBOL(cpu_to_chip_id);
--
2.9.5
^ permalink raw reply related
* [PATCH] powerpc/83xx: fix use-after-free on mpc831x_usb_cfg()
From: Wen Yang @ 2019-07-05 8:58 UTC (permalink / raw)
To: linux-kernel
Cc: wang.yi59, Scott Wood, Paul Mackerras, xue.zhihong, cheng.shengyu,
linuxppc-dev, Wen Yang
The np variable is still being used after the of_node_put() call,
which may result in use-after-free.
We fix this issue by calling of_node_put() after the last usage.
This patatch also do some cleanup.
Fixes: fd066e850351 ("powerpc/mpc8308: fix USB DR controller initialization")
Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: Scott Wood <oss@buserror.net>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org
---
arch/powerpc/platforms/83xx/usb.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/arch/powerpc/platforms/83xx/usb.c b/arch/powerpc/platforms/83xx/usb.c
index 3d247d7..56b36fa 100644
--- a/arch/powerpc/platforms/83xx/usb.c
+++ b/arch/powerpc/platforms/83xx/usb.c
@@ -158,14 +158,11 @@ int mpc831x_usb_cfg(void)
iounmap(immap);
- of_node_put(immr_node);
-
/* Map USB SOC space */
ret = of_address_to_resource(np, 0, &res);
- if (ret) {
- of_node_put(np);
- return ret;
- }
+ if (ret)
+ goto out_put_node;
+
usb_regs = ioremap(res.start, resource_size(&res));
/* Using on-chip PHY */
@@ -174,7 +171,7 @@ int mpc831x_usb_cfg(void)
u32 refsel;
if (of_device_is_compatible(immr_node, "fsl,mpc8308-immr"))
- goto out;
+ goto out_unmap;
if (of_device_is_compatible(immr_node, "fsl,mpc8315-immr"))
refsel = CONTROL_REFSEL_24MHZ;
@@ -201,8 +198,10 @@ int mpc831x_usb_cfg(void)
ret = -EINVAL;
}
-out:
+out_unmap:
iounmap(usb_regs);
+out_put_node:
+ of_node_put(immr_node);
of_node_put(np);
return ret;
}
--
2.9.5
^ permalink raw reply related
* [PATCH] powerpc: fix use-after-free on fixup_port_irq()
From: Wen Yang @ 2019-07-05 8:59 UTC (permalink / raw)
To: linux-kernel
Cc: wang.yi59, Rob Herring, Paul Mackerras, xue.zhihong,
cheng.shengyu, linuxppc-dev, Wen Yang
There is a possible use-after-free issue in the fixup_port_irq():
460 static void __init fixup_port_irq(int index,
461 struct device_node *np,
462 struct plat_serial8250_port *port)
463 {
...
469 if (!virq && legacy_serial_infos[index].irq_check_parent) {
470 np = of_get_parent(np); --> modified here.
...
474 of_node_put(np); ---> released here
475 }
...
481 #ifdef CONFIG_SERIAL_8250_FSL
482 if (of_device_is_compatible(np, "fsl,ns16550")) --> dereferenced here
...
484 #endif
485 }
We solve this problem by introducing a new parent_np variable.
Fixes: 9deaa53ac7fa ("serial: add irq handler for Freescale 16550 errata.")
Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Rob Herring <robh@kernel.org>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org
---
arch/powerpc/kernel/legacy_serial.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c
index 7cea597..0105f3e 100644
--- a/arch/powerpc/kernel/legacy_serial.c
+++ b/arch/powerpc/kernel/legacy_serial.c
@@ -461,17 +461,18 @@ static void __init fixup_port_irq(int index,
struct device_node *np,
struct plat_serial8250_port *port)
{
+ struct device_node *parent_np;
unsigned int virq;
DBG("fixup_port_irq(%d)\n", index);
virq = irq_of_parse_and_map(np, 0);
if (!virq && legacy_serial_infos[index].irq_check_parent) {
- np = of_get_parent(np);
- if (np == NULL)
+ parent_np = of_get_parent(np);
+ if (parent_np == NULL)
return;
- virq = irq_of_parse_and_map(np, 0);
- of_node_put(np);
+ virq = irq_of_parse_and_map(parent_np, 0);
+ of_node_put(parent_np);
}
if (!virq)
return;
--
2.9.5
^ permalink raw reply related
* Re: [PATCH v2] powerpc/boot: pass CONFIG options in a simpler and more robust way
From: Masahiro Yamada @ 2019-07-05 9:59 UTC (permalink / raw)
To: Michael Ellerman
Cc: Rob Herring, Linux Kernel Mailing List, Nicholas Piggin,
Mark Greer, Oliver O'Halloran, Joel Stanley, Paul Mackerras,
linuxppc-dev
In-Reply-To: <87v9wibq5z.fsf@concordia.ellerman.id.au>
On Thu, Jul 4, 2019 at 9:26 AM Michael Ellerman <mpe@ellerman.id.au> wrote:
>
> Masahiro Yamada <yamada.masahiro@socionext.com> writes:
>
> > Commit 5e9dcb6188a4 ("powerpc/boot: Expose Kconfig symbols to wrapper")
> > was wrong, but commit e41b93a6be57 ("powerpc/boot: Fix build failures
> > with -j 1") was also wrong.
> >
> > The correct dependency is:
> >
> > $(obj)/serial.o: $(obj)/autoconf.h
> >
> > However, I do not see the reason why we need to copy autoconf.h to
> > arch/power/boot/. Nor do I see consistency in the way of passing
> > CONFIG options.
> >
> > decompress.c references CONFIG_KERNEL_GZIP and CONFIG_KERNEL_XZ, which
> > are passed via the command line.
> >
> > serial.c includes autoconf.h to reference a couple of CONFIG options,
> > but this is fragile because we often forget to include "autoconf.h"
> > from source files.
> >
> > In fact, it is already broken.
> >
> > ppc_asm.h references CONFIG_PPC_8xx, but utils.S is not given any way
> > to access CONFIG options. So, CONFIG_PPC_8xx is never defined here.
> >
> > Pass $(LINUXINCLUDE) to make sure CONFIG options are accessible from
> > all .c and .S files in arch/powerpc/boot/.
>
> This breaks our skiroot_defconfig, I don't know why yet:
>
> In file included from /kisskb/src/arch/powerpc/boot/../../../lib/decompress_unxz.c:236:0,
> from /kisskb/src/arch/powerpc/boot/decompress.c:42:
> /kisskb/src/arch/powerpc/boot/../../../lib/xz/xz_dec_bcj.c: In function 'bcj_powerpc':
> /kisskb/src/arch/powerpc/boot/../../../lib/xz/xz_dec_bcj.c:166:11: warning: implicit declaration of function 'get_unaligned_be32' [-Wimplicit-function-declaration]
> instr = get_unaligned_be32(buf + i);
OK, now I see the cause of the error.
I will insert a new patch in v3.
Thanks.
>
> http://kisskb.ellerman.id.au/kisskb/buildresult/13862914/
>
> cheers
--
Best Regards
Masahiro Yamada
^ permalink raw reply
* [PATCH v3 1/2] powerpc/boot: add {get, put}_unaligned_be32 to xz_config.h
From: Masahiro Yamada @ 2019-07-05 10:01 UTC (permalink / raw)
To: linuxppc-dev, Michael Ellerman
Cc: Masahiro Yamada, Paul Mackerras, linux-kernel
The next commit will make the way of passing CONFIG options more robust.
Unfortunately, it would uncover another hidden issue; without this
commit, skiroot_defconfig would be broken like this:
| WRAP arch/powerpc/boot/zImage.pseries
| arch/powerpc/boot/wrapper.a(decompress.o): In function `bcj_powerpc.isra.10':
| decompress.c:(.text+0x720): undefined reference to `get_unaligned_be32'
| decompress.c:(.text+0x7a8): undefined reference to `put_unaligned_be32'
| make[1]: *** [arch/powerpc/boot/Makefile;383: arch/powerpc/boot/zImage.pseries] Error 1
| make: *** [arch/powerpc/Makefile;295: zImage] Error 2
skiroot_defconfig is the only defconfig that enables CONFIG_KERNEL_XZ
for ppc, which has never been correctly built before.
I figured out the root cause in lib/decompress_unxz.c:
| #ifdef CONFIG_PPC
| # define XZ_DEC_POWERPC
| #endif
CONFIG_PPC is undefined here in the ppc bootwrapper because autoconf.h
is not included except by arch/powerpc/boot/serial.c
XZ_DEC_POWERPC is not defined, therefore, bcj_powerpc() is not compiled
for the bootwrapper.
With the next commit passing CONFIG_PPC correctly, we would realize that
{get,put}_unaligned_be32 was missing.
Unlike the other decompressors, the ppc bootwrapper duplicates all the
necessary helpers in arch/powerpc/boot/.
The other architectures define __KERNEL__ and pull in helpers for
building the decompressors.
If ppc bootwrapper had defined __KERNEL__, lib/xz/xz_private.h would
have included <asm/unaligned.h>:
| #ifdef __KERNEL__
| # include <linux/xz.h>
| # include <linux/kernel.h>
| # include <asm/unaligned.h>
However, doing so would cause tons of definition conflicts since the
bootwrapper has duplicated everything.
I just added copies of {get,put}_unaligned_be32, following the
bootwrapper coding convention.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
Changes in v3:
- New patch to fix the potential issue of skiroot_defconfig
Changes in v2: None
arch/powerpc/boot/xz_config.h | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/arch/powerpc/boot/xz_config.h b/arch/powerpc/boot/xz_config.h
index e22e5b3770dd..ebfadd39e192 100644
--- a/arch/powerpc/boot/xz_config.h
+++ b/arch/powerpc/boot/xz_config.h
@@ -20,10 +20,30 @@ static inline uint32_t swab32p(void *p)
#ifdef __LITTLE_ENDIAN__
#define get_le32(p) (*((uint32_t *) (p)))
+#define cpu_to_be32(x) swab32(x)
+static inline u32 be32_to_cpup(const u32 *p)
+{
+ return swab32p((u32 *)p);
+}
#else
#define get_le32(p) swab32p(p)
+#define cpu_to_be32(x) (x)
+static inline u32 be32_to_cpup(const u32 *p)
+{
+ return *p;
+}
#endif
+static inline uint32_t get_unaligned_be32(const void *p)
+{
+ return be32_to_cpup(p);
+}
+
+static inline void put_unaligned_be32(u32 val, void *p)
+{
+ *((u32 *)p) = cpu_to_be32(val);
+}
+
#define memeq(a, b, size) (memcmp(a, b, size) == 0)
#define memzero(buf, size) memset(buf, 0, size)
--
2.17.1
^ permalink raw reply related
* [PATCH v3 2/2] powerpc/boot: pass CONFIG options in a simpler and more robust way
From: Masahiro Yamada @ 2019-07-05 10:01 UTC (permalink / raw)
To: linuxppc-dev, Michael Ellerman
Cc: Rob Herring, Rodrigo R. Galvao, linux-kernel, Masahiro Yamada,
Oliver O'Halloran, Joel Stanley, Paul Mackerras
In-Reply-To: <20190705100144.28785-1-yamada.masahiro@socionext.com>
Commit 5e9dcb6188a4 ("powerpc/boot: Expose Kconfig symbols to wrapper")
was wrong, but commit e41b93a6be57 ("powerpc/boot: Fix build failures
with -j 1") was also wrong.
The correct dependency is:
$(obj)/serial.o: $(obj)/autoconf.h
However, I do not see the reason why we need to copy autoconf.h to
arch/power/boot/. Nor do I see consistency in the way of passing
CONFIG options.
decompress.c references CONFIG_KERNEL_GZIP and CONFIG_KERNEL_XZ, which
are passed via the command line.
serial.c includes autoconf.h to reference a couple of CONFIG options,
but this is fragile because we often forget to include "autoconf.h"
from source files.
In fact, it is already broken.
ppc_asm.h references CONFIG_PPC_8xx, but utils.S is not given any way
to access CONFIG options. So, CONFIG_PPC_8xx is never defined here.
Pass $(LINUXINCLUDE) to make sure CONFIG options are accessible from
all .c and .S files in arch/powerpc/boot/.
I also removed the -traditional flag to make include/linux/kconfig.h
work. This flag makes the preprocessor imitate the behavior of the
pre-standard C compiler, but I do not understand why it is necessary.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
Changes in v3: None
Changes in v2:
- reword commit log
arch/powerpc/boot/.gitignore | 2 --
arch/powerpc/boot/Makefile | 14 +++-----------
arch/powerpc/boot/serial.c | 1 -
3 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/arch/powerpc/boot/.gitignore b/arch/powerpc/boot/.gitignore
index 32034a0cc554..6610665fcf5e 100644
--- a/arch/powerpc/boot/.gitignore
+++ b/arch/powerpc/boot/.gitignore
@@ -44,5 +44,3 @@ fdt_sw.c
fdt_wip.c
libfdt.h
libfdt_internal.h
-autoconf.h
-
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 73d1f3562978..b8a82be2af2a 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -20,9 +20,6 @@
all: $(obj)/zImage
-compress-$(CONFIG_KERNEL_GZIP) := CONFIG_KERNEL_GZIP
-compress-$(CONFIG_KERNEL_XZ) := CONFIG_KERNEL_XZ
-
ifdef CROSS32_COMPILE
BOOTCC := $(CROSS32_COMPILE)gcc
BOOTAR := $(CROSS32_COMPILE)ar
@@ -34,7 +31,7 @@ endif
BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -O2 -msoft-float -mno-altivec -mno-vsx \
-pipe -fomit-frame-pointer -fno-builtin -fPIC -nostdinc \
- -D$(compress-y)
+ $(LINUXINCLUDE)
ifdef CONFIG_PPC64_BOOT_WRAPPER
BOOTCFLAGS += -m64
@@ -51,7 +48,7 @@ BOOTCFLAGS += -mlittle-endian
BOOTCFLAGS += $(call cc-option,-mabi=elfv2)
endif
-BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc
+BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -nostdinc
BOOTARFLAGS := -cr$(KBUILD_ARFLAGS)
@@ -202,14 +199,9 @@ $(obj)/empty.c:
$(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds : $(obj)/%: $(srctree)/$(src)/%.S
$(Q)cp $< $@
-$(srctree)/$(src)/serial.c: $(obj)/autoconf.h
-
-$(obj)/autoconf.h: $(obj)/%: $(objtree)/include/generated/%
- $(Q)cp $< $@
-
clean-files := $(zlib-) $(zlibheader-) $(zliblinuxheader-) \
$(zlib-decomp-) $(libfdt) $(libfdtheader) \
- autoconf.h empty.c zImage.coff.lds zImage.ps3.lds zImage.lds
+ empty.c zImage.coff.lds zImage.ps3.lds zImage.lds
quiet_cmd_bootcc = BOOTCC $@
cmd_bootcc = $(BOOTCC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $<
diff --git a/arch/powerpc/boot/serial.c b/arch/powerpc/boot/serial.c
index b0491b8c0199..9457863147f9 100644
--- a/arch/powerpc/boot/serial.c
+++ b/arch/powerpc/boot/serial.c
@@ -18,7 +18,6 @@
#include "stdio.h"
#include "io.h"
#include "ops.h"
-#include "autoconf.h"
static int serial_open(void)
{
--
2.17.1
^ permalink raw reply related
* Re: [PATCH] mm/kprobes: Add generic kprobe_fault_handler() fallback definition
From: Masami Hiramatsu @ 2019-07-05 10:30 UTC (permalink / raw)
To: Anshuman Khandual
Cc: Kate Stewart, Mark Rutland, Rich Felker, linux-ia64, linux-sh,
Heiko Carstens, linux-mips, linux-mm, Paul Mackerras,
H. Peter Anvin, sparclinux, Will Deacon, linux-s390,
Yoshinori Sato, x86, Russell King, Anil S Keshavamurthy,
Christian Borntraeger, Ingo Molnar, linux-arm-kernel,
Catalin Marinas, James Hogan, linux-snps-arc, Guenter Roeck,
Fenghua Yu, Vasily Gorbik, linuxppc-dev, Naveen N. Rao,
Borislav Petkov, Thomas Gleixner, Allison Randal, Tony Luck,
Richard Fontana, Vineet Gupta, linux-kernel, Ralf Baechle,
Paul Burton, Masami Hiramatsu, Greg Kroah-Hartman, Andrew Morton,
Enrico Weigelt, David S. Miller
In-Reply-To: <1562304629-29376-1-git-send-email-anshuman.khandual@arm.com>
Hi Anshuman,
On Fri, 5 Jul 2019 11:00:29 +0530
Anshuman Khandual <anshuman.khandual@arm.com> wrote:
> Architectures like parisc enable CONFIG_KROBES without having a definition
> for kprobe_fault_handler() which results in a build failure.
Hmm, as far as I can see, kprobe_fault_handler() is closed inside each arch
specific code. The reason why include/linux/kprobes.h defines
dummy inline function is only for !CONFIG_KPROBES case.
> Arch needs to
> provide kprobe_fault_handler() as it is platform specific and cannot have
> a generic working alternative. But in the event when platform lacks such a
> definition there needs to be a fallback.
Wait, indeed that each arch need to implement it, but that is for calling
kprobe->fault_handler() as user expected.
Hmm, why not fixing those architecture implementations?
> This adds a stub kprobe_fault_handler() definition which not only prevents
> a build failure but also makes sure that kprobe_page_fault() if called will
> always return negative in absence of a sane platform specific alternative.
I don't like introducing this complicated macro only for avoiding (not fixing)
build error. To fix that, kprobes on parisc should implement kprobe_fault_handler
correctly (and call kprobe->fault_handler).
BTW, even if you need such generic stub, please use a weak function instead
of macros for every arch headers.
> While here wrap kprobe_page_fault() in CONFIG_KPROBES. This enables stud
> definitions for generic kporbe_fault_handler() and kprobes_built_in() can
> just be dropped. Only on x86 it needs to be added back locally as it gets
> used in a !CONFIG_KPROBES function do_general_protection().
If you want to remove kprobes_built_in(), you should replace it with
IS_ENABLED(CONFIG_KPROBES), instead of this...
Thank you,
>
> Cc: Vineet Gupta <vgupta@synopsys.com>
> Cc: Russell King <linux@armlinux.org.uk>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Tony Luck <tony.luck@intel.com>
> Cc: Fenghua Yu <fenghua.yu@intel.com>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: Paul Burton <paul.burton@mips.com>
> Cc: James Hogan <jhogan@kernel.org>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
> Cc: Vasily Gorbik <gor@linux.ibm.com>
> Cc: Christian Borntraeger <borntraeger@de.ibm.com>
> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
> Cc: Rich Felker <dalias@libc.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: "Naveen N. Rao" <naveen.n.rao@linux.ibm.com>
> Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
> Cc: Masami Hiramatsu <mhiramat@kernel.org>
> Cc: Allison Randal <allison@lohutok.net>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Enrico Weigelt <info@metux.net>
> Cc: Richard Fontana <rfontana@redhat.com>
> Cc: Kate Stewart <kstewart@linuxfoundation.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Cc: x86@kernel.org
> Cc: linux-snps-arc@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-ia64@vger.kernel.org
> Cc: linux-mips@vger.kernel.org
> Cc: linuxppc-dev@lists.ozlabs.org
> Cc: linux-s390@vger.kernel.org
> Cc: linux-sh@vger.kernel.org
> Cc: sparclinux@vger.kernel.org
>
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
> ---
> arch/arc/include/asm/kprobes.h | 1 +
> arch/arm/include/asm/kprobes.h | 1 +
> arch/arm64/include/asm/kprobes.h | 1 +
> arch/ia64/include/asm/kprobes.h | 1 +
> arch/mips/include/asm/kprobes.h | 1 +
> arch/powerpc/include/asm/kprobes.h | 1 +
> arch/s390/include/asm/kprobes.h | 1 +
> arch/sh/include/asm/kprobes.h | 1 +
> arch/sparc/include/asm/kprobes.h | 1 +
> arch/x86/include/asm/kprobes.h | 6 ++++++
> include/linux/kprobes.h | 32 ++++++++++++++++++------------
> 11 files changed, 34 insertions(+), 13 deletions(-)
>
> diff --git a/arch/arc/include/asm/kprobes.h b/arch/arc/include/asm/kprobes.h
> index 2134721dce44..ee8efe256675 100644
> --- a/arch/arc/include/asm/kprobes.h
> +++ b/arch/arc/include/asm/kprobes.h
> @@ -45,6 +45,7 @@ struct kprobe_ctlblk {
> struct prev_kprobe prev_kprobe;
> };
>
> +#define kprobe_fault_handler kprobe_fault_handler
> int kprobe_fault_handler(struct pt_regs *regs, unsigned long cause);
> void kretprobe_trampoline(void);
> void trap_is_kprobe(unsigned long address, struct pt_regs *regs);
> diff --git a/arch/arm/include/asm/kprobes.h b/arch/arm/include/asm/kprobes.h
> index 213607a1f45c..660f877b989f 100644
> --- a/arch/arm/include/asm/kprobes.h
> +++ b/arch/arm/include/asm/kprobes.h
> @@ -38,6 +38,7 @@ struct kprobe_ctlblk {
> struct prev_kprobe prev_kprobe;
> };
>
> +#define kprobe_fault_handler kprobe_fault_handler
> void arch_remove_kprobe(struct kprobe *);
> int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr);
> int kprobe_exceptions_notify(struct notifier_block *self,
> diff --git a/arch/arm64/include/asm/kprobes.h b/arch/arm64/include/asm/kprobes.h
> index 97e511d645a2..667773f75616 100644
> --- a/arch/arm64/include/asm/kprobes.h
> +++ b/arch/arm64/include/asm/kprobes.h
> @@ -42,6 +42,7 @@ struct kprobe_ctlblk {
> struct kprobe_step_ctx ss_ctx;
> };
>
> +#define kprobe_fault_handler kprobe_fault_handler
> void arch_remove_kprobe(struct kprobe *);
> int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr);
> int kprobe_exceptions_notify(struct notifier_block *self,
> diff --git a/arch/ia64/include/asm/kprobes.h b/arch/ia64/include/asm/kprobes.h
> index c5cf5e4fb338..c321e8585089 100644
> --- a/arch/ia64/include/asm/kprobes.h
> +++ b/arch/ia64/include/asm/kprobes.h
> @@ -106,6 +106,7 @@ struct arch_specific_insn {
> unsigned short slot;
> };
>
> +#define kprobe_fault_handler kprobe_fault_handler
> extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
> extern int kprobe_exceptions_notify(struct notifier_block *self,
> unsigned long val, void *data);
> diff --git a/arch/mips/include/asm/kprobes.h b/arch/mips/include/asm/kprobes.h
> index 68b1e5d458cf..d1efe991ea22 100644
> --- a/arch/mips/include/asm/kprobes.h
> +++ b/arch/mips/include/asm/kprobes.h
> @@ -40,6 +40,7 @@ do { \
>
> #define kretprobe_blacklist_size 0
>
> +#define kprobe_fault_handler kprobe_fault_handler
> void arch_remove_kprobe(struct kprobe *p);
> int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
>
> diff --git a/arch/powerpc/include/asm/kprobes.h b/arch/powerpc/include/asm/kprobes.h
> index 66b3f2983b22..c94f375ec957 100644
> --- a/arch/powerpc/include/asm/kprobes.h
> +++ b/arch/powerpc/include/asm/kprobes.h
> @@ -84,6 +84,7 @@ struct arch_optimized_insn {
> kprobe_opcode_t *insn;
> };
>
> +#define kprobe_fault_handler kprobe_fault_handler
> extern int kprobe_exceptions_notify(struct notifier_block *self,
> unsigned long val, void *data);
> extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
> diff --git a/arch/s390/include/asm/kprobes.h b/arch/s390/include/asm/kprobes.h
> index b106aa29bf55..0ecaebb78092 100644
> --- a/arch/s390/include/asm/kprobes.h
> +++ b/arch/s390/include/asm/kprobes.h
> @@ -73,6 +73,7 @@ struct kprobe_ctlblk {
> void arch_remove_kprobe(struct kprobe *p);
> void kretprobe_trampoline(void);
>
> +#define kprobe_fault_handler kprobe_fault_handler
> int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
> int kprobe_exceptions_notify(struct notifier_block *self,
> unsigned long val, void *data);
> diff --git a/arch/sh/include/asm/kprobes.h b/arch/sh/include/asm/kprobes.h
> index 6171682f7798..637a698393c0 100644
> --- a/arch/sh/include/asm/kprobes.h
> +++ b/arch/sh/include/asm/kprobes.h
> @@ -45,6 +45,7 @@ struct kprobe_ctlblk {
> struct prev_kprobe prev_kprobe;
> };
>
> +#define kprobe_fault_handler kprobe_fault_handler
> extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
> extern int kprobe_exceptions_notify(struct notifier_block *self,
> unsigned long val, void *data);
> diff --git a/arch/sparc/include/asm/kprobes.h b/arch/sparc/include/asm/kprobes.h
> index bfcaa6326c20..9aa4d25a45a8 100644
> --- a/arch/sparc/include/asm/kprobes.h
> +++ b/arch/sparc/include/asm/kprobes.h
> @@ -47,6 +47,7 @@ struct kprobe_ctlblk {
> struct prev_kprobe prev_kprobe;
> };
>
> +#define kprobe_fault_handler kprobe_fault_handler
> int kprobe_exceptions_notify(struct notifier_block *self,
> unsigned long val, void *data);
> int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
> diff --git a/arch/x86/include/asm/kprobes.h b/arch/x86/include/asm/kprobes.h
> index 5dc909d9ad81..1af2b6db13bd 100644
> --- a/arch/x86/include/asm/kprobes.h
> +++ b/arch/x86/include/asm/kprobes.h
> @@ -101,11 +101,17 @@ struct kprobe_ctlblk {
> struct prev_kprobe prev_kprobe;
> };
>
> +#define kprobe_fault_handler kprobe_fault_handler
> extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
> extern int kprobe_exceptions_notify(struct notifier_block *self,
> unsigned long val, void *data);
> extern int kprobe_int3_handler(struct pt_regs *regs);
> extern int kprobe_debug_handler(struct pt_regs *regs);
> +#else
> +static inline int kprobe_fault_handler(struct pt_regs *regs, int trapnr)
> +{
> + return 0;
> +}
>
> #endif /* CONFIG_KPROBES */
> #endif /* _ASM_X86_KPROBES_H */
> diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
> index 04bdaf01112c..e106f3018804 100644
> --- a/include/linux/kprobes.h
> +++ b/include/linux/kprobes.h
> @@ -182,11 +182,19 @@ DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk);
> /*
> * For #ifdef avoidance:
> */
> -static inline int kprobes_built_in(void)
> +
> +/*
> + * Architectures need to override this with their own implementation
> + * if they care to call kprobe_page_fault(). This will just ensure
> + * that kprobe_page_fault() returns false when called without having
> + * a proper platform specific definition for kprobe_fault_handler().
> + */
> +#ifndef kprobe_fault_handler
> +static inline int kprobe_fault_handler(struct pt_regs *regs, int trapnr)
> {
> - return 1;
> + return 0;
> }
> -
> +#endif
> #ifdef CONFIG_KRETPROBES
> extern void arch_prepare_kretprobe(struct kretprobe_instance *ri,
> struct pt_regs *regs);
> @@ -375,14 +383,6 @@ void free_insn_page(void *page);
>
> #else /* !CONFIG_KPROBES: */
>
> -static inline int kprobes_built_in(void)
> -{
> - return 0;
> -}
> -static inline int kprobe_fault_handler(struct pt_regs *regs, int trapnr)
> -{
> - return 0;
> -}
> static inline struct kprobe *get_kprobe(void *addr)
> {
> return NULL;
> @@ -458,12 +458,11 @@ static inline bool is_kprobe_optinsn_slot(unsigned long addr)
> }
> #endif
>
> +#ifdef CONFIG_KPROBES
> /* Returns true if kprobes handled the fault */
> static nokprobe_inline bool kprobe_page_fault(struct pt_regs *regs,
> unsigned int trap)
> {
> - if (!kprobes_built_in())
> - return false;
> if (user_mode(regs))
> return false;
> /*
> @@ -476,5 +475,12 @@ static nokprobe_inline bool kprobe_page_fault(struct pt_regs *regs,
> return false;
> return kprobe_fault_handler(regs, trap);
> }
> +#else
> +static nokprobe_inline bool kprobe_page_fault(struct pt_regs *regs,
> + unsigned int trap)
> +{
> + return false;
> +}
> +#endif
>
> #endif /* _LINUX_KPROBES_H */
> --
> 2.20.1
>
--
Masami Hiramatsu <mhiramat@kernel.org>
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox