* [PATCH v17 10/10] arm64: Enable passing IMA log to next kernel on kexec
From: Lakshmi Ramasubramanian @ 2021-02-09 18:22 UTC (permalink / raw)
To: zohar, bauerman, robh, takahiro.akashi, gregkh, will, joe,
catalin.marinas, mpe
Cc: mark.rutland, tao.li, paulus, vincenzo.frascino, frowand.list,
sashal, masahiroy, jmorris, allison, serge, devicetree,
pasha.tatashin, prsriva, hsinyi, linux-arm-kernel,
christophe.leroy, mbrugger, balajib, dmitry.kasatkin,
linux-kernel, james.morse, linux-integrity, linuxppc-dev
In-Reply-To: <20210209182200.30606-1-nramas@linux.microsoft.com>
Update CONFIG_KEXEC_FILE to select CONFIG_HAVE_IMA_KEXEC, if CONFIG_IMA
is enabled, to indicate that the IMA measurement log information is
present in the device tree for ARM64.
Co-developed-by: Prakhar Srivastava <prsriva@linux.microsoft.com>
Signed-off-by: Prakhar Srivastava <prsriva@linux.microsoft.com>
Signed-off-by: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
Suggested-by: Thiago Jung Bauermann <bauerman@linux.ibm.com>
---
arch/arm64/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 05e17351e4f3..8a93573cebb6 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -1093,6 +1093,7 @@ config KEXEC
config KEXEC_FILE
bool "kexec file based system call"
select KEXEC_CORE
+ select HAVE_IMA_KEXEC if IMA
help
This is new version of kexec system call. This system call is
file based and takes file descriptors as system call argument
--
2.30.0
^ permalink raw reply related
* [PATCH v6 0/2] powerpc/32: Implement C syscall entry/exit (complement)
From: Christophe Leroy @ 2021-02-09 19:29 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman, npiggin,
msuchanek
Cc: linuxppc-dev, linux-kernel
This series implements C syscall entry/exit for PPC32. It reuses
the work already done for PPC64.
This series is based on today's next-test (f538b53fd47a) where main patchs from v5 are merged in.
The first patch is important for performance.
v6:
- Forced scv param to 0 on syscall_exit_prepare(), and added is_not_scv bool.
- Reworked the last patch to avoid code duplication.
Christophe Leroy (2):
powerpc/syscall: Do not check unsupported scv vector on PPC32
powerpc/32: Handle bookE debugging in C in syscall entry/exit
arch/powerpc/include/asm/interrupt.h | 12 +++++++
arch/powerpc/include/asm/ptrace.h | 5 +++
arch/powerpc/include/asm/reg_booke.h | 3 ++
arch/powerpc/kernel/entry_32.S | 7 ----
arch/powerpc/kernel/head_32.h | 15 ---------
arch/powerpc/kernel/head_booke.h | 19 -----------
arch/powerpc/kernel/interrupt.c | 50 ++++++++++++++++++----------
7 files changed, 52 insertions(+), 59 deletions(-)
--
2.25.0
^ permalink raw reply
* [PATCH v6 2/2] powerpc/32: Handle bookE debugging in C in syscall entry/exit
From: Christophe Leroy @ 2021-02-09 19:29 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman, npiggin,
msuchanek
Cc: linuxppc-dev, linux-kernel
In-Reply-To: <cover.1612898425.git.christophe.leroy@csgroup.eu>
The handling of SPRN_DBCR0 and other registers can easily
be done in C instead of ASM.
For that, create booke_load_dbcr0() and booke_restore_dbcr0().
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
v5: New
v6: Refactor into helpers
---
arch/powerpc/include/asm/interrupt.h | 12 ++++++++
arch/powerpc/include/asm/reg_booke.h | 3 ++
arch/powerpc/kernel/entry_32.S | 7 -----
arch/powerpc/kernel/head_32.h | 15 ----------
arch/powerpc/kernel/head_booke.h | 19 -------------
arch/powerpc/kernel/interrupt.c | 41 ++++++++++++++++++----------
6 files changed, 42 insertions(+), 55 deletions(-)
diff --git a/arch/powerpc/include/asm/interrupt.h b/arch/powerpc/include/asm/interrupt.h
index 4badb3e51c19..e62c37915bbe 100644
--- a/arch/powerpc/include/asm/interrupt.h
+++ b/arch/powerpc/include/asm/interrupt.h
@@ -14,6 +14,18 @@ struct interrupt_state {
#endif
};
+static inline void booke_restore_dbcr0(void)
+{
+#ifdef CONFIG_PPC_ADV_DEBUG_REGS
+ unsigned long dbcr0 = current->thread.debug.dbcr0;
+
+ if (IS_ENABLED(CONFIG_PPC32) && unlikely(dbcr0 & DBCR0_IDM)) {
+ mtspr(SPRN_DBSR, -1);
+ mtspr(SPRN_DBCR0, global_dbcr0[smp_processor_id()]);
+ }
+#endif
+}
+
static inline void interrupt_enter_prepare(struct pt_regs *regs, struct interrupt_state *state)
{
/*
diff --git a/arch/powerpc/include/asm/reg_booke.h b/arch/powerpc/include/asm/reg_booke.h
index 262782f08fd4..17b8dcd9a40d 100644
--- a/arch/powerpc/include/asm/reg_booke.h
+++ b/arch/powerpc/include/asm/reg_booke.h
@@ -691,6 +691,9 @@
#define mttmr(rn, v) asm volatile(MTTMR(rn, %0) : \
: "r" ((unsigned long)(v)) \
: "memory")
+
+extern unsigned long global_dbcr0[];
+
#endif /* !__ASSEMBLY__ */
#endif /* __ASM_POWERPC_REG_BOOKE_H__ */
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
index 9dd90be9f8a5..78c430b7f9d9 100644
--- a/arch/powerpc/kernel/entry_32.S
+++ b/arch/powerpc/kernel/entry_32.S
@@ -343,13 +343,6 @@ ret_from_syscall:
addi r4,r1,STACK_FRAME_OVERHEAD
li r5,0
bl syscall_exit_prepare
-#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
- /* If the process has its own DBCR0 value, load it up. The internal
- debug mode bit tells us that dbcr0 should be loaded. */
- lwz r0,THREAD+THREAD_DBCR0(r2)
- andis. r10,r0,DBCR0_IDM@h
- bnel- load_dbcr0
-#endif
#ifdef CONFIG_PPC_47x
lis r4,icache_44x_need_flush@ha
lwz r5,icache_44x_need_flush@l(r4)
diff --git a/arch/powerpc/kernel/head_32.h b/arch/powerpc/kernel/head_32.h
index 1afad7bc3395..5d4706c14572 100644
--- a/arch/powerpc/kernel/head_32.h
+++ b/arch/powerpc/kernel/head_32.h
@@ -153,21 +153,6 @@
SAVE_4GPRS(3, r11)
SAVE_2GPRS(7, r11)
addi r2,r12,-THREAD
-#if defined(CONFIG_40x)
- /* Check to see if the dbcr0 register is set up to debug. Use the
- internal debug mode bit to do this. */
- lwz r12,THREAD_DBCR0(r12)
- andis. r12,r12,DBCR0_IDM@h
- beq+ 3f
- /* From user and task is ptraced - load up global dbcr0 */
- li r12,-1 /* clear all pending debug events */
- mtspr SPRN_DBSR,r12
- lis r11,global_dbcr0@ha
- addi r11,r11,global_dbcr0@l
- lwz r12,0(r11)
- mtspr SPRN_DBCR0,r12
-3:
-#endif
b transfer_to_syscall /* jump to handler */
.endm
diff --git a/arch/powerpc/kernel/head_booke.h b/arch/powerpc/kernel/head_booke.h
index 5f565232b99d..47857795f50a 100644
--- a/arch/powerpc/kernel/head_booke.h
+++ b/arch/powerpc/kernel/head_booke.h
@@ -130,25 +130,6 @@ ALT_FTR_SECTION_END_IFSET(CPU_FTR_EMB_HV)
SAVE_2GPRS(7, r11)
addi r2,r10,-THREAD
- /* Check to see if the dbcr0 register is set up to debug. Use the
- internal debug mode bit to do this. */
- lwz r12,THREAD_DBCR0(r10)
- andis. r12,r12,DBCR0_IDM@h
- beq+ 3f
- /* From user and task is ptraced - load up global dbcr0 */
- li r12,-1 /* clear all pending debug events */
- mtspr SPRN_DBSR,r12
- lis r11,global_dbcr0@ha
- addi r11,r11,global_dbcr0@l
-#ifdef CONFIG_SMP
- lwz r10, TASK_CPU(r2)
- slwi r10, r10, 2
- add r11, r11, r10
-#endif
- lwz r12,0(r11)
- mtspr SPRN_DBCR0,r12
-
-3:
b transfer_to_syscall /* jump to handler */
.endm
diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc/kernel/interrupt.c
index 75d657b63332..f93664ad4a5e 100644
--- a/arch/powerpc/kernel/interrupt.c
+++ b/arch/powerpc/kernel/interrupt.c
@@ -73,6 +73,8 @@ notrace long system_call_exception(long r3, long r4, long r5,
kuap_check_amr();
#endif
+ booke_restore_dbcr0();
+
account_cpu_user_entry();
account_stolen_time();
@@ -204,6 +206,28 @@ static notrace inline bool prep_irq_for_enabled_exit(bool clear_ri, bool irqs_en
return false;
}
+static notrace void booke_load_dbcr0(void)
+{
+#ifdef CONFIG_PPC_ADV_DEBUG_REGS
+ unsigned long dbcr0 = current->thread.debug.dbcr0;
+
+ if (likely(!(dbcr0 & DBCR0_IDM)))
+ return;
+
+ /*
+ * Check to see if the dbcr0 register is set up to debug.
+ * Use the internal debug mode bit to do this.
+ */
+ mtmsr(mfmsr() & ~MSR_DE);
+ if (IS_ENABLED(CONFIG_PPC32)) {
+ isync();
+ global_dbcr0[smp_processor_id()] = mfspr(SPRN_DBCR0);
+ }
+ mtspr(SPRN_DBCR0, dbcr0);
+ mtspr(SPRN_DBSR, -1);
+#endif
+}
+
/*
* This should be called after a syscall returns, with r3 the return value
* from the syscall. If this function returns non-zero, the system call
@@ -317,6 +341,8 @@ notrace unsigned long syscall_exit_prepare(unsigned long r3,
local_paca->tm_scratch = regs->msr;
#endif
+ booke_load_dbcr0();
+
account_cpu_user_exit();
#ifdef CONFIG_PPC_BOOK3S_64 /* BOOK3E and ppc32 not using this */
@@ -331,9 +357,6 @@ notrace unsigned long syscall_exit_prepare(unsigned long r3,
#ifndef CONFIG_PPC_BOOK3E_64 /* BOOK3E not yet using this */
notrace unsigned long interrupt_exit_user_prepare(struct pt_regs *regs, unsigned long msr)
{
-#ifdef CONFIG_PPC_BOOK3E
- struct thread_struct *ts = ¤t->thread;
-#endif
unsigned long *ti_flagsp = ¤t_thread_info()->flags;
unsigned long ti_flags;
unsigned long flags;
@@ -398,17 +421,7 @@ notrace unsigned long interrupt_exit_user_prepare(struct pt_regs *regs, unsigned
goto again;
}
-#ifdef CONFIG_PPC_BOOK3E
- if (unlikely(ts->debug.dbcr0 & DBCR0_IDM)) {
- /*
- * Check to see if the dbcr0 register is set up to debug.
- * Use the internal debug mode bit to do this.
- */
- mtmsr(mfmsr() & ~MSR_DE);
- mtspr(SPRN_DBCR0, ts->debug.dbcr0);
- mtspr(SPRN_DBSR, -1);
- }
-#endif
+ booke_load_dbcr0();
#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
local_paca->tm_scratch = regs->msr;
--
2.25.0
^ permalink raw reply related
* [PATCH v6 1/2] powerpc/syscall: Do not check unsupported scv vector on PPC32
From: Christophe Leroy @ 2021-02-09 19:29 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman, npiggin,
msuchanek
Cc: linuxppc-dev, linux-kernel
In-Reply-To: <cover.1612898425.git.christophe.leroy@csgroup.eu>
Only book3s/64 has scv. No need to check the 0x7ff0 trap on 32 or 64e.
For that, add a helper trap_is_unsupported_scv() similar to
trap_is_scv().
And ignore the scv parameter in syscall_exit_prepare (Save 14 cycles
346 => 332 cycles)
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
v5: Added a helper trap_is_unsupported_scv()
v6: Still set r5 when calling syscall_exit_prepare() and introduce a local bool 'is_not_scv'
---
arch/powerpc/include/asm/ptrace.h | 5 +++++
arch/powerpc/kernel/interrupt.c | 9 +++++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h
index 8236c5e749e4..975ba260006a 100644
--- a/arch/powerpc/include/asm/ptrace.h
+++ b/arch/powerpc/include/asm/ptrace.h
@@ -232,6 +232,11 @@ static inline bool trap_is_scv(struct pt_regs *regs)
return (IS_ENABLED(CONFIG_PPC_BOOK3S_64) && TRAP(regs) == 0x3000);
}
+static inline bool trap_is_unsupported_scv(struct pt_regs *regs)
+{
+ return IS_ENABLED(CONFIG_PPC_BOOK3S_64) && TRAP(regs) == 0x7ff0;
+}
+
static inline bool trap_is_syscall(struct pt_regs *regs)
{
return (trap_is_scv(regs) || TRAP(regs) == 0xc00);
diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc/kernel/interrupt.c
index 107ec39f05cb..75d657b63332 100644
--- a/arch/powerpc/kernel/interrupt.c
+++ b/arch/powerpc/kernel/interrupt.c
@@ -88,7 +88,7 @@ notrace long system_call_exception(long r3, long r4, long r5,
local_irq_enable();
if (unlikely(current_thread_info()->flags & _TIF_SYSCALL_DOTRACE)) {
- if (unlikely(regs->trap == 0x7ff0)) {
+ if (unlikely(trap_is_unsupported_scv(regs))) {
/* Unsupported scv vector */
_exception(SIGILL, regs, ILL_ILLOPC, regs->nip);
return regs->gpr[3];
@@ -111,7 +111,7 @@ notrace long system_call_exception(long r3, long r4, long r5,
r8 = regs->gpr[8];
} else if (unlikely(r0 >= NR_syscalls)) {
- if (unlikely(regs->trap == 0x7ff0)) {
+ if (unlikely(trap_is_unsupported_scv(regs))) {
/* Unsupported scv vector */
_exception(SIGILL, regs, ILL_ILLOPC, regs->nip);
return regs->gpr[3];
@@ -220,6 +220,7 @@ notrace unsigned long syscall_exit_prepare(unsigned long r3,
unsigned long *ti_flagsp = ¤t_thread_info()->flags;
unsigned long ti_flags;
unsigned long ret = 0;
+ bool is_not_scv = !IS_ENABLED(CONFIG_PPC_BOOK3S_64) || !scv;
CT_WARN_ON(ct_state() == CONTEXT_USER);
@@ -234,7 +235,7 @@ notrace unsigned long syscall_exit_prepare(unsigned long r3,
ti_flags = *ti_flagsp;
- if (unlikely(r3 >= (unsigned long)-MAX_ERRNO) && !scv) {
+ if (unlikely(r3 >= (unsigned long)-MAX_ERRNO) && is_not_scv) {
if (likely(!(ti_flags & (_TIF_NOERROR | _TIF_RESTOREALL)))) {
r3 = -r3;
regs->ccr |= 0x10000000; /* Set SO bit in CR */
@@ -305,7 +306,7 @@ notrace unsigned long syscall_exit_prepare(unsigned long r3,
user_enter_irqoff();
/* scv need not set RI=0 because SRRs are not used */
- if (unlikely(!__prep_irq_for_enabled_exit(!scv))) {
+ if (unlikely(!__prep_irq_for_enabled_exit(is_not_scv))) {
user_exit_irqoff();
local_irq_enable();
local_irq_disable();
--
2.25.0
^ permalink raw reply related
* [powerpc:next-test 129/159] arch/powerpc/mm/book3s64/radix_tlb.c:646:6: warning: no previous prototype for function 'exit_lazy_flush_tlb'
From: kernel test robot @ 2021-02-09 20:15 UTC (permalink / raw)
To: Nicholas Piggin; +Cc: clang-built-linux, kbuild-all, linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 3772 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test
head: 5811244192fc4e18c001c69300044c2acf30bd91
commit: 032b7f08932c9b212952d6d585e45b2941b3e8be [129/159] powerpc/64s/radix: serialize_against_pte_lookup IPIs trim mm_cpumask
config: powerpc-randconfig-r026-20210209 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id=032b7f08932c9b212952d6d585e45b2941b3e8be
git remote add powerpc https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
git fetch --no-tags powerpc next-test
git checkout 032b7f08932c9b212952d6d585e45b2941b3e8be
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> arch/powerpc/mm/book3s64/radix_tlb.c:646:6: warning: no previous prototype for function 'exit_lazy_flush_tlb' [-Wmissing-prototypes]
void exit_lazy_flush_tlb(struct mm_struct *mm, bool always_flush)
^
arch/powerpc/mm/book3s64/radix_tlb.c:646:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void exit_lazy_flush_tlb(struct mm_struct *mm, bool always_flush)
^
static
1 warning generated.
vim +/exit_lazy_flush_tlb +646 arch/powerpc/mm/book3s64/radix_tlb.c
641
642 /*
643 * If always_flush is true, then flush even if this CPU can't be removed
644 * from mm_cpumask.
645 */
> 646 void exit_lazy_flush_tlb(struct mm_struct *mm, bool always_flush)
647 {
648 unsigned long pid = mm->context.id;
649 int cpu = smp_processor_id();
650
651 /*
652 * A kthread could have done a mmget_not_zero() after the flushing CPU
653 * checked mm_cpumask, and be in the process of kthread_use_mm when
654 * interrupted here. In that case, current->mm will be set to mm,
655 * because kthread_use_mm() setting ->mm and switching to the mm is
656 * done with interrupts off.
657 */
658 if (current->mm == mm)
659 goto out;
660
661 if (current->active_mm == mm) {
662 WARN_ON_ONCE(current->mm != NULL);
663 /* Is a kernel thread and is using mm as the lazy tlb */
664 mmgrab(&init_mm);
665 current->active_mm = &init_mm;
666 switch_mm_irqs_off(mm, &init_mm, current);
667 mmdrop(mm);
668 }
669
670 /*
671 * This IPI may be initiated from any source including those not
672 * running the mm, so there may be a racing IPI that comes after
673 * this one which finds the cpumask already clear. Check and avoid
674 * underflowing the active_cpus count in that case. The race should
675 * not otherwise be a problem, but the TLB must be flushed because
676 * that's what the caller expects.
677 */
678 if (cpumask_test_cpu(cpu, mm_cpumask(mm))) {
679 atomic_dec(&mm->context.active_cpus);
680 cpumask_clear_cpu(cpu, mm_cpumask(mm));
681 always_flush = true;
682 }
683
684 out:
685 if (always_flush)
686 _tlbiel_pid(pid, RIC_FLUSH_ALL);
687 }
688
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35355 bytes --]
^ permalink raw reply
* Re: [PATCH v5 10/10] powerpc/signal64: Use __get_user() to copy sigset_t
From: Christophe Leroy @ 2021-02-09 21:45 UTC (permalink / raw)
To: Christopher M. Riedl; +Cc: linuxppc-dev
In-Reply-To: <20210203184323.20792-11-cmr@codefail.de>
"Christopher M. Riedl" <cmr@codefail.de> a écrit :
> Usually sigset_t is exactly 8B which is a "trivial" size and does not
> warrant using __copy_from_user(). Use __get_user() directly in
> anticipation of future work to remove the trivial size optimizations
> from __copy_from_user(). Calling __get_user() also results in a small
> boost to signal handling throughput here.
>
> Signed-off-by: Christopher M. Riedl <cmr@codefail.de>
> ---
> arch/powerpc/kernel/signal_64.c | 14 ++++++++++++--
> 1 file changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/kernel/signal_64.c
> b/arch/powerpc/kernel/signal_64.c
> index 817b64e1e409..42fdc4a7ff72 100644
> --- a/arch/powerpc/kernel/signal_64.c
> +++ b/arch/powerpc/kernel/signal_64.c
> @@ -97,6 +97,14 @@ static void prepare_setup_sigcontext(struct
> task_struct *tsk, int ctx_has_vsx_re
> #endif /* CONFIG_VSX */
> }
>
> +static inline int get_user_sigset(sigset_t *dst, const sigset_t *src)
Should be called __get_user_sigset() as it is a helper for __get_user()
> +{
> + if (sizeof(sigset_t) <= 8)
We should always use __get_user(), see below.
> + return __get_user(dst->sig[0], &src->sig[0]);
I think the above will not work on ppc32, it will only copy 4 bytes.
You must cast the source to u64*
> + else
> + return __copy_from_user(dst, src, sizeof(sigset_t));
I see no point in keeping this alternative. Today sigset_ t is fixed.
If you fear one day someone might change it to something different
than a u64, just add a BUILD_BUG_ON(sizeof(sigset_t) != sizeof(u64));
> +}
> +
> /*
> * Set up the sigcontext for the signal frame.
> */
> @@ -701,8 +709,9 @@ SYSCALL_DEFINE3(swapcontext, struct ucontext
> __user *, old_ctx,
> * We kill the task with a SIGSEGV in this situation.
> */
>
> - if (__copy_from_user(&set, &new_ctx->uc_sigmask, sizeof(set)))
> + if (get_user_sigset(&set, &new_ctx->uc_sigmask))
> do_exit(SIGSEGV);
> +
This white space is not part of the change, keep patches to the
minimum, avoid cosmetic
> set_current_blocked(&set);
>
> if (!user_read_access_begin(new_ctx, ctx_size))
> @@ -740,8 +749,9 @@ SYSCALL_DEFINE0(rt_sigreturn)
> if (!access_ok(uc, sizeof(*uc)))
> goto badframe;
>
> - if (__copy_from_user(&set, &uc->uc_sigmask, sizeof(set)))
> + if (get_user_sigset(&set, &uc->uc_sigmask))
> goto badframe;
> +
Same
> set_current_blocked(&set);
>
> #ifdef CONFIG_PPC_TRANSACTIONAL_MEM
> --
> 2.26.1
^ permalink raw reply
* [powerpc:next-test 67/159] arch/powerpc/platforms/83xx/km83xx.c:183:19: error: 'mpc83xx_setup_pci' undeclared here (not in a function); did you mean
From: kernel test robot @ 2021-02-09 22:08 UTC (permalink / raw)
To: Oliver O'Halloran; +Cc: linuxppc-dev, kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1779 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test
head: 5811244192fc4e18c001c69300044c2acf30bd91
commit: 83f84041ff1cf6c23fc38861218af2d4ca2d9b38 [67/159] powerpc/83xx: Move PHB discovery
config: powerpc-kmeter1_defconfig (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id=83f84041ff1cf6c23fc38861218af2d4ca2d9b38
git remote add powerpc https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
git fetch --no-tags powerpc next-test
git checkout 83f84041ff1cf6c23fc38861218af2d4ca2d9b38
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> arch/powerpc/platforms/83xx/km83xx.c:183:19: error: 'mpc83xx_setup_pci' undeclared here (not in a function); did you mean 'mpc83xx_setup_arch'?
183 | .discover_phbs = mpc83xx_setup_pci,
| ^~~~~~~~~~~~~~~~~
| mpc83xx_setup_arch
vim +183 arch/powerpc/platforms/83xx/km83xx.c
178
179 define_machine(mpc83xx_km) {
180 .name = "mpc83xx-km-platform",
181 .probe = mpc83xx_km_probe,
182 .setup_arch = mpc83xx_km_setup_arch,
> 183 .discover_phbs = mpc83xx_setup_pci,
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 13134 bytes --]
^ permalink raw reply
* Re: [PATCH v2 2/7] ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg
From: Mark Brown @ 2021-02-09 22:29 UTC (permalink / raw)
To: Shengjiu Wang
Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
alsa-devel, Timur Tabi, Xiubo Li, Fabio Estevam, Shengjiu Wang,
Takashi Iwai, Liam Girdwood, linux-kernel, Nicolin Chen,
Rob Herring, linuxppc-dev
In-Reply-To: <CAA+D8AMRGRRk6FzdiqaHAP1=dPJngNgmdGmU59vrroXA9BMyXw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 427 bytes --]
On Tue, Feb 09, 2021 at 05:16:16PM +0800, Shengjiu Wang wrote:
> On Mon, Feb 8, 2021 at 7:53 PM Mark Brown <broonie@kernel.org> wrote:
> > hw_params() can be called multiple times and there's no need for it to
> > be balanced with hw_free(), I'd move this to a different callback (DAPM
> > should work well).
> Which callback should I use? Is there an example?
Like I say I'd actually recommend moving this control to DAPM.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply
* Re: [PATCH 1/3] spi: mpc52xx: Avoid using get_tbl()
From: Mark Brown @ 2021-02-09 22:30 UTC (permalink / raw)
To: Christophe Leroy; +Cc: linux-kernel, linux-spi, Paul Mackerras, linuxppc-dev
In-Reply-To: <99bf008e2970de7f8ed3225cda69a6d06ae1a644.1612866360.git.christophe.leroy@csgroup.eu>
[-- Attachment #1: Type: text/plain, Size: 333 bytes --]
On Tue, Feb 09, 2021 at 10:26:21AM +0000, Christophe Leroy wrote:
> get_tbl() is confusing as it returns the content TBL register
> on PPC32 but the concatenation of TBL and TBU on PPC64.
>
> Use mftb() instead.
>
> This will allow the removal of get_tbl() in a following patch.
Acked-by: Mark Brown <broonie@kernel.org>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply
* Re: [PATCH 2/4] KVM: PPC: Book3S HV: Fix radix guest SLB side channel
From: Paul Mackerras @ 2021-02-10 1:28 UTC (permalink / raw)
To: Nicholas Piggin; +Cc: linuxppc-dev, kvm-ppc
In-Reply-To: <20210118062809.1430920-3-npiggin@gmail.com>
On Mon, Jan 18, 2021 at 04:28:07PM +1000, Nicholas Piggin wrote:
> The slbmte instruction is legal in radix mode, including radix guest
> mode. This means radix guests can load the SLB with arbitrary data.
>
> KVM host does not clear the SLB when exiting a guest if it was a
> radix guest, which would allow a rogue radix guest to use the SLB as
> a side channel to communicate with other guests.
No, because the code currently clears the SLB when entering a radix
guest, which you remove in the next patch. I'm OK with moving the SLB
clearing from guest entry to guest exit, I guess, but I don't see that
you are in fact fixing anything by doing so.
Paul.
^ permalink raw reply
* Re: [PATCH v5 16/22] powerpc/syscall: Avoid stack frame in likely part of system_call_exception()
From: Nicholas Piggin @ 2021-02-10 1:56 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Christophe Leroy, Michael Ellerman,
msuchanek, Paul Mackerras
Cc: linuxppc-dev, linux-kernel
In-Reply-To: <f2b17529-e1b6-3d2c-a38b-51e91841e438@csgroup.eu>
Excerpts from Christophe Leroy's message of February 10, 2021 2:13 am:
>
>
> Le 09/02/2021 à 02:55, Nicholas Piggin a écrit :
>> Excerpts from Christophe Leroy's message of February 9, 2021 1:10 am:
>>> When r3 is not modified, reload it from regs->orig_r3 to free
>>> volatile registers. This avoids a stack frame for the likely part
>>> of system_call_exception()
>>
>> This doesn't on my 64s build, but it does reduce one non volatile
>> register save/restore. With quite a bit more register pressure
>> reduction 64s can avoid the stack frame as well.
>
> The stack frame is not due to the registers because on PPC64 you have the redzone that you don't
> have on PPC32.
>
> As far as I can see, this is due to a call to .arch_local_irq_restore().
>
> On ppc32 arch_local_irq_restore() is just a write to MSR.
Oh you're right there. We can actually inline fast paths of that I have
a patch somewhere, but not sure if it's worthwhile.
>> It's a cool trick but quite code and compiler specific so I don't know
>> how worthwhile it is to keep considering we're calling out into random
>> kernel C code after this.
>>
>> Maybe just keep it PPC32 specific for the moment, will have to do more
>> tuning for 64 and we have other stuff to do there first.
>>
>> If you are happy to make it 32-bit only then
>
> I think we can leave without this, that's only one or two cycles won.
Okay for this round let's drop it for now.
Thanks,
Nick
^ permalink raw reply
* Re: [PATCH v5 18/22] powerpc/syscall: Remove FULL_REGS verification in system_call_exception
From: Nicholas Piggin @ 2021-02-10 1:57 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Christophe Leroy, Michael Ellerman,
msuchanek, Paul Mackerras
Cc: linuxppc-dev, linux-kernel
In-Reply-To: <cc1a35a4-07c3-9e64-18d6-57e497f56e33@csgroup.eu>
Excerpts from Christophe Leroy's message of February 10, 2021 12:31 am:
>
>
> Le 09/02/2021 à 03:02, Nicholas Piggin a écrit :
>> Excerpts from Christophe Leroy's message of February 9, 2021 1:10 am:
>>> For book3s/64, FULL_REGS() is 'true' at all time, so the test voids.
>>> For others, non volatile registers are saved inconditionally.
>>>
>>> So the verification is pointless.
>>>
>>> Should one fail to do it, it would anyway be caught by the
>>> CHECK_FULL_REGS() in copy_thread() as we have removed the
>>> special versions ppc_fork() and friends.
>>>
>>> null_syscall benchmark reduction 4 cycles (332 => 328 cycles)
>>
>> I wonder if we rather make a CONFIG option for a bunch of these simpler
>> debug checks here (and also in interrupt exit, wrappers, etc) rather
>> than remove them entirely.
>
> We can drop this patch if you prefer. Anyway, like book3s/64, once ppc32 also do interrupt
> entry/exit in C, FULL_REGS() will already return true.
Sure let's do that.
Thanks,
Nick
^ permalink raw reply
* Re: [PATCH v5 20/22] powerpc/syscall: Avoid storing 'current' in another pointer
From: Nicholas Piggin @ 2021-02-10 2:00 UTC (permalink / raw)
To: Christophe Leroy, David Laight, 'Segher Boessenkool'
Cc: Paul Mackerras, msuchanek@suse.de, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org
In-Reply-To: <f6ae2e77-3a89-c294-9a6e-58d84fbb46b1@csgroup.eu>
Excerpts from Christophe Leroy's message of February 10, 2021 3:03 am:
>
>
> Le 09/02/2021 à 15:31, David Laight a écrit :
>> From: Segher Boessenkool
>>> Sent: 09 February 2021 13:51
>>>
>>> On Tue, Feb 09, 2021 at 12:36:20PM +1000, Nicholas Piggin wrote:
>>>> What if you did this?
>>>
>>>> +static inline struct task_struct *get_current(void)
>>>> +{
>>>> + register struct task_struct *task asm ("r2");
>>>> +
>>>> + return task;
>>>> +}
>>>
>>> Local register asm variables are *only* guaranteed to live in that
>>> register as operands to an asm. See
>>> https://gcc.gnu.org/onlinedocs/gcc/Local-Register-Variables.html#Local-Register-Variables
>>> ("The only supported use" etc.)
>>>
>>> You can do something like
>>>
>>> static inline struct task_struct *get_current(void)
>>> {
>>> register struct task_struct *task asm ("r2");
>>>
>>> asm("" : "+r"(task));
>>>
>>> return task;
>>> }
>>>
>>> which makes sure that "task" actually is in r2 at the point of that asm.
>>
>> If "r2" always contains current (and is never assigned by the compiler)
>> why not use a global register variable for it?
>>
>
>
> The change proposed by Nick doesn't solve the issue.
It seemed to change code generation in a simple test case, oh well.
>
> The problem is that at the begining of the function we have:
>
> unsigned long *ti_flagsp = ¤t_thread_info()->flags;
>
> When the function uses ti_flagsp for the first time, it does use 112(r2)
>
> Then the function calls some other functions.
>
> Most likely because the function could update 'current', GCC copies r2 into r30, so that if r2 get
> changed by the called function, ti_flagsp is still based on the previous value of current.
>
> Allthough we know r2 wont change, GCC doesn't know it. And in order to save r2 into r30, it needs to
> save r30 in the stack.
>
>
> By using ¤t_thread_info()->flags directly instead of this intermediaite ti_flagsp pointer, GCC
> uses r2 instead instead of doing a copy.
>
>
> Nick, I don't understand the reason why you need that 'ti_flagsp' local var.
Just to save typing, I don't mind your patch I was just wondering if
current could be improved in general.
Thanks,
Nick
^ permalink raw reply
* [powerpc:next-test 68/159] arch/powerpc/platforms/amigaone/setup.c:73:13: error: no previous prototype for 'amigaone_discover_phbs'
From: kernel test robot @ 2021-02-10 2:27 UTC (permalink / raw)
To: Oliver O'Halloran; +Cc: linuxppc-dev, kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2839 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test
head: 5811244192fc4e18c001c69300044c2acf30bd91
commit: 053d58c870298d62b9c5154672ef2f1684c4ea43 [68/159] powerpc/amigaone: Move PHB discovery
config: powerpc64-randconfig-r036-20210209 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id=053d58c870298d62b9c5154672ef2f1684c4ea43
git remote add powerpc https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
git fetch --no-tags powerpc next-test
git checkout 053d58c870298d62b9c5154672ef2f1684c4ea43
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
arch/powerpc/platforms/amigaone/setup.c:27:6: error: no previous prototype for 'amigaone_show_cpuinfo' [-Werror=missing-prototypes]
27 | void amigaone_show_cpuinfo(struct seq_file *m)
| ^~~~~~~~~~~~~~~~~~~~~
arch/powerpc/platforms/amigaone/setup.c:67:13: error: no previous prototype for 'amigaone_setup_arch' [-Werror=missing-prototypes]
67 | void __init amigaone_setup_arch(void)
| ^~~~~~~~~~~~~~~~~~~
>> arch/powerpc/platforms/amigaone/setup.c:73:13: error: no previous prototype for 'amigaone_discover_phbs' [-Werror=missing-prototypes]
73 | void __init amigaone_discover_phbs(void)
| ^~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/platforms/amigaone/setup.c:85:13: error: no previous prototype for 'amigaone_init_IRQ' [-Werror=missing-prototypes]
85 | void __init amigaone_init_IRQ(void)
| ^~~~~~~~~~~~~~~~~
arch/powerpc/platforms/amigaone/setup.c:125:17: error: no previous prototype for 'amigaone_restart' [-Werror=missing-prototypes]
125 | void __noreturn amigaone_restart(char *cmd)
| ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/amigaone_discover_phbs +73 arch/powerpc/platforms/amigaone/setup.c
72
> 73 void __init amigaone_discover_phbs(void)
74 {
75 struct device_node *np;
76 int phb = -ENODEV;
77
78 /* Lookup PCI host bridges. */
79 for_each_compatible_node(np, "pci", "mai-logic,articia-s")
80 phb = amigaone_add_bridge(np);
81
82 BUG_ON(phb != 0);
83 }
84
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 24372 bytes --]
^ permalink raw reply
* Re: [PATCH 2/4] KVM: PPC: Book3S HV: Fix radix guest SLB side channel
From: Nicholas Piggin @ 2021-02-10 2:51 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev, kvm-ppc
In-Reply-To: <20210210012852.GD2854001@thinks.paulus.ozlabs.org>
Excerpts from Paul Mackerras's message of February 10, 2021 11:28 am:
> On Mon, Jan 18, 2021 at 04:28:07PM +1000, Nicholas Piggin wrote:
>> The slbmte instruction is legal in radix mode, including radix guest
>> mode. This means radix guests can load the SLB with arbitrary data.
>>
>> KVM host does not clear the SLB when exiting a guest if it was a
>> radix guest, which would allow a rogue radix guest to use the SLB as
>> a side channel to communicate with other guests.
>
> No, because the code currently clears the SLB when entering a radix
> guest,
Not AFAIKS.
> which you remove in the next patch.
The next patch avoids clearing host SLB entries when a hash guest is
entered from a radix host, it doesn't apply to radix guests. Not sure
where the changelog for it went but it should have "HPT guests" in the
title at least, I guess.
> I'm OK with moving the SLB
> clearing from guest entry to guest exit, I guess, but I don't see that
> you are in fact fixing anything by doing so.
I can set slb entries in a radix guest in simulator and observe they
stay around over host<->guest transitions, and they don't after this
patch.
Thanks,
Nick
^ permalink raw reply
* Re: [PATCH v5 10/10] powerpc/signal64: Use __get_user() to copy sigset_t
From: Christopher M. Riedl @ 2021-02-10 4:16 UTC (permalink / raw)
To: Christophe Leroy; +Cc: linuxppc-dev
In-Reply-To: <20210209224556.Horde.RYCA-pbjVpbTsRo_x8_Msg8@messagerie.c-s.fr>
On Tue Feb 9, 2021 at 3:45 PM CST, Christophe Leroy wrote:
> "Christopher M. Riedl" <cmr@codefail.de> a écrit :
>
> > Usually sigset_t is exactly 8B which is a "trivial" size and does not
> > warrant using __copy_from_user(). Use __get_user() directly in
> > anticipation of future work to remove the trivial size optimizations
> > from __copy_from_user(). Calling __get_user() also results in a small
> > boost to signal handling throughput here.
> >
> > Signed-off-by: Christopher M. Riedl <cmr@codefail.de>
> > ---
> > arch/powerpc/kernel/signal_64.c | 14 ++++++++++++--
> > 1 file changed, 12 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/powerpc/kernel/signal_64.c
> > b/arch/powerpc/kernel/signal_64.c
> > index 817b64e1e409..42fdc4a7ff72 100644
> > --- a/arch/powerpc/kernel/signal_64.c
> > +++ b/arch/powerpc/kernel/signal_64.c
> > @@ -97,6 +97,14 @@ static void prepare_setup_sigcontext(struct
> > task_struct *tsk, int ctx_has_vsx_re
> > #endif /* CONFIG_VSX */
> > }
> >
> > +static inline int get_user_sigset(sigset_t *dst, const sigset_t *src)
>
> Should be called __get_user_sigset() as it is a helper for __get_user()
Ok makes sense.
>
> > +{
> > + if (sizeof(sigset_t) <= 8)
>
> We should always use __get_user(), see below.
>
> > + return __get_user(dst->sig[0], &src->sig[0]);
>
> I think the above will not work on ppc32, it will only copy 4 bytes.
> You must cast the source to u64*
Well this is signal_64.c :) Looks like ppc32 needs the same thing so
I'll just move this into signal.h and use it for both.
The only exception would be the COMPAT case in signal_32.c which ends up
calling the common get_compat_sigset(). Updating that is probably
outside the scope of this series.
>
> > + else
> > + return __copy_from_user(dst, src, sizeof(sigset_t));
>
> I see no point in keeping this alternative. Today sigset_ t is fixed.
> If you fear one day someone might change it to something different
> than a u64, just add a BUILD_BUG_ON(sizeof(sigset_t) != sizeof(u64));
Ah yes that is much better - thanks for the suggestion.
>
> > +}
> > +
> > /*
> > * Set up the sigcontext for the signal frame.
> > */
> > @@ -701,8 +709,9 @@ SYSCALL_DEFINE3(swapcontext, struct ucontext
> > __user *, old_ctx,
> > * We kill the task with a SIGSEGV in this situation.
> > */
> >
> > - if (__copy_from_user(&set, &new_ctx->uc_sigmask, sizeof(set)))
> > + if (get_user_sigset(&set, &new_ctx->uc_sigmask))
> > do_exit(SIGSEGV);
> > +
>
> This white space is not part of the change, keep patches to the
> minimum, avoid cosmetic
Just a (bad?) habit on my part that I missed - I'll remove this one and
the one further below.
>
> > set_current_blocked(&set);
> >
> > if (!user_read_access_begin(new_ctx, ctx_size))
> > @@ -740,8 +749,9 @@ SYSCALL_DEFINE0(rt_sigreturn)
> > if (!access_ok(uc, sizeof(*uc)))
> > goto badframe;
> >
> > - if (__copy_from_user(&set, &uc->uc_sigmask, sizeof(set)))
> > + if (get_user_sigset(&set, &uc->uc_sigmask))
> > goto badframe;
> > +
>
> Same
>
> > set_current_blocked(&set);
> >
> > #ifdef CONFIG_PPC_TRANSACTIONAL_MEM
> > --
> > 2.26.1
^ permalink raw reply
* Re: [PATCH v5 03/10] powerpc/signal64: Move non-inline functions out of setup_sigcontext()
From: Christopher M. Riedl @ 2021-02-10 4:37 UTC (permalink / raw)
To: Daniel Axtens, linuxppc-dev
In-Reply-To: <87czxbdv8c.fsf@dja-thinkpad.axtens.net>
On Sun Feb 7, 2021 at 10:44 PM CST, Daniel Axtens wrote:
> Hi Chris,
>
> These two paragraphs are a little confusing and they seem slightly
> repetitive. But I get the general idea. Two specific comments below:
Umm... yeah only one of those was supposed to be sent. I will reword
this for the next spin and address the comment below about how it is
not entirely clear that the inline functions are being moved out.
>
> > There are non-inline functions which get called in setup_sigcontext() to
> > save register state to the thread struct. Move these functions into a
> > separate prepare_setup_sigcontext() function so that
> > setup_sigcontext() can be refactored later into an "unsafe" version
> > which assumes an open uaccess window. Non-inline functions should be
> > avoided when uaccess is open.
>
> Why do we want to avoid non-inline functions? We came up with:
>
> - we want KUAP protection for as much of the kernel as possible: each
> extra bit of code run with the window open is another piece of attack
> surface.
>
> - non-inline functions default to traceable, which means we could end
> up ftracing while uaccess is enabled. That's a pretty big hole in the
> defences that KUAP provides.
>
> I think we've also had problems with the window being opened or closed
> unexpectedly by various bits of code? So the less code runs in uaccess
> context the less likely that is to occur.
That is my understanding as well.
>
> > The majority of setup_sigcontext() can be refactored to execute in an
> > "unsafe" context (uaccess window is opened) except for some non-inline
> > functions. Move these out into a separate prepare_setup_sigcontext()
> > function which must be called first and before opening up a uaccess
> > window. A follow-up commit converts setup_sigcontext() to be "unsafe".
>
> This was a bit confusing until we realise that you're moving the _calls_
> to the non-inline functions out, not the non-inline functions
> themselves.
>
> > Signed-off-by: Christopher M. Riedl <cmr@codefail.de>
> > ---
> > arch/powerpc/kernel/signal_64.c | 32 +++++++++++++++++++++-----------
> > 1 file changed, 21 insertions(+), 11 deletions(-)
> >
> > diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
> > index f9e4a1ac440f..b211a8ea4f6e 100644
> > --- a/arch/powerpc/kernel/signal_64.c
> > +++ b/arch/powerpc/kernel/signal_64.c
> > @@ -79,6 +79,24 @@ static elf_vrreg_t __user *sigcontext_vmx_regs(struct sigcontext __user *sc)
> > }
> > #endif
> >
> > +static void prepare_setup_sigcontext(struct task_struct *tsk, int ctx_has_vsx_region)
>
> ctx_has_vsx_region should probably be a bool? Although setup_sigcontext
> also has it as an int so I guess that's arguable, and maybe it's better
> to stick with this for constency.
I've been told not to introduce unrelated changes in my patches before
so chose to keep this as an int for consistency.
>
> > +{
> > +#ifdef CONFIG_ALTIVEC
> > + /* save altivec registers */
> > + if (tsk->thread.used_vr)
> > + flush_altivec_to_thread(tsk);
> > + if (cpu_has_feature(CPU_FTR_ALTIVEC))
> > + tsk->thread.vrsave = mfspr(SPRN_VRSAVE);
> > +#endif /* CONFIG_ALTIVEC */
> > +
> > + flush_fp_to_thread(tsk);
> > +
> > +#ifdef CONFIG_VSX
> > + if (tsk->thread.used_vsr && ctx_has_vsx_region)
> > + flush_vsx_to_thread(tsk);
> > +#endif /* CONFIG_VSX */
>
> Alternatively, given that this is the only use of ctx_has_vsx_region,
> mpe suggested that perhaps we could drop it entirely and always
> flush_vsx if used_vsr. The function is only ever called with either
> `current` or wth ctx_has_vsx_region set to 1, so in either case I think
> that's safe? I'm not sure if it would have performance implications.
I think that could work as long as we can guarantee that the context
passed to swapcontext will always be sufficiently sized if used_vsr,
which I think *has* to be the case?
>
> Should we move this and the altivec ifdef to IS_ENABLED(CONFIG_VSX) etc?
> I'm not sure if that runs into any problems with things like 'used_vsr'
> only being defined if CONFIG_VSX is set, but I thought I'd ask.
That's why I didn't use IS_ENABLED(CONFIG_...) here - all of these
field (used_vr, vrsave, used_vsr) declarations are guarded by #ifdefs :/
>
>
> > +}
> > +
> > /*
> > * Set up the sigcontext for the signal frame.
> > */
> > @@ -97,7 +115,6 @@ static long setup_sigcontext(struct sigcontext __user *sc,
> > */
> > #ifdef CONFIG_ALTIVEC
> > elf_vrreg_t __user *v_regs = sigcontext_vmx_regs(sc);
> > - unsigned long vrsave;
> > #endif
> > struct pt_regs *regs = tsk->thread.regs;
> > unsigned long msr = regs->msr;
> > @@ -112,7 +129,6 @@ static long setup_sigcontext(struct sigcontext __user *sc,
> >
> > /* save altivec registers */
> > if (tsk->thread.used_vr) {
> > - flush_altivec_to_thread(tsk);
> > /* Copy 33 vec registers (vr0..31 and vscr) to the stack */
> > err |= __copy_to_user(v_regs, &tsk->thread.vr_state,
> > 33 * sizeof(vector128));
> > @@ -124,17 +140,10 @@ static long setup_sigcontext(struct sigcontext __user *sc,
> > /* We always copy to/from vrsave, it's 0 if we don't have or don't
> > * use altivec.
> > */
> > - vrsave = 0;
> > - if (cpu_has_feature(CPU_FTR_ALTIVEC)) {
> > - vrsave = mfspr(SPRN_VRSAVE);
> > - tsk->thread.vrsave = vrsave;
> > - }
> > -
> > - err |= __put_user(vrsave, (u32 __user *)&v_regs[33]);
> > + err |= __put_user(tsk->thread.vrsave, (u32 __user *)&v_regs[33]);
>
> Previously, if !cpu_has_feature(ALTIVEC), v_regs[33] had vrsave stored,
> which was set to 0 explicitly. Now we store thread.vrsave instead of the
> local vrsave. That should be safe - it is initalised to 0 elsewhere.
>
> So you don't have to do anything here, this is just letting you know
> that we checked it and thought about it.
Thanks! I thought about adding a comment/note here as I had to convince
myself that thread.vrsave is indeed initialized to 0 before making this
change as well. I will mention it in the word-smithed commit message for
posterity.
>
> > #else /* CONFIG_ALTIVEC */
> > err |= __put_user(0, &sc->v_regs);
> > #endif /* CONFIG_ALTIVEC */
> > - flush_fp_to_thread(tsk);
> > /* copy fpr regs and fpscr */
> > err |= copy_fpr_to_user(&sc->fp_regs, tsk);
> >
> > @@ -150,7 +159,6 @@ static long setup_sigcontext(struct sigcontext __user *sc,
> > * VMX data.
> > */
> > if (tsk->thread.used_vsr && ctx_has_vsx_region) {
> > - flush_vsx_to_thread(tsk);
> > v_regs += ELF_NVRREG;
> > err |= copy_vsx_to_user(v_regs, tsk);
> > /* set MSR_VSX in the MSR value in the frame to
> > @@ -655,6 +663,7 @@ SYSCALL_DEFINE3(swapcontext, struct ucontext __user *, old_ctx,
> > ctx_has_vsx_region = 1;
> >
> > if (old_ctx != NULL) {
> > + prepare_setup_sigcontext(current, ctx_has_vsx_region);
> > if (!access_ok(old_ctx, ctx_size)
> > || setup_sigcontext(&old_ctx->uc_mcontext, current, 0, NULL, 0,
> > ctx_has_vsx_region)
>
> I had a think about whether there was a problem with bubbling
> prepare_setup_sigcontext over the access_ok() test, but given that
> prepare_setup_sigcontext(current ...) doesn't access any of old_ctx, I'm
> satisfied that it's OK - no changes needed.
Not sure I understand what you mean by 'bubbling over'?
>
>
> > @@ -842,6 +851,7 @@ int handle_rt_signal64(struct ksignal *ksig, sigset_t *set,
> > #endif
> > {
> > err |= __put_user(0, &frame->uc.uc_link);
> > + prepare_setup_sigcontext(tsk, 1);
>
> Why do we call with ctx_has_vsx_region = 1 here? It's not immediately
> clear to me why this is correct, but mpe and Mikey seem pretty convinced
> that it is.
I think it's because we always have a "complete" sigcontext w/ the VSX
save area here, unlike in swapcontext where we have to check. Also, the
following unsafe_setup_sigcontext() is called with ctx_has_vsx_region=1
so assumes that the VSX data was copied by prepare_setup_sigcontext().
>
> > err |= setup_sigcontext(&frame->uc.uc_mcontext, tsk, ksig->sig,
> > NULL, (unsigned long)ksig->ka.sa.sa_handler,
> > 1);
>
>
> Finally, it's a bit hard to figure out where to put this, but we spent
> some time making sure that the various things you moved into the
> prepare_setup_sigcontext() function were called under the same
> circumstances as they were before, and there were no concerns there.
Thanks for reviewing and double checking my work :)
>
> Kind regards,
> Daniel
^ permalink raw reply
* Re: [PATCH] mm/pmem: Avoid inserting hugepage PTE entry with fsdax if hugepage support is disabled
From: Pankaj Gupta @ 2021-02-10 5:18 UTC (permalink / raw)
To: Aneesh Kumar K.V
Cc: Jan Kara, linux-nvdimm, Linux MM, Dan Williams, linuxppc-dev,
Kirill A . Shutemov
In-Reply-To: <20210205023956.417587-1-aneesh.kumar@linux.ibm.com>
> Differentiate between hardware not supporting hugepages and user disabling THP
> via 'echo never > /sys/kernel/mm/transparent_hugepage/enabled'
>
> For the devdax namespace, the kernel handles the above via the
> supported_alignment attribute and failing to initialize the namespace
> if the namespace align value is not supported on the platform.
>
> For the fsdax namespace, the kernel will continue to initialize
> the namespace. This can result in the kernel creating a huge pte
> entry even though the hardware don't support the same.
>
> We do want hugepage support with pmem even if the end-user disabled THP
> via sysfs file (/sys/kernel/mm/transparent_hugepage/enabled). Hence
> differentiate between hardware/firmware lacking support vs user-controlled
> disable of THP and prevent a huge fault if the hardware lacks hugepage
> support.
>
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
> ---
> include/linux/huge_mm.h | 15 +++++++++------
> mm/huge_memory.c | 6 +++++-
> 2 files changed, 14 insertions(+), 7 deletions(-)
>
> diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
> index 6a19f35f836b..ba973efcd369 100644
> --- a/include/linux/huge_mm.h
> +++ b/include/linux/huge_mm.h
> @@ -78,6 +78,7 @@ static inline vm_fault_t vmf_insert_pfn_pud(struct vm_fault *vmf, pfn_t pfn,
> }
>
> enum transparent_hugepage_flag {
> + TRANSPARENT_HUGEPAGE_NEVER_DAX,
> TRANSPARENT_HUGEPAGE_FLAG,
> TRANSPARENT_HUGEPAGE_REQ_MADV_FLAG,
> TRANSPARENT_HUGEPAGE_DEFRAG_DIRECT_FLAG,
> @@ -123,6 +124,13 @@ extern unsigned long transparent_hugepage_flags;
> */
> static inline bool __transparent_hugepage_enabled(struct vm_area_struct *vma)
> {
> +
> + /*
> + * If the hardware/firmware marked hugepage support disabled.
> + */
> + if (transparent_hugepage_flags & (1 << TRANSPARENT_HUGEPAGE_NEVER_DAX))
> + return false;
> +
> if (vma->vm_flags & VM_NOHUGEPAGE)
> return false;
>
> @@ -134,12 +142,7 @@ static inline bool __transparent_hugepage_enabled(struct vm_area_struct *vma)
>
> if (transparent_hugepage_flags & (1 << TRANSPARENT_HUGEPAGE_FLAG))
> return true;
> - /*
> - * For dax vmas, try to always use hugepage mappings. If the kernel does
> - * not support hugepages, fsdax mappings will fallback to PAGE_SIZE
> - * mappings, and device-dax namespaces, that try to guarantee a given
> - * mapping size, will fail to enable
> - */
> +
> if (vma_is_dax(vma))
> return true;
>
> diff --git a/mm/huge_memory.c b/mm/huge_memory.c
> index 9237976abe72..d698b7e27447 100644
> --- a/mm/huge_memory.c
> +++ b/mm/huge_memory.c
> @@ -386,7 +386,11 @@ static int __init hugepage_init(void)
> struct kobject *hugepage_kobj;
>
> if (!has_transparent_hugepage()) {
> - transparent_hugepage_flags = 0;
> + /*
> + * Hardware doesn't support hugepages, hence disable
> + * DAX PMD support.
> + */
> + transparent_hugepage_flags = 1 << TRANSPARENT_HUGEPAGE_NEVER_DAX;
> return -EINVAL;
> }
Reviewed-by: Pankaj Gupta <pankaj.gupta@cloud.ionos.com>
^ permalink raw reply
* [PATCH] selftests/powerpc: Fix L1D flushing tests for Power10
From: Russell Currey @ 2021-02-10 5:22 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Russell Currey, dja
The rfi_flush and entry_flush selftests work by using the PM_LD_MISS_L1
perf event to count L1D misses. The value of this event has changed
over time:
- Power7 uses 0x400f0
- Power8 and Power9 use both 0x400f0 and 0x3e054
- Power10 uses only 0x3e054
Update these selftests to use the value 0x3e054 on P10 and later,
fixing the tests from finding 0 events.
Signed-off-by: Russell Currey <ruscur@russell.cc>
---
tools/testing/selftests/powerpc/security/entry_flush.c | 4 +++-
tools/testing/selftests/powerpc/security/flush_utils.c | 9 +++++++++
tools/testing/selftests/powerpc/security/flush_utils.h | 9 ++++++++-
tools/testing/selftests/powerpc/security/rfi_flush.c | 4 +++-
4 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/powerpc/security/entry_flush.c b/tools/testing/selftests/powerpc/security/entry_flush.c
index 78cf914fa321..ffcc93be7df1 100644
--- a/tools/testing/selftests/powerpc/security/entry_flush.c
+++ b/tools/testing/selftests/powerpc/security/entry_flush.c
@@ -26,6 +26,7 @@ int entry_flush_test(void)
__u64 l1d_misses_total = 0;
unsigned long iterations = 100000, zero_size = 24 * 1024;
unsigned long l1d_misses_expected;
+ unsigned long perf_l1d_miss_event;
int rfi_flush_orig;
int entry_flush, entry_flush_orig;
@@ -53,7 +54,8 @@ int entry_flush_test(void)
entry_flush = entry_flush_orig;
- fd = perf_event_open_counter(PERF_TYPE_RAW, /* L1d miss */ 0x400f0, -1);
+ perf_l1d_miss_event = get_perf_l1d_miss_event();
+ fd = perf_event_open_counter(PERF_TYPE_RAW, perf_l1d_miss_event, -1);
FAIL_IF(fd < 0);
p = (char *)memalign(zero_size, CACHELINE_SIZE);
diff --git a/tools/testing/selftests/powerpc/security/flush_utils.c b/tools/testing/selftests/powerpc/security/flush_utils.c
index 0c3c4c40c7fb..7a5ef1a7a228 100644
--- a/tools/testing/selftests/powerpc/security/flush_utils.c
+++ b/tools/testing/selftests/powerpc/security/flush_utils.c
@@ -68,3 +68,12 @@ void set_dscr(unsigned long val)
asm volatile("mtspr %1,%0" : : "r" (val), "i" (SPRN_DSCR));
}
+
+unsigned long get_perf_l1d_miss_event(void)
+{
+ bool is_p10_or_later = ((mfspr(SPRN_PVR) >> 16) & 0xFFFF) >= 0x80;
+
+ if (is_p10_or_later)
+ return PERF_L1D_MISS_P10;
+ return PERF_L1D_MISS_P7;
+}
diff --git a/tools/testing/selftests/powerpc/security/flush_utils.h b/tools/testing/selftests/powerpc/security/flush_utils.h
index 07a5eb301466..c60d15f3eb4b 100644
--- a/tools/testing/selftests/powerpc/security/flush_utils.h
+++ b/tools/testing/selftests/powerpc/security/flush_utils.h
@@ -7,11 +7,18 @@
#ifndef _SELFTESTS_POWERPC_SECURITY_FLUSH_UTILS_H
#define _SELFTESTS_POWERPC_SECURITY_FLUSH_UTILS_H
-#define CACHELINE_SIZE 128
+#define CACHELINE_SIZE 128
+
+#define SPRN_PVR 287
+
+#define PERF_L1D_MISS_P7 0x400f0
+#define PERF_L1D_MISS_P10 0x3e054
void syscall_loop(char *p, unsigned long iterations,
unsigned long zero_size);
void set_dscr(unsigned long val);
+unsigned long get_perf_l1d_miss_event(void);
+
#endif /* _SELFTESTS_POWERPC_SECURITY_FLUSH_UTILS_H */
diff --git a/tools/testing/selftests/powerpc/security/rfi_flush.c b/tools/testing/selftests/powerpc/security/rfi_flush.c
index 7565fd786640..edf67c91ef79 100644
--- a/tools/testing/selftests/powerpc/security/rfi_flush.c
+++ b/tools/testing/selftests/powerpc/security/rfi_flush.c
@@ -26,6 +26,7 @@ int rfi_flush_test(void)
__u64 l1d_misses_total = 0;
unsigned long iterations = 100000, zero_size = 24 * 1024;
unsigned long l1d_misses_expected;
+ unsigned long perf_l1d_miss_event;
int rfi_flush_orig, rfi_flush;
int have_entry_flush, entry_flush_orig;
@@ -54,7 +55,8 @@ int rfi_flush_test(void)
rfi_flush = rfi_flush_orig;
- fd = perf_event_open_counter(PERF_TYPE_RAW, /* L1d miss */ 0x400f0, -1);
+ perf_l1d_miss_event = get_perf_l1d_miss_event();
+ fd = perf_event_open_counter(PERF_TYPE_RAW, perf_l1d_miss_event, -1);
FAIL_IF(fd < 0);
p = (char *)memalign(zero_size, CACHELINE_SIZE);
--
2.30.1
^ permalink raw reply related
* [powerpc:merge] BUILD SUCCESS 393ff0ee1405c44af2720c953d1090b9bb8d0226
From: kernel test robot @ 2021-02-10 5:41 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git merge
branch HEAD: 393ff0ee1405c44af2720c953d1090b9bb8d0226 Automatic merge of 'master' into merge (2021-02-07 21:53)
elapsed time: 1361m
configs tested: 125
configs skipped: 2
The following configs have been built successfully.
More configs may be tested in the coming days.
gcc tested configs:
arm defconfig
arm64 allyesconfig
arm64 defconfig
arm allyesconfig
arm allmodconfig
m68k m5208evb_defconfig
sh edosk7760_defconfig
sparc alldefconfig
arm palmz72_defconfig
h8300 h8300h-sim_defconfig
powerpc ep88xc_defconfig
arm zx_defconfig
x86_64 alldefconfig
mips rb532_defconfig
powerpc mpc836x_mds_defconfig
sh rts7751r2d1_defconfig
powerpc klondike_defconfig
arm sunxi_defconfig
powerpc sam440ep_defconfig
nios2 defconfig
m68k m5307c3_defconfig
m68k m5275evb_defconfig
xtensa common_defconfig
powerpc mpc8315_rdb_defconfig
arm versatile_defconfig
powerpc stx_gp3_defconfig
sh sh7785lcr_defconfig
riscv nommu_k210_defconfig
mips rm200_defconfig
arm aspeed_g5_defconfig
powerpc bamboo_defconfig
powerpc mpc85xx_cds_defconfig
arm zeus_defconfig
powerpc pq2fads_defconfig
mips e55_defconfig
powerpc mpc837x_rdb_defconfig
arc vdk_hs38_defconfig
mips rs90_defconfig
powerpc sequoia_defconfig
powerpc taishan_defconfig
mips maltaaprp_defconfig
arm cns3420vb_defconfig
alpha allyesconfig
sh shx3_defconfig
arm ixp4xx_defconfig
xtensa nommu_kc705_defconfig
arm hackkit_defconfig
m68k m5475evb_defconfig
arm stm32_defconfig
sh rsk7201_defconfig
h8300 edosk2674_defconfig
powerpc socrates_defconfig
powerpc mpc832x_rdb_defconfig
powerpc mpc8313_rdb_defconfig
powerpc ppc40x_defconfig
m68k multi_defconfig
ia64 allmodconfig
ia64 defconfig
ia64 allyesconfig
m68k allmodconfig
m68k defconfig
m68k allyesconfig
arc allyesconfig
nds32 allnoconfig
c6x allyesconfig
nds32 defconfig
nios2 allyesconfig
csky defconfig
alpha defconfig
xtensa allyesconfig
h8300 allyesconfig
arc defconfig
sh allmodconfig
parisc defconfig
s390 allyesconfig
s390 allmodconfig
parisc allyesconfig
s390 defconfig
i386 allyesconfig
sparc allyesconfig
sparc defconfig
i386 tinyconfig
i386 defconfig
mips allyesconfig
mips allmodconfig
powerpc allyesconfig
powerpc allmodconfig
powerpc allnoconfig
x86_64 randconfig-a006-20210209
x86_64 randconfig-a001-20210209
x86_64 randconfig-a005-20210209
x86_64 randconfig-a004-20210209
x86_64 randconfig-a002-20210209
x86_64 randconfig-a003-20210209
i386 randconfig-a001-20210209
i386 randconfig-a005-20210209
i386 randconfig-a003-20210209
i386 randconfig-a002-20210209
i386 randconfig-a006-20210209
i386 randconfig-a004-20210209
i386 randconfig-a016-20210209
i386 randconfig-a013-20210209
i386 randconfig-a012-20210209
i386 randconfig-a014-20210209
i386 randconfig-a011-20210209
i386 randconfig-a015-20210209
riscv allyesconfig
riscv nommu_virt_defconfig
riscv allnoconfig
riscv defconfig
riscv rv32_defconfig
riscv allmodconfig
x86_64 rhel
x86_64 allyesconfig
x86_64 rhel-7.6-kselftests
x86_64 defconfig
x86_64 rhel-8.3
x86_64 rhel-8.3-kbuiltin
x86_64 kexec
clang tested configs:
x86_64 randconfig-a013-20210209
x86_64 randconfig-a014-20210209
x86_64 randconfig-a015-20210209
x86_64 randconfig-a012-20210209
x86_64 randconfig-a016-20210209
x86_64 randconfig-a011-20210209
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply
* [powerpc:fixes-test] BUILD SUCCESS 8c511eff1827239f24ded212b1bcda7ca5b16203
From: kernel test robot @ 2021-02-10 5:41 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git fixes-test
branch HEAD: 8c511eff1827239f24ded212b1bcda7ca5b16203 powerpc/kuap: Allow kernel thread to access userspace after kthread_use_mm
elapsed time: 5331m
configs tested: 245
configs skipped: 23
The following configs have been built successfully.
More configs may be tested in the coming days.
gcc tested configs:
arm defconfig
arm64 allyesconfig
arm allyesconfig
arm allmodconfig
arm64 defconfig
powerpc tqm8xx_defconfig
m68k q40_defconfig
powerpc tqm5200_defconfig
openrisc defconfig
sh shx3_defconfig
m68k m5208evb_defconfig
sh edosk7760_defconfig
sparc alldefconfig
arm palmz72_defconfig
h8300 h8300h-sim_defconfig
sh r7785rp_defconfig
sparc64 defconfig
arm am200epdkit_defconfig
sh shmin_defconfig
powerpc tqm8540_defconfig
mips ci20_defconfig
nds32 allnoconfig
mips tb0226_defconfig
riscv defconfig
xtensa cadence_csp_defconfig
powerpc ep88xc_defconfig
arm zx_defconfig
x86_64 alldefconfig
mips rb532_defconfig
powerpc mpc836x_mds_defconfig
m68k m5249evb_defconfig
sh sh7770_generic_defconfig
mips cobalt_defconfig
arc nsimosci_defconfig
xtensa virt_defconfig
microblaze defconfig
powerpc ksi8560_defconfig
sh sh03_defconfig
mips rs90_defconfig
powerpc pseries_defconfig
arm spear13xx_defconfig
powerpc kmeter1_defconfig
mips lemote2f_defconfig
mips rt305x_defconfig
mips fuloong2e_defconfig
powerpc mpc8313_rdb_defconfig
arm exynos_defconfig
arm ixp4xx_defconfig
arm colibri_pxa300_defconfig
powerpc mpc832x_rdb_defconfig
powerpc ppc6xx_defconfig
powerpc wii_defconfig
arc axs103_defconfig
powerpc sam440ep_defconfig
nios2 defconfig
m68k m5307c3_defconfig
m68k m5275evb_defconfig
xtensa common_defconfig
powerpc mpc8315_rdb_defconfig
mips pic32mzda_defconfig
mips maltaup_defconfig
mips rbtx49xx_defconfig
ia64 gensparse_defconfig
sh lboxre2_defconfig
s390 debug_defconfig
openrisc or1klitex_defconfig
powerpc linkstation_defconfig
arm xcep_defconfig
powerpc mpc7448_hpc2_defconfig
ia64 alldefconfig
mips cu1830-neo_defconfig
arm mini2440_defconfig
arm ep93xx_defconfig
arm sunxi_defconfig
powerpc makalu_defconfig
riscv nommu_k210_defconfig
sh kfr2r09-romimage_defconfig
powerpc mpc8560_ads_defconfig
arm s5pv210_defconfig
sh rts7751r2d1_defconfig
arm stm32_defconfig
mips bmips_be_defconfig
um kunit_defconfig
powerpc ppa8548_defconfig
arc allyesconfig
arm versatile_defconfig
powerpc stx_gp3_defconfig
sh sh7785lcr_defconfig
arm sama5_defconfig
sh sh7763rdp_defconfig
mips bcm47xx_defconfig
openrisc or1ksim_defconfig
powerpc pasemi_defconfig
arm mxs_defconfig
arc alldefconfig
mips ath79_defconfig
c6x evmc6474_defconfig
arm pxa3xx_defconfig
powerpc socrates_defconfig
xtensa smp_lx200_defconfig
mips jmr3927_defconfig
powerpc ppc64_defconfig
c6x allyesconfig
mips rm200_defconfig
arm aspeed_g5_defconfig
powerpc bamboo_defconfig
powerpc mpc85xx_cds_defconfig
xtensa audio_kc705_defconfig
sh allmodconfig
m68k alldefconfig
powerpc adder875_defconfig
sh migor_defconfig
mips sb1250_swarm_defconfig
arm zeus_defconfig
powerpc pq2fads_defconfig
mips e55_defconfig
powerpc mpc837x_rdb_defconfig
arm vt8500_v6_v7_defconfig
arm pxa_defconfig
mips xway_defconfig
arm netwinder_defconfig
mips gpr_defconfig
arc vdk_hs38_defconfig
powerpc sequoia_defconfig
powerpc taishan_defconfig
alpha defconfig
mips maltaaprp_defconfig
m68k m5475evb_defconfig
mips malta_defconfig
m68k mvme147_defconfig
arm cns3420vb_defconfig
alpha allyesconfig
xtensa nommu_kc705_defconfig
arm mvebu_v7_defconfig
arm s3c2410_defconfig
powerpc cell_defconfig
sh rts7751r2dplus_defconfig
arm hackkit_defconfig
sh rsk7201_defconfig
m68k allyesconfig
arc axs101_defconfig
openrisc simple_smp_defconfig
powerpc mpc8540_ads_defconfig
m68k mac_defconfig
sh dreamcast_defconfig
mips decstation_r4k_defconfig
arm imx_v4_v5_defconfig
microblaze mmu_defconfig
sh sh7785lcr_32bit_defconfig
nios2 3c120_defconfig
powerpc powernv_defconfig
sh sh7710voipgw_defconfig
h8300 edosk2674_defconfig
powerpc ppc40x_defconfig
m68k multi_defconfig
arm socfpga_defconfig
um x86_64_defconfig
arm lart_defconfig
arm keystone_defconfig
ia64 allmodconfig
ia64 defconfig
ia64 allyesconfig
m68k allmodconfig
m68k defconfig
nds32 defconfig
nios2 allyesconfig
csky defconfig
xtensa allyesconfig
h8300 allyesconfig
arc defconfig
parisc defconfig
s390 allyesconfig
s390 allmodconfig
parisc allyesconfig
s390 defconfig
i386 allyesconfig
sparc allyesconfig
sparc defconfig
i386 tinyconfig
i386 defconfig
mips allyesconfig
mips allmodconfig
powerpc allyesconfig
powerpc allmodconfig
powerpc allnoconfig
x86_64 randconfig-a006-20210209
x86_64 randconfig-a001-20210209
x86_64 randconfig-a005-20210209
x86_64 randconfig-a004-20210209
x86_64 randconfig-a002-20210209
x86_64 randconfig-a003-20210209
i386 randconfig-a001-20210209
i386 randconfig-a005-20210209
i386 randconfig-a003-20210209
i386 randconfig-a002-20210209
i386 randconfig-a006-20210209
i386 randconfig-a004-20210209
i386 randconfig-a001-20210206
i386 randconfig-a005-20210206
i386 randconfig-a003-20210206
i386 randconfig-a006-20210206
i386 randconfig-a002-20210206
i386 randconfig-a004-20210206
x86_64 randconfig-a013-20210206
x86_64 randconfig-a014-20210206
x86_64 randconfig-a015-20210206
x86_64 randconfig-a011-20210206
x86_64 randconfig-a016-20210206
x86_64 randconfig-a012-20210206
i386 randconfig-a016-20210209
i386 randconfig-a013-20210209
i386 randconfig-a012-20210209
i386 randconfig-a014-20210209
i386 randconfig-a011-20210209
i386 randconfig-a015-20210209
i386 randconfig-a013-20210206
i386 randconfig-a016-20210206
i386 randconfig-a014-20210206
i386 randconfig-a012-20210206
i386 randconfig-a015-20210206
i386 randconfig-a011-20210206
riscv allyesconfig
riscv nommu_virt_defconfig
riscv allnoconfig
riscv rv32_defconfig
riscv allmodconfig
x86_64 rhel
x86_64 allyesconfig
x86_64 rhel-7.6-kselftests
x86_64 defconfig
x86_64 rhel-8.3
x86_64 rhel-8.3-kbuiltin
x86_64 kexec
clang tested configs:
x86_64 randconfig-a013-20210209
x86_64 randconfig-a014-20210209
x86_64 randconfig-a015-20210209
x86_64 randconfig-a012-20210209
x86_64 randconfig-a016-20210209
x86_64 randconfig-a011-20210209
x86_64 randconfig-a006-20210206
x86_64 randconfig-a001-20210206
x86_64 randconfig-a005-20210206
x86_64 randconfig-a002-20210206
x86_64 randconfig-a004-20210206
x86_64 randconfig-a003-20210206
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply
* [powerpc:next-test] BUILD REGRESSION 5811244192fc4e18c001c69300044c2acf30bd91
From: kernel test robot @ 2021-02-10 5:41 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test
branch HEAD: 5811244192fc4e18c001c69300044c2acf30bd91 powerpc/64s: power4 nap fixup in C
Error/Warning reports:
https://lore.kernel.org/linuxppc-dev/202102100438.UVRTpNeN-lkp@intel.com
https://lore.kernel.org/linuxppc-dev/202102100601.eLtCMofO-lkp@intel.com
https://lore.kernel.org/linuxppc-dev/202102101057.KqISSfvf-lkp@intel.com
Error/Warning in current branch:
arch/powerpc/mm/book3s64/radix_tlb.c:646:6: warning: no previous prototype for function 'exit_lazy_flush_tlb' [-Wmissing-prototypes]
arch/powerpc/platforms/83xx/km83xx.c:183:19: error: 'mpc83xx_setup_pci' undeclared here (not in a function); did you mean 'mpc83xx_setup_arch'?
arch/powerpc/platforms/amigaone/setup.c:73:13: error: no previous prototype for 'amigaone_discover_phbs' [-Werror=missing-prototypes]
possible Error/Warning in current branch:
arch/powerpc/mm/book3s64/radix_tlb.c:646:6: error: no previous prototype for 'exit_lazy_flush_tlb' [-Werror=missing-prototypes]
Error/Warning ids grouped by kconfigs:
gcc_recent_errors
|-- powerpc-cell_defconfig
| `-- arch-powerpc-mm-book3s64-radix_tlb.c:error:no-previous-prototype-for-exit_lazy_flush_tlb
|-- powerpc-kmeter1_defconfig
| `-- arch-powerpc-platforms-83xx-km83xx.c:error:mpc83xx_setup_pci-undeclared-here-(not-in-a-function)
|-- powerpc-pasemi_defconfig
| `-- arch-powerpc-mm-book3s64-radix_tlb.c:error:no-previous-prototype-for-exit_lazy_flush_tlb
|-- powerpc-ppc64_defconfig
| `-- arch-powerpc-mm-book3s64-radix_tlb.c:error:no-previous-prototype-for-exit_lazy_flush_tlb
`-- powerpc64-randconfig-r036-20210209
`-- arch-powerpc-platforms-amigaone-setup.c:error:no-previous-prototype-for-amigaone_discover_phbs
clang_recent_errors
`-- powerpc-randconfig-r026-20210209
`-- arch-powerpc-mm-book3s64-radix_tlb.c:warning:no-previous-prototype-for-function-exit_lazy_flush_tlb
elapsed time: 720m
configs tested: 116
configs skipped: 2
gcc tested configs:
arm defconfig
arm64 allyesconfig
arm64 defconfig
arm allyesconfig
arm allmodconfig
powerpc pasemi_defconfig
arm mxs_defconfig
arc alldefconfig
mips ath79_defconfig
c6x evmc6474_defconfig
arm pxa3xx_defconfig
powerpc socrates_defconfig
xtensa smp_lx200_defconfig
mips jmr3927_defconfig
powerpc ppc64_defconfig
c6x allyesconfig
xtensa audio_kc705_defconfig
sh allmodconfig
arm vt8500_v6_v7_defconfig
arm pxa_defconfig
mips xway_defconfig
arm netwinder_defconfig
mips gpr_defconfig
arc vdk_hs38_defconfig
mips rs90_defconfig
powerpc sequoia_defconfig
powerpc taishan_defconfig
alpha defconfig
mips maltaaprp_defconfig
arc allyesconfig
m68k m5475evb_defconfig
arm stm32_defconfig
mips malta_defconfig
m68k mvme147_defconfig
arm cns3420vb_defconfig
alpha allyesconfig
sh shx3_defconfig
arm ixp4xx_defconfig
xtensa nommu_kc705_defconfig
arm mvebu_v7_defconfig
arm s3c2410_defconfig
powerpc cell_defconfig
sh rts7751r2dplus_defconfig
arm hackkit_defconfig
sh rsk7201_defconfig
arm imx_v4_v5_defconfig
arm am200epdkit_defconfig
microblaze mmu_defconfig
sh sh7785lcr_32bit_defconfig
ia64 allmodconfig
ia64 defconfig
ia64 allyesconfig
m68k allmodconfig
m68k defconfig
m68k allyesconfig
nios2 defconfig
nds32 allnoconfig
nds32 defconfig
nios2 allyesconfig
csky defconfig
xtensa allyesconfig
h8300 allyesconfig
arc defconfig
parisc defconfig
s390 allyesconfig
s390 allmodconfig
parisc allyesconfig
s390 defconfig
i386 allyesconfig
sparc allyesconfig
sparc defconfig
i386 tinyconfig
i386 defconfig
mips allyesconfig
mips allmodconfig
powerpc allyesconfig
powerpc allmodconfig
powerpc allnoconfig
x86_64 randconfig-a006-20210209
x86_64 randconfig-a001-20210209
x86_64 randconfig-a005-20210209
x86_64 randconfig-a004-20210209
x86_64 randconfig-a002-20210209
x86_64 randconfig-a003-20210209
i386 randconfig-a001-20210209
i386 randconfig-a005-20210209
i386 randconfig-a003-20210209
i386 randconfig-a002-20210209
i386 randconfig-a006-20210209
i386 randconfig-a004-20210209
i386 randconfig-a016-20210209
i386 randconfig-a013-20210209
i386 randconfig-a012-20210209
i386 randconfig-a014-20210209
i386 randconfig-a011-20210209
i386 randconfig-a015-20210209
riscv nommu_k210_defconfig
riscv allyesconfig
riscv nommu_virt_defconfig
riscv allnoconfig
riscv defconfig
riscv rv32_defconfig
riscv allmodconfig
x86_64 rhel-7.6-kselftests
x86_64 rhel-8.3
x86_64 rhel-8.3-kbuiltin
x86_64 rhel
x86_64 allyesconfig
x86_64 defconfig
x86_64 kexec
clang tested configs:
x86_64 randconfig-a013-20210209
x86_64 randconfig-a014-20210209
x86_64 randconfig-a015-20210209
x86_64 randconfig-a012-20210209
x86_64 randconfig-a016-20210209
x86_64 randconfig-a011-20210209
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply
* [powerpc:next] BUILD SUCCESS e7eb919057c3450cdd9d335e4a23a4da8da58db4
From: kernel test robot @ 2021-02-10 5:41 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
branch HEAD: e7eb919057c3450cdd9d335e4a23a4da8da58db4 powerpc/64s: Handle program checks in wrong endian during early boot
elapsed time: 1360m
configs tested: 158
configs skipped: 2
The following configs have been built successfully.
More configs may be tested in the coming days.
gcc tested configs:
arm defconfig
arm64 allyesconfig
arm64 defconfig
arm allyesconfig
arm allmodconfig
m68k m5208evb_defconfig
sh edosk7760_defconfig
sparc alldefconfig
arm palmz72_defconfig
h8300 h8300h-sim_defconfig
arm davinci_all_defconfig
s390 debug_defconfig
arm hackkit_defconfig
sh se7721_defconfig
powerpc ep88xc_defconfig
arm zx_defconfig
x86_64 alldefconfig
mips rb532_defconfig
powerpc mpc836x_mds_defconfig
sh sh03_defconfig
mips rs90_defconfig
sparc64 defconfig
sh shx3_defconfig
powerpc ksi8560_defconfig
powerpc sam440ep_defconfig
nios2 defconfig
m68k m5307c3_defconfig
m68k m5275evb_defconfig
xtensa common_defconfig
powerpc mpc8315_rdb_defconfig
mips cu1830-neo_defconfig
arm mini2440_defconfig
arm ep93xx_defconfig
arm sunxi_defconfig
powerpc makalu_defconfig
powerpc pasemi_defconfig
arm mxs_defconfig
arc alldefconfig
mips ath79_defconfig
c6x evmc6474_defconfig
arm pxa3xx_defconfig
powerpc socrates_defconfig
xtensa smp_lx200_defconfig
mips jmr3927_defconfig
powerpc ppc64_defconfig
c6x allyesconfig
riscv nommu_k210_defconfig
mips rm200_defconfig
arm aspeed_g5_defconfig
powerpc bamboo_defconfig
powerpc mpc85xx_cds_defconfig
xtensa audio_kc705_defconfig
sh allmodconfig
arm zeus_defconfig
powerpc pq2fads_defconfig
mips e55_defconfig
powerpc mpc837x_rdb_defconfig
arm vt8500_v6_v7_defconfig
arm pxa_defconfig
mips xway_defconfig
arm netwinder_defconfig
mips gpr_defconfig
arc vdk_hs38_defconfig
powerpc sequoia_defconfig
powerpc taishan_defconfig
alpha defconfig
mips maltaaprp_defconfig
arc allyesconfig
m68k m5475evb_defconfig
arm stm32_defconfig
mips malta_defconfig
m68k mvme147_defconfig
arm cns3420vb_defconfig
arm ixp4xx_defconfig
xtensa nommu_kc705_defconfig
alpha allyesconfig
arm mvebu_v7_defconfig
arm s3c2410_defconfig
powerpc cell_defconfig
sh rts7751r2dplus_defconfig
powerpc mpc8540_ads_defconfig
m68k mac_defconfig
sh dreamcast_defconfig
mips decstation_r4k_defconfig
arm imx_v4_v5_defconfig
arm am200epdkit_defconfig
microblaze mmu_defconfig
sh sh7785lcr_32bit_defconfig
h8300 edosk2674_defconfig
powerpc mpc832x_rdb_defconfig
powerpc mpc8313_rdb_defconfig
powerpc ppc40x_defconfig
m68k multi_defconfig
ia64 allmodconfig
ia64 defconfig
ia64 allyesconfig
m68k allmodconfig
m68k defconfig
m68k allyesconfig
nds32 allnoconfig
nds32 defconfig
nios2 allyesconfig
csky defconfig
xtensa allyesconfig
h8300 allyesconfig
arc defconfig
parisc defconfig
s390 allyesconfig
s390 allmodconfig
parisc allyesconfig
s390 defconfig
i386 allyesconfig
sparc allyesconfig
sparc defconfig
i386 tinyconfig
i386 defconfig
mips allyesconfig
mips allmodconfig
powerpc allyesconfig
powerpc allmodconfig
powerpc allnoconfig
x86_64 randconfig-a006-20210209
x86_64 randconfig-a001-20210209
x86_64 randconfig-a005-20210209
x86_64 randconfig-a004-20210209
x86_64 randconfig-a002-20210209
x86_64 randconfig-a003-20210209
i386 randconfig-a001-20210209
i386 randconfig-a005-20210209
i386 randconfig-a003-20210209
i386 randconfig-a002-20210209
i386 randconfig-a006-20210209
i386 randconfig-a004-20210209
i386 randconfig-a016-20210209
i386 randconfig-a013-20210209
i386 randconfig-a012-20210209
i386 randconfig-a014-20210209
i386 randconfig-a011-20210209
i386 randconfig-a015-20210209
riscv allyesconfig
riscv nommu_virt_defconfig
riscv allnoconfig
riscv defconfig
riscv rv32_defconfig
riscv allmodconfig
x86_64 rhel
x86_64 allyesconfig
x86_64 rhel-7.6-kselftests
x86_64 defconfig
x86_64 rhel-8.3
x86_64 rhel-8.3-kbuiltin
x86_64 kexec
clang tested configs:
x86_64 randconfig-a013-20210209
x86_64 randconfig-a014-20210209
x86_64 randconfig-a015-20210209
x86_64 randconfig-a012-20210209
x86_64 randconfig-a016-20210209
x86_64 randconfig-a011-20210209
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply
* Re: [PATCH v2 2/7] ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg
From: Shengjiu Wang @ 2021-02-10 6:35 UTC (permalink / raw)
To: Mark Brown
Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
alsa-devel, Timur Tabi, Xiubo Li, Fabio Estevam, Shengjiu Wang,
Takashi Iwai, Liam Girdwood, linux-kernel, Nicolin Chen,
Rob Herring, linuxppc-dev
In-Reply-To: <20210209222953.GF4916@sirena.org.uk>
On Wed, Feb 10, 2021 at 6:30 AM Mark Brown <broonie@kernel.org> wrote:
>
> On Tue, Feb 09, 2021 at 05:16:16PM +0800, Shengjiu Wang wrote:
> > On Mon, Feb 8, 2021 at 7:53 PM Mark Brown <broonie@kernel.org> wrote:
>
> > > hw_params() can be called multiple times and there's no need for it to
> > > be balanced with hw_free(), I'd move this to a different callback (DAPM
> > > should work well).
>
> > Which callback should I use? Is there an example?
>
> Like I say I'd actually recommend moving this control to DAPM.
I may understand your point, you suggest to use the .set_bias_level
interface. But in my case I need to enable the clock in earlier stage
and keep the clock on when system go to suspend.
I am not sure .set_bias_level can met my requirement. we start
the Chinese new year holiday now, so currently I can't do test for this
recommendation.
Maybe we can keep current implementation, can we?
Later after I do the test, I can submit another patch for it.
Best regards
Wang Shengjiu
^ permalink raw reply
* Re: [PATCH 00/20] Rid W=1 warnings in Crypto
From: Herbert Xu @ 2021-02-10 6:51 UTC (permalink / raw)
To: Lee Jones
Cc: Alexandre Belloni, Aymen Sghaier, Takashi Iwai, Kent Yoder,
Ayush Sawal, Joakim Bech, Gustavo A. R. Silva, Paul Mackerras,
Andreas Westin, Breno Leitão, Atul Gupta, Niklas Hernaeus,
M R Gowda, Horia Geantă, Rohit Maheshwari, Nayna Jain,
Manoj Malviya, Ludovic Desroches, Jonas Linde, Rob Rice, Zaibo Xu,
Harsh Jain, Declan Murphy, Vinay Kumar Yadav, Tudor Ambarus,
Nicolas Ferre, Shujuan Chen, Henrique Cerri,
Daniele Alessandrelli, linux-arm-kernel, Jonathan Cameron,
linux-kernel, Berne Hebark, linux-crypto, Jitendra Lulla,
Paulo Flabiano Smorigo, linuxppc-dev, David S. Miller
In-Reply-To: <20210204111000.2800436-1-lee.jones@linaro.org>
On Thu, Feb 04, 2021 at 11:09:40AM +0000, Lee Jones wrote:
> This set is part of a larger effort attempting to clean-up W=1
> kernel builds, which are currently overwhelmingly riddled with
> niggly little warnings.
>
> This is set 1 of 2 sets required to fully clean Crypto.
>
> Lee Jones (20):
> crypto: hisilicon: sec_drv: Supply missing description for
> 'sec_queue_empty()'s 'queue' param
> crypto: bcm: util: Repair a couple of documentation formatting issues
> crypto: chelsio: chcr_core: File headers are not good candidates for
> kernel-doc
> crypto: ux500: hash: hash_core: Fix worthy kernel-doc headers and
> remove others
> crypto: bcm: spu: Fix formatting and misspelling issues
> crypto: keembay: ocs-hcu: Fix incorrectly named functions/structs
> crypto: bcm: spu2: Fix a whole host of kernel-doc misdemeanours
> crypto: ux500: cryp: Demote some conformant non-kernel headers fix
> another
> crypto: ux500: cryp_irq: File headers are not good kernel-doc
> candidates
> crypto: chelsio: chcr_algo: Fix a couple of kernel-doc issues caused
> by doc-rot
> crypto: ux500: cryp_core: Fix formatting issue and add description for
> 'session_id'
> crypto: atmel-ecc: Struct headers need to start with keyword 'struct'
> crypto: bcm: cipher: Provide description for 'req' and fix formatting
> issues
> crypto: caam: caampkc: Provide the name of the function
> crypto: caam: caamalg_qi2: Supply a couple of 'fallback' related
> descriptions
> crypto: vmx: Source headers are not good kernel-doc candidates
> crypto: nx: nx-aes-cbc: Headers comments should not be kernel-doc
> crypto: nx: nx_debugfs: Header comments should not be kernel-doc
> crypto: nx: Demote header comment and add description for 'nbytes'
> crypto: cavium: nitrox_isr: Demote non-compliant kernel-doc headers
Thanks for doing this. But please don't split the patches at the
file level. Instead split them at the driver level. For example,
all of your bcm changes should be one patch.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ 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