* RE: [PATCH] usb: gadget: fsl: fix null pointer checking
From: Peter Chen @ 2020-10-16 6:11 UTC (permalink / raw)
To: Ran Wang, Leo Li, Felipe Balbi, Greg Kroah-Hartman
Cc: linux-usb@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org, Ran Wang
In-Reply-To: <20201016043326.40442-1-ran.wang_1@nxp.com>
>
> Fixes: 75eaa498c99e (“usb: gadget: Correct NULL pointer checking in fsl
> gadget”)
> Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
> ---
> drivers/usb/gadget/udc/fsl_udc_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c
> b/drivers/usb/gadget/udc/fsl_udc_core.c
> index de528e3..ad6ff9c 100644
> --- a/drivers/usb/gadget/udc/fsl_udc_core.c
> +++ b/drivers/usb/gadget/udc/fsl_udc_core.c
> @@ -1051,7 +1051,7 @@ static int fsl_ep_fifo_status(struct usb_ep *_ep)
> u32 bitmask;
> struct ep_queue_head *qh;
>
> - if (!_ep || _ep->desc || !(_ep->desc->bEndpointAddress&0xF))
> + if (!_ep || !_ep->desc || !(_ep->desc->bEndpointAddress&0xF))
> return -ENODEV;
>
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Peter
^ permalink raw reply
* Re: [PATCH 1/8] powerpc/uaccess: Add unsafe_copy_from_user
From: Christoph Hellwig @ 2020-10-16 6:54 UTC (permalink / raw)
To: Christopher M. Riedl; +Cc: linuxppc-dev, linux-kernel, viro
In-Reply-To: <20201015150159.28933-2-cmr@codefail.de>
On Thu, Oct 15, 2020 at 10:01:52AM -0500, Christopher M. Riedl wrote:
> Implement raw_copy_from_user_allowed() which assumes that userspace read
> access is open. Use this new function to implement raw_copy_from_user().
> Finally, wrap the new function to follow the usual "unsafe_" convention
> of taking a label argument. The new raw_copy_from_user_allowed() calls
> __copy_tofrom_user() internally, but this is still safe to call in user
> access blocks formed with user_*_access_begin()/user_*_access_end()
> since asm functions are not instrumented for tracing.
Please also add a fallback unsafe_copy_from_user to linux/uaccess.h
so this can be used as a generic API.
^ permalink raw reply
* Re: [PATCH 3/8] powerpc: Mark functions called inside uaccess blocks w/ 'notrace'
From: Christoph Hellwig @ 2020-10-16 6:56 UTC (permalink / raw)
To: Christopher M. Riedl; +Cc: peterz, linuxppc-dev, linux-kernel
In-Reply-To: <20201015150159.28933-4-cmr@codefail.de>
On Thu, Oct 15, 2020 at 10:01:54AM -0500, Christopher M. Riedl wrote:
> Functions called between user_*_access_begin() and user_*_access_end()
> should be either inlined or marked 'notrace' to prevent leaving
> userspace access exposed. Mark any such functions relevant to signal
> handling so that subsequent patches can call them inside uaccess blocks.
I don't think running this much code with uaccess enabled is a good
idea. Please refactor the code to reduce the criticial sections with
uaccess enabled.
Btw, does powerpc already have the objtool validation that we don't
accidentally jump out of unsafe uaccess critical sections?
^ permalink raw reply
* [PATCH v2] soc: fsl: dpio: Change 'cpumask_t mask' to the driver's private data
From: Yi Wang @ 2020-10-16 6:48 UTC (permalink / raw)
To: Roy.Pledge, laurentiu.tudor
Cc: wang.yi59, jiang.xuexin, Hao Si, linux-kernel, leoyang.li,
xue.zhihong, Lin Chen, linuxppc-dev, linux-arm-kernel
[-- Attachment #1.1: Type: text/plain, Size: 4556 bytes --]
From: Hao Si <si.hao@zte.com.cn>
The local variable 'cpumask_t mask' is in the stack memory, and its address
is assigned to 'desc->affinity' in 'irq_set_affinity_hint()'.
But the memory area where this variable is located is at risk of being
modified.
During LTP testing, the following error was generated:
Unable to handle kernel paging request at virtual address ffff000012e9b790
Mem abort info:
ESR = 0x96000007
Exception class = DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
Data abort info:
ISV = 0, ISS = 0x00000007
CM = 0, WnR = 0
swapper pgtable: 4k pages, 48-bit VAs, pgdp = 0000000075ac5e07
[ffff000012e9b790] pgd=00000027dbffe003, pud=00000027dbffd003,
pmd=00000027b6d61003, pte=0000000000000000
Internal error: Oops: 96000007 [#1] PREEMPT SMP
Modules linked in: xt_conntrack
Process read_all (pid: 20171, stack limit = 0x0000000044ea4095)
CPU: 14 PID: 20171 Comm: read_all Tainted: G B W
Hardware name: NXP Layerscape LX2160ARDB (DT)
pstate: 80000085 (Nzcv daIf -PAN -UAO)
pc : irq_affinity_hint_proc_show+0x54/0xb0
lr : irq_affinity_hint_proc_show+0x4c/0xb0
sp : ffff00001138bc10
x29: ffff00001138bc10 x28: 0000ffffd131d1e0
x27: 00000000007000c0 x26: ffff8025b9480dc0
x25: ffff8025b9480da8 x24: 00000000000003ff
x23: ffff8027334f8300 x22: ffff80272e97d000
x21: ffff80272e97d0b0 x20: ffff8025b9480d80
x19: ffff000009a49000 x18: 0000000000000000
x17: 0000000000000000 x16: 0000000000000000
x15: 0000000000000000 x14: 0000000000000000
x13: 0000000000000000 x12: 0000000000000040
x11: 0000000000000000 x10: ffff802735b79b88
x9 : 0000000000000000 x8 : 0000000000000000
x7 : ffff000009a49848 x6 : 0000000000000003
x5 : 0000000000000000 x4 : ffff000008157d6c
x3 : ffff00001138bc10 x2 : ffff000012e9b790
x1 : 0000000000000000 x0 : 0000000000000000
Call trace:
irq_affinity_hint_proc_show+0x54/0xb0
seq_read+0x1b0/0x440
proc_reg_read+0x80/0xd8
__vfs_read+0x60/0x178
vfs_read+0x94/0x150
ksys_read+0x74/0xf0
__arm64_sys_read+0x24/0x30
el0_svc_common.constprop.0+0xd8/0x1a0
el0_svc_handler+0x34/0x88
el0_svc+0x10/0x14
Code: f9001bbf 943e0732 f94066c2 b4000062 (f9400041)
---[ end trace b495bdcb0b3b732b ]---
Kernel panic - not syncing: Fatal exception
SMP: stopping secondary CPUs
SMP: failed to stop secondary CPUs 0,2-4,6,8,11,13-15
Kernel Offset: disabled
CPU features: 0x0,21006008
Memory Limit: none
---[ end Kernel panic - not syncing: Fatal exception ]---
Fix it by changing 'cpumask_t mask' to the driver's private data.
Signed-off-by: Hao Si <si.hao@zte.com.cn>
Signed-off-by: Lin Chen <chen.lin5@zte.com.cn>
Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
---
v2: Place 'cpumask_t mask' in the driver's private data and while at it,
rename it to cpu_mask.
drivers/soc/fsl/dpio/dpio-driver.c | 9 +++++----
include/linux/fsl/mc.h | 2 ++
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/soc/fsl/dpio/dpio-driver.c b/drivers/soc/fsl/dpio/dpio-driver.c
index 7b642c3..e9d820d 100644
--- a/drivers/soc/fsl/dpio/dpio-driver.c
+++ b/drivers/soc/fsl/dpio/dpio-driver.c
@@ -95,7 +95,7 @@ static int register_dpio_irq_handlers(struct fsl_mc_device *dpio_dev, int cpu)
{
int error;
struct fsl_mc_device_irq *irq;
- cpumask_t mask;
+ cpumask_t *cpu_mask;
irq = dpio_dev->irqs[0];
error = devm_request_irq(&dpio_dev->dev,
@@ -112,9 +112,10 @@ static int register_dpio_irq_handlers(struct fsl_mc_device *dpio_dev, int cpu)
}
/* set the affinity hint */
- cpumask_clear(&mask);
- cpumask_set_cpu(cpu, &mask);
- if (irq_set_affinity_hint(irq->msi_desc->irq, &mask))
+ cpu_mask = &dpio_dev->mask;
+ cpumask_clear(cpu_mask);
+ cpumask_set_cpu(cpu, cpu_mask);
+ if (irq_set_affinity_hint(irq->msi_desc->irq, cpu_mask))
dev_err(&dpio_dev->dev,
"irq_set_affinity failed irq %d cpu %d\n",
irq->msi_desc->irq, cpu);
diff --git a/include/linux/fsl/mc.h b/include/linux/fsl/mc.h
index a428c61..ebdfb54 100644
--- a/include/linux/fsl/mc.h
+++ b/include/linux/fsl/mc.h
@@ -151,6 +151,7 @@ struct fsl_mc_obj_desc {
/**
* struct fsl_mc_device - MC object device object
* @dev: Linux driver model device object
+ * @mask: cpu mask for affinity_hint
* @dma_mask: Default DMA mask
* @flags: MC object device flags
* @icid: Isolation context ID for the device
@@ -184,6 +185,7 @@ struct fsl_mc_obj_desc {
*/
struct fsl_mc_device {
struct device dev;
+ cpumask_t mask;
u64 dma_mask;
u16 flags;
u16 icid;
--
2.15.2
^ permalink raw reply related
* Re: [PATCH 3/8] powerpc: Mark functions called inside uaccess blocks w/ 'notrace'
From: Christophe Leroy @ 2020-10-16 7:02 UTC (permalink / raw)
To: Christopher M. Riedl, linuxppc-dev
In-Reply-To: <20201015150159.28933-4-cmr@codefail.de>
Le 15/10/2020 à 17:01, Christopher M. Riedl a écrit :
> Functions called between user_*_access_begin() and user_*_access_end()
> should be either inlined or marked 'notrace' to prevent leaving
> userspace access exposed. Mark any such functions relevant to signal
> handling so that subsequent patches can call them inside uaccess blocks.
Is it enough to mark it "notrace" ? I see that when I activate KASAN, there are still KASAN calls in
those functions.
In my series for 32 bits, I re-ordered stuff in order to do all those calls before doing the
_access_begin(), can't you do the same on PPC64 ? (See
https://patchwork.ozlabs.org/project/linuxppc-dev/patch/f6eac65781b4a57220477c8864bca2b57f29a5d5.1597770847.git.christophe.leroy@csgroup.eu/)
Christophe
>
> Signed-off-by: Christopher M. Riedl <cmr@codefail.de>
> ---
> arch/powerpc/kernel/process.c | 20 ++++++++++----------
> arch/powerpc/mm/mem.c | 4 ++--
> 2 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
> index ba2c987b8403..bf5d9654bd2c 100644
> --- a/arch/powerpc/kernel/process.c
> +++ b/arch/powerpc/kernel/process.c
> @@ -84,7 +84,7 @@ extern unsigned long _get_SP(void);
> */
> bool tm_suspend_disabled __ro_after_init = false;
>
> -static void check_if_tm_restore_required(struct task_struct *tsk)
> +static void notrace check_if_tm_restore_required(struct task_struct *tsk)
> {
> /*
> * If we are saving the current thread's registers, and the
> @@ -151,7 +151,7 @@ void notrace __msr_check_and_clear(unsigned long bits)
> EXPORT_SYMBOL(__msr_check_and_clear);
>
> #ifdef CONFIG_PPC_FPU
> -static void __giveup_fpu(struct task_struct *tsk)
> +static void notrace __giveup_fpu(struct task_struct *tsk)
> {
> unsigned long msr;
>
> @@ -163,7 +163,7 @@ static void __giveup_fpu(struct task_struct *tsk)
> tsk->thread.regs->msr = msr;
> }
>
> -void giveup_fpu(struct task_struct *tsk)
> +void notrace giveup_fpu(struct task_struct *tsk)
> {
> check_if_tm_restore_required(tsk);
>
> @@ -177,7 +177,7 @@ EXPORT_SYMBOL(giveup_fpu);
> * Make sure the floating-point register state in the
> * the thread_struct is up to date for task tsk.
> */
> -void flush_fp_to_thread(struct task_struct *tsk)
> +void notrace flush_fp_to_thread(struct task_struct *tsk)
> {
> if (tsk->thread.regs) {
> /*
> @@ -234,7 +234,7 @@ static inline void __giveup_fpu(struct task_struct *tsk) { }
> #endif /* CONFIG_PPC_FPU */
>
> #ifdef CONFIG_ALTIVEC
> -static void __giveup_altivec(struct task_struct *tsk)
> +static void notrace __giveup_altivec(struct task_struct *tsk)
> {
> unsigned long msr;
>
> @@ -246,7 +246,7 @@ static void __giveup_altivec(struct task_struct *tsk)
> tsk->thread.regs->msr = msr;
> }
>
> -void giveup_altivec(struct task_struct *tsk)
> +void notrace giveup_altivec(struct task_struct *tsk)
> {
> check_if_tm_restore_required(tsk);
>
> @@ -285,7 +285,7 @@ EXPORT_SYMBOL(enable_kernel_altivec);
> * Make sure the VMX/Altivec register state in the
> * the thread_struct is up to date for task tsk.
> */
> -void flush_altivec_to_thread(struct task_struct *tsk)
> +void notrace flush_altivec_to_thread(struct task_struct *tsk)
> {
> if (tsk->thread.regs) {
> preempt_disable();
> @@ -300,7 +300,7 @@ EXPORT_SYMBOL_GPL(flush_altivec_to_thread);
> #endif /* CONFIG_ALTIVEC */
>
> #ifdef CONFIG_VSX
> -static void __giveup_vsx(struct task_struct *tsk)
> +static void notrace __giveup_vsx(struct task_struct *tsk)
> {
> unsigned long msr = tsk->thread.regs->msr;
>
> @@ -317,7 +317,7 @@ static void __giveup_vsx(struct task_struct *tsk)
> __giveup_altivec(tsk);
> }
>
> -static void giveup_vsx(struct task_struct *tsk)
> +static void notrace giveup_vsx(struct task_struct *tsk)
> {
> check_if_tm_restore_required(tsk);
>
> @@ -352,7 +352,7 @@ void enable_kernel_vsx(void)
> }
> EXPORT_SYMBOL(enable_kernel_vsx);
>
> -void flush_vsx_to_thread(struct task_struct *tsk)
> +void notrace flush_vsx_to_thread(struct task_struct *tsk)
> {
> if (tsk->thread.regs) {
> preempt_disable();
> diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
> index ddc32cc1b6cf..da2345a2abc6 100644
> --- a/arch/powerpc/mm/mem.c
> +++ b/arch/powerpc/mm/mem.c
> @@ -378,7 +378,7 @@ static inline bool flush_coherent_icache(unsigned long addr)
> * @start: the start address
> * @stop: the stop address (exclusive)
> */
> -static void invalidate_icache_range(unsigned long start, unsigned long stop)
> +static void notrace invalidate_icache_range(unsigned long start, unsigned long stop)
> {
> unsigned long shift = l1_icache_shift();
> unsigned long bytes = l1_icache_bytes();
> @@ -402,7 +402,7 @@ static void invalidate_icache_range(unsigned long start, unsigned long stop)
> * @start: the start address
> * @stop: the stop address (exclusive)
> */
> -void flush_icache_range(unsigned long start, unsigned long stop)
> +void notrace flush_icache_range(unsigned long start, unsigned long stop)
> {
> if (flush_coherent_icache(start))
> return;
>
^ permalink raw reply
* Re: [PATCH 18/20] arch: dts: Fix EHCI/OHCI DT nodes name
From: Serge Semin @ 2020-10-16 8:52 UTC (permalink / raw)
To: Alexandre Torgue
Cc: Neil Armstrong, Bjorn Andersson, Paul Cercueil, Paul Mackerras,
Pavel Parkhomenko, linux-stm32, Rafał Miłecki,
Alexey Brodkin, Wei Xu, Andy Gross, bcm-kernel-feedback-list,
Kevin Hilman, linux-snps-arc, devicetree, Mathias Nyman,
Hauke Mehrtens, Lad Prabhakar, Vladimir Zapolskiy, Rob Herring,
linux-mediatek, Matthias Brugger, Alexey Malahov,
linux-arm-kernel, Roger Quadros, Felipe Balbi,
Thomas Bogendoerfer, Greg Kroah-Hartman, Yoshihiro Shimoda,
linux-usb, linux-mips, Serge Semin, linux-kernel, Manu Gautam,
Maxime Coquelin, Vineet Gupta, linuxppc-dev
In-Reply-To: <8a7af322-227b-9923-8fb6-f284af582b40@st.com>
Hello Alexandre,
On Fri, Oct 16, 2020 at 09:08:23AM +0200, Alexandre Torgue wrote:
> Hi Serge,
>
> On 10/14/20 12:14 PM, Serge Semin wrote:
> > In accordance with the Generic EHCI/OHCI bindings the corresponding node
> > name is suppose to comply with the Generic USB HCD DT schema, which
> > requires the USB nodes to have the name acceptable by the regexp:
> > "^usb(@.*)?" . Let's fix the DTS files, which have the nodes defined with
> > incompatible names.
> >
> > Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> >
> > ---
> >
> > Please, test the patch out to make sure it doesn't brake the dependent DTS
> > files. I did only a manual grepping of the possible nodes dependencies.
> > ---
> > arch/arc/boot/dts/axs10x_mb.dtsi | 4 ++--
> > arch/arc/boot/dts/hsdk.dts | 4 ++--
> > arch/arc/boot/dts/vdk_axs10x_mb.dtsi | 2 +-
> > arch/arm/boot/dts/bcm5301x.dtsi | 4 ++--
> > arch/arm/boot/dts/bcm53573.dtsi | 4 ++--
> > arch/arm/boot/dts/hisi-x5hd2.dtsi | 4 ++--
> > arch/arm/boot/dts/lpc18xx.dtsi | 4 ++--
> > arch/arm/boot/dts/stm32mp151.dtsi | 4 ++--
> > arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi | 4 ++--
> > arch/arm64/boot/dts/hisilicon/hip06.dtsi | 4 ++--
> > arch/arm64/boot/dts/hisilicon/hip07.dtsi | 4 ++--
> > arch/mips/boot/dts/ingenic/jz4740.dtsi | 2 +-
> > arch/mips/boot/dts/ingenic/jz4770.dtsi | 2 +-
> > arch/mips/boot/dts/mti/sead3.dts | 2 +-
> > arch/mips/boot/dts/ralink/mt7628a.dtsi | 2 +-
> > arch/powerpc/boot/dts/akebono.dts | 6 +++---
> > 16 files changed, 28 insertions(+), 28 deletions(-)
> >
>
> I surely missed something, but we have here in the same patch modifications
> for different architectures and different vendors.
>
> Do you plan to split this patch after getting some Acked-by / Tested-by ?
Yeah, I'll split this patch and two next ones up in v3.
-Sergey
>
> regards
> Alex
>
>
^ permalink raw reply
* Re: [PATCH 3/8] powerpc: Mark functions called inside uaccess blocks w/ 'notrace'
From: Peter Zijlstra @ 2020-10-16 9:41 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linuxppc-dev, linux-kernel, Christopher M. Riedl
In-Reply-To: <20201016065616.GB9343@infradead.org>
On Fri, Oct 16, 2020 at 07:56:16AM +0100, Christoph Hellwig wrote:
> On Thu, Oct 15, 2020 at 10:01:54AM -0500, Christopher M. Riedl wrote:
> > Functions called between user_*_access_begin() and user_*_access_end()
> > should be either inlined or marked 'notrace' to prevent leaving
> > userspace access exposed. Mark any such functions relevant to signal
> > handling so that subsequent patches can call them inside uaccess blocks.
>
> I don't think running this much code with uaccess enabled is a good
> idea. Please refactor the code to reduce the criticial sections with
> uaccess enabled.
>
> Btw, does powerpc already have the objtool validation that we don't
> accidentally jump out of unsafe uaccess critical sections?
It does not, there was some effort on that a while ago, but I suspect
they're waiting for the ARM64 effort to land and build on that.
^ permalink raw reply
* Re: [PATCH 18/20] arch: dts: Fix EHCI/OHCI DT nodes name
From: Alexandre Torgue @ 2020-10-16 7:08 UTC (permalink / raw)
To: Serge Semin, Mathias Nyman, Felipe Balbi, Greg Kroah-Hartman,
Rob Herring, Alexey Brodkin, Vineet Gupta, Hauke Mehrtens,
Rafał Miłecki, bcm-kernel-feedback-list, Wei Xu,
Vladimir Zapolskiy, Maxime Coquelin, Paul Cercueil,
Thomas Bogendoerfer, Matthias Brugger, Michael Ellerman,
Benjamin Herrenschmidt, Paul Mackerras
Cc: devicetree, linux-snps-arc, linux-mips, Neil Armstrong,
Kevin Hilman, Yoshihiro Shimoda, linux-usb, linux-kernel,
Lad Prabhakar, Serge Semin, Bjorn Andersson, Manu Gautam,
Andy Gross, linux-mediatek, Pavel Parkhomenko, Alexey Malahov,
linuxppc-dev, linux-stm32, linux-arm-kernel, Roger Quadros
In-Reply-To: <20201014101402.18271-19-Sergey.Semin@baikalelectronics.ru>
Hi Serge,
On 10/14/20 12:14 PM, Serge Semin wrote:
> In accordance with the Generic EHCI/OHCI bindings the corresponding node
> name is suppose to comply with the Generic USB HCD DT schema, which
> requires the USB nodes to have the name acceptable by the regexp:
> "^usb(@.*)?" . Let's fix the DTS files, which have the nodes defined with
> incompatible names.
>
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
>
> ---
>
> Please, test the patch out to make sure it doesn't brake the dependent DTS
> files. I did only a manual grepping of the possible nodes dependencies.
> ---
> arch/arc/boot/dts/axs10x_mb.dtsi | 4 ++--
> arch/arc/boot/dts/hsdk.dts | 4 ++--
> arch/arc/boot/dts/vdk_axs10x_mb.dtsi | 2 +-
> arch/arm/boot/dts/bcm5301x.dtsi | 4 ++--
> arch/arm/boot/dts/bcm53573.dtsi | 4 ++--
> arch/arm/boot/dts/hisi-x5hd2.dtsi | 4 ++--
> arch/arm/boot/dts/lpc18xx.dtsi | 4 ++--
> arch/arm/boot/dts/stm32mp151.dtsi | 4 ++--
> arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi | 4 ++--
> arch/arm64/boot/dts/hisilicon/hip06.dtsi | 4 ++--
> arch/arm64/boot/dts/hisilicon/hip07.dtsi | 4 ++--
> arch/mips/boot/dts/ingenic/jz4740.dtsi | 2 +-
> arch/mips/boot/dts/ingenic/jz4770.dtsi | 2 +-
> arch/mips/boot/dts/mti/sead3.dts | 2 +-
> arch/mips/boot/dts/ralink/mt7628a.dtsi | 2 +-
> arch/powerpc/boot/dts/akebono.dts | 6 +++---
> 16 files changed, 28 insertions(+), 28 deletions(-)
>
I surely missed something, but we have here in the same patch
modifications for different architectures and different vendors.
Do you plan to split this patch after getting some Acked-by / Tested-by ?
regards
Alex
> diff --git a/arch/arc/boot/dts/axs10x_mb.dtsi b/arch/arc/boot/dts/axs10x_mb.dtsi
> index 99d3e7175bf7..b64435385304 100644
> --- a/arch/arc/boot/dts/axs10x_mb.dtsi
> +++ b/arch/arc/boot/dts/axs10x_mb.dtsi
> @@ -87,13 +87,13 @@ gmac: ethernet@18000 {
> mac-address = [00 00 00 00 00 00]; /* Filled in by U-Boot */
> };
>
> - ehci@40000 {
> + usb@40000 {
> compatible = "generic-ehci";
> reg = < 0x40000 0x100 >;
> interrupts = < 8 >;
> };
>
> - ohci@60000 {
> + usb@60000 {
> compatible = "generic-ohci";
> reg = < 0x60000 0x100 >;
> interrupts = < 8 >;
> diff --git a/arch/arc/boot/dts/hsdk.dts b/arch/arc/boot/dts/hsdk.dts
> index dcaa44e408ac..fdd4f7f635d3 100644
> --- a/arch/arc/boot/dts/hsdk.dts
> +++ b/arch/arc/boot/dts/hsdk.dts
> @@ -234,7 +234,7 @@ phy0: ethernet-phy@0 { /* Micrel KSZ9031 */
> };
> };
>
> - ohci@60000 {
> + usb@60000 {
> compatible = "snps,hsdk-v1.0-ohci", "generic-ohci";
> reg = <0x60000 0x100>;
> interrupts = <15>;
> @@ -242,7 +242,7 @@ ohci@60000 {
> dma-coherent;
> };
>
> - ehci@40000 {
> + usb@40000 {
> compatible = "snps,hsdk-v1.0-ehci", "generic-ehci";
> reg = <0x40000 0x100>;
> interrupts = <15>;
> diff --git a/arch/arc/boot/dts/vdk_axs10x_mb.dtsi b/arch/arc/boot/dts/vdk_axs10x_mb.dtsi
> index cbb179770293..90a412026e64 100644
> --- a/arch/arc/boot/dts/vdk_axs10x_mb.dtsi
> +++ b/arch/arc/boot/dts/vdk_axs10x_mb.dtsi
> @@ -46,7 +46,7 @@ ethernet@18000 {
> clock-names = "stmmaceth";
> };
>
> - ehci@40000 {
> + usb@40000 {
> compatible = "generic-ehci";
> reg = < 0x40000 0x100 >;
> interrupts = < 8 >;
> diff --git a/arch/arm/boot/dts/bcm5301x.dtsi b/arch/arm/boot/dts/bcm5301x.dtsi
> index 0016720ce530..bf5656d79a55 100644
> --- a/arch/arm/boot/dts/bcm5301x.dtsi
> +++ b/arch/arm/boot/dts/bcm5301x.dtsi
> @@ -261,7 +261,7 @@ usb2: usb2@21000 {
>
> interrupt-parent = <&gic>;
>
> - ehci: ehci@21000 {
> + ehci: usb@21000 {
> #usb-cells = <0>;
>
> compatible = "generic-ehci";
> @@ -283,7 +283,7 @@ ehci_port2: port@2 {
> };
> };
>
> - ohci: ohci@22000 {
> + ohci: usb@22000 {
> #usb-cells = <0>;
>
> compatible = "generic-ohci";
> diff --git a/arch/arm/boot/dts/bcm53573.dtsi b/arch/arm/boot/dts/bcm53573.dtsi
> index 4af8e3293cff..51546fccc616 100644
> --- a/arch/arm/boot/dts/bcm53573.dtsi
> +++ b/arch/arm/boot/dts/bcm53573.dtsi
> @@ -135,7 +135,7 @@ usb2: usb2@4000 {
> #address-cells = <1>;
> #size-cells = <1>;
>
> - ehci: ehci@4000 {
> + ehci: usb@4000 {
> compatible = "generic-ehci";
> reg = <0x4000 0x1000>;
> interrupt-parent = <&gic>;
> @@ -155,7 +155,7 @@ ehci_port2: port@2 {
> };
> };
>
> - ohci: ohci@d000 {
> + ohci: usb@d000 {
> #usb-cells = <0>;
>
> compatible = "generic-ohci";
> diff --git a/arch/arm/boot/dts/hisi-x5hd2.dtsi b/arch/arm/boot/dts/hisi-x5hd2.dtsi
> index 3ee7967c202d..693b85b2cc7d 100644
> --- a/arch/arm/boot/dts/hisi-x5hd2.dtsi
> +++ b/arch/arm/boot/dts/hisi-x5hd2.dtsi
> @@ -452,14 +452,14 @@ gmac1: ethernet@1841000 {
> status = "disabled";
> };
>
> - usb0: ehci@1890000 {
> + usb0: usb@1890000 {
> compatible = "generic-ehci";
> reg = <0x1890000 0x1000>;
> interrupts = <0 66 4>;
> clocks = <&clock HIX5HD2_USB_CLK>;
> };
>
> - usb1: ohci@1880000 {
> + usb1: usb@1880000 {
> compatible = "generic-ohci";
> reg = <0x1880000 0x1000>;
> interrupts = <0 67 4>;
> diff --git a/arch/arm/boot/dts/lpc18xx.dtsi b/arch/arm/boot/dts/lpc18xx.dtsi
> index 10b8249b8ab6..82ffd7b0ad8a 100644
> --- a/arch/arm/boot/dts/lpc18xx.dtsi
> +++ b/arch/arm/boot/dts/lpc18xx.dtsi
> @@ -121,7 +121,7 @@ mmcsd: mmcsd@40004000 {
> status = "disabled";
> };
>
> - usb0: ehci@40006100 {
> + usb0: usb@40006100 {
> compatible = "nxp,lpc1850-ehci", "generic-ehci";
> reg = <0x40006100 0x100>;
> interrupts = <8>;
> @@ -133,7 +133,7 @@ usb0: ehci@40006100 {
> status = "disabled";
> };
>
> - usb1: ehci@40007100 {
> + usb1: usb@40007100 {
> compatible = "nxp,lpc1850-ehci", "generic-ehci";
> reg = <0x40007100 0x100>;
> interrupts = <9>;
> diff --git a/arch/arm/boot/dts/stm32mp151.dtsi b/arch/arm/boot/dts/stm32mp151.dtsi
> index bfe29023fbd5..576f7da564c5 100644
> --- a/arch/arm/boot/dts/stm32mp151.dtsi
> +++ b/arch/arm/boot/dts/stm32mp151.dtsi
> @@ -1404,7 +1404,7 @@ ethernet0: ethernet@5800a000 {
> status = "disabled";
> };
>
> - usbh_ohci: usbh-ohci@5800c000 {
> + usbh_ohci: usb@5800c000 {
> compatible = "generic-ohci";
> reg = <0x5800c000 0x1000>;
> clocks = <&rcc USBH>;
> @@ -1413,7 +1413,7 @@ usbh_ohci: usbh-ohci@5800c000 {
> status = "disabled";
> };
>
> - usbh_ehci: usbh-ehci@5800d000 {
> + usbh_ehci: usb@5800d000 {
> compatible = "generic-ehci";
> reg = <0x5800d000 0x1000>;
> clocks = <&rcc USBH>;
> diff --git a/arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi b/arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi
> index 12bc1d3ed424..a4acecb75c89 100644
> --- a/arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi
> +++ b/arch/arm64/boot/dts/hisilicon/hi3798cv200.dtsi
> @@ -585,7 +585,7 @@ pcie: pcie@9860000 {
> status = "disabled";
> };
>
> - ohci: ohci@9880000 {
> + ohci: usb@9880000 {
> compatible = "generic-ohci";
> reg = <0x9880000 0x10000>;
> interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
> @@ -600,7 +600,7 @@ ohci: ohci@9880000 {
> status = "disabled";
> };
>
> - ehci: ehci@9890000 {
> + ehci: usb@9890000 {
> compatible = "generic-ehci";
> reg = <0x9890000 0x10000>;
> interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
> diff --git a/arch/arm64/boot/dts/hisilicon/hip06.dtsi b/arch/arm64/boot/dts/hisilicon/hip06.dtsi
> index 50ceaa959bdc..1226440d54ad 100644
> --- a/arch/arm64/boot/dts/hisilicon/hip06.dtsi
> +++ b/arch/arm64/boot/dts/hisilicon/hip06.dtsi
> @@ -373,7 +373,7 @@ refclk: refclk {
> #clock-cells = <0>;
> };
>
> - usb_ohci: ohci@a7030000 {
> + usb_ohci: usb@a7030000 {
> compatible = "generic-ohci";
> reg = <0x0 0xa7030000 0x0 0x10000>;
> interrupt-parent = <&mbigen_usb>;
> @@ -382,7 +382,7 @@ usb_ohci: ohci@a7030000 {
> status = "disabled";
> };
>
> - usb_ehci: ehci@a7020000 {
> + usb_ehci: usb@a7020000 {
> compatible = "generic-ehci";
> reg = <0x0 0xa7020000 0x0 0x10000>;
> interrupt-parent = <&mbigen_usb>;
> diff --git a/arch/arm64/boot/dts/hisilicon/hip07.dtsi b/arch/arm64/boot/dts/hisilicon/hip07.dtsi
> index 4773a533fce5..93f99a5255ac 100644
> --- a/arch/arm64/boot/dts/hisilicon/hip07.dtsi
> +++ b/arch/arm64/boot/dts/hisilicon/hip07.dtsi
> @@ -1253,7 +1253,7 @@ uart0: uart@602b0000 {
> status = "disabled";
> };
>
> - usb_ohci: ohci@a7030000 {
> + usb_ohci: usb@a7030000 {
> compatible = "generic-ohci";
> reg = <0x0 0xa7030000 0x0 0x10000>;
> interrupt-parent = <&mbigen_usb>;
> @@ -1262,7 +1262,7 @@ usb_ohci: ohci@a7030000 {
> status = "disabled";
> };
>
> - usb_ehci: ehci@a7020000 {
> + usb_ehci: usb@a7020000 {
> compatible = "generic-ehci";
> reg = <0x0 0xa7020000 0x0 0x10000>;
> interrupt-parent = <&mbigen_usb>;
> diff --git a/arch/mips/boot/dts/ingenic/jz4740.dtsi b/arch/mips/boot/dts/ingenic/jz4740.dtsi
> index 1520585c235c..b989ff62ffbc 100644
> --- a/arch/mips/boot/dts/ingenic/jz4740.dtsi
> +++ b/arch/mips/boot/dts/ingenic/jz4740.dtsi
> @@ -281,7 +281,7 @@ dmac: dma-controller@13020000 {
> clocks = <&cgu JZ4740_CLK_DMA>;
> };
>
> - uhc: uhc@13030000 {
> + uhc: usb@13030000 {
> compatible = "ingenic,jz4740-ohci", "generic-ohci";
> reg = <0x13030000 0x1000>;
>
> diff --git a/arch/mips/boot/dts/ingenic/jz4770.dtsi b/arch/mips/boot/dts/ingenic/jz4770.dtsi
> index fa11ac950499..e45c03038826 100644
> --- a/arch/mips/boot/dts/ingenic/jz4770.dtsi
> +++ b/arch/mips/boot/dts/ingenic/jz4770.dtsi
> @@ -417,7 +417,7 @@ dmac1: dma-controller@13420100 {
> interrupts = <23>;
> };
>
> - uhc: uhc@13430000 {
> + uhc: usb@13430000 {
> compatible = "generic-ohci";
> reg = <0x13430000 0x1000>;
>
> diff --git a/arch/mips/boot/dts/mti/sead3.dts b/arch/mips/boot/dts/mti/sead3.dts
> index 192c26ff1d3d..1cf6728af8fe 100644
> --- a/arch/mips/boot/dts/mti/sead3.dts
> +++ b/arch/mips/boot/dts/mti/sead3.dts
> @@ -56,7 +56,7 @@ gic: interrupt-controller@1b1c0000 {
> interrupt-parent = <&cpu_intc>;
> };
>
> - ehci@1b200000 {
> + usb@1b200000 {
> compatible = "generic-ehci";
> reg = <0x1b200000 0x1000>;
>
> diff --git a/arch/mips/boot/dts/ralink/mt7628a.dtsi b/arch/mips/boot/dts/ralink/mt7628a.dtsi
> index 892e8ab863c5..45bf96a3d17a 100644
> --- a/arch/mips/boot/dts/ralink/mt7628a.dtsi
> +++ b/arch/mips/boot/dts/ralink/mt7628a.dtsi
> @@ -275,7 +275,7 @@ usb_phy: usb-phy@10120000 {
> reset-names = "host", "device";
> };
>
> - ehci@101c0000 {
> + usb@101c0000 {
> compatible = "generic-ehci";
> reg = <0x101c0000 0x1000>;
>
> diff --git a/arch/powerpc/boot/dts/akebono.dts b/arch/powerpc/boot/dts/akebono.dts
> index df18f8dc4642..343326c30380 100644
> --- a/arch/powerpc/boot/dts/akebono.dts
> +++ b/arch/powerpc/boot/dts/akebono.dts
> @@ -126,7 +126,7 @@ SATA0: sata@30000010000 {
> interrupts = <93 2>;
> };
>
> - EHCI0: ehci@30010000000 {
> + EHCI0: usb@30010000000 {
> compatible = "ibm,476gtr-ehci", "generic-ehci";
> reg = <0x300 0x10000000 0x0 0x10000>;
> interrupt-parent = <&MPIC>;
> @@ -140,14 +140,14 @@ SD0: sd@30000000000 {
> interrupt-parent = <&MPIC>;
> };
>
> - OHCI0: ohci@30010010000 {
> + OHCI0: usb@30010010000 {
> compatible = "ibm,476gtr-ohci", "generic-ohci";
> reg = <0x300 0x10010000 0x0 0x10000>;
> interrupt-parent = <&MPIC>;
> interrupts = <89 1>;
> };
>
> - OHCI1: ohci@30010020000 {
> + OHCI1: usb@30010020000 {
> compatible = "ibm,476gtr-ohci", "generic-ohci";
> reg = <0x300 0x10020000 0x0 0x10000>;
> interrupt-parent = <&MPIC>;
>
^ permalink raw reply
* Re: [PATCH -next] Revert "powerpc/pci: unmap legacy INTx interrupts when a PHB is removed"
From: Michael Ellerman @ 2020-10-16 11:02 UTC (permalink / raw)
To: Michael Ellerman, Qian Cai
Cc: Stephen Rothwell, Alexey Kardashevskiy, linux-kernel, linux-next,
Oliver O'Halloran, Cédric Le Goater, linuxppc-dev
In-Reply-To: <20201014182811.12027-1-cai@lca.pw>
On Wed, 14 Oct 2020 14:28:11 -0400, Qian Cai wrote:
> This reverts commit 3a3181e16fbde752007759f8759d25e0ff1fc425 which
> causes memory corruptions on POWER9 NV.
Applied to powerpc/next.
[1/1] Revert "powerpc/pci: unmap legacy INTx interrupts when a PHB is removed"
https://git.kernel.org/powerpc/c/ffd0b25ca049a477cb757e5bcf2d5e1664d12e5d
cheers
^ permalink raw reply
* Re: [PATCH] selftests/powerpc: Fix eeh-basic.sh exit codes
From: Michael Ellerman @ 2020-10-16 11:02 UTC (permalink / raw)
To: Oliver O'Halloran, linuxppc-dev
In-Reply-To: <20201014024711.1138386-1-oohall@gmail.com>
On Wed, 14 Oct 2020 13:47:11 +1100, Oliver O'Halloran wrote:
> The kselftests test running infrastructure expects tests to finish with an
> exit code of 4 if the test decided it should be skipped. Currently
> eeh-basic.sh exits with the number of devices that failed to recover, so if
> four devices didn't recover we'll report a skip instead of a fail.
>
> Fix this by checking if the return code is non-zero and report success
> and failure by returning 0 or 1 respectively. For the cases where should
> actually skip return 4.
Applied to powerpc/next.
[1/1] selftests/powerpc: Fix eeh-basic.sh exit codes
https://git.kernel.org/powerpc/c/996f9e0f93f16211945c8d5f18f296a88cb32f91
cheers
^ permalink raw reply
* Re: [PATCH] powerpc/opal_elog: Handle multiple writes to ack attribute
From: Michael Ellerman @ 2020-10-16 11:32 UTC (permalink / raw)
To: mpe, Aneesh Kumar K.V, linuxppc-dev
Cc: Oliver O'Halloran, Mahesh Salgaonkar
In-Reply-To: <20201014064813.109515-1-aneesh.kumar@linux.ibm.com>
On Wed, 14 Oct 2020 12:18:13 +0530, Aneesh Kumar K.V wrote:
> Even though we use self removing sysfs helper, we still need
> to make sure we do the final kobject delete conditionally.
> sysfs_remove_file_self() will handle parallel calls to remove
> the sysfs attribute file and returns true only in the caller
> that removed the attribute file. The other parallel callers
> are returned false. Do the final kobject delete checking
> the return value of sysfs_remove_file_self().
Applied to powerpc/fixes.
[1/1] powerpc/opal_elog: Handle multiple writes to ack attribute
https://git.kernel.org/powerpc/c/d4263b12a1a0e8816e021450be0765a1ad8bb53c
cheers
^ permalink raw reply
* Re: [PATCH v4 0/2] powerpc/mce: Fix mce handler and add selftest
From: Michael Ellerman @ 2020-10-16 11:32 UTC (permalink / raw)
To: mpe, Ganesh Goudar, linuxppc-dev; +Cc: msuchanek, mahesh, npiggin, keescook
In-Reply-To: <20201009064005.19777-1-ganeshgr@linux.ibm.com>
On Fri, 9 Oct 2020 12:10:03 +0530, Ganesh Goudar wrote:
> This patch series fixes mce handling for pseries, Adds LKDTM test
> for SLB multihit recovery and enables selftest for the same,
> basically to test MCE handling on pseries/powernv machines running
> in hash mmu mode.
>
> v4:
> * Use radix_enabled() to check if its in Hash or Radix mode.
> * Use FW_FEATURE_LPAR instead of machine_is_pseries().
>
> [...]
Patch 1 applied to powerpc/fixes.
[1/2] powerpc/mce: Avoid nmi_enter/exit in real mode on pseries hash
https://git.kernel.org/powerpc/c/8d0e2101274358d9b6b1f27232b40253ca48bab5
cheers
^ permalink raw reply
* Re: [PATCH 1/8] powerpc/uaccess: Add unsafe_copy_from_user
From: Christophe Leroy @ 2020-10-16 13:17 UTC (permalink / raw)
To: Christopher M. Riedl, linuxppc-dev
In-Reply-To: <20201015150159.28933-2-cmr@codefail.de>
Le 15/10/2020 à 17:01, Christopher M. Riedl a écrit :
> Implement raw_copy_from_user_allowed() which assumes that userspace read
> access is open. Use this new function to implement raw_copy_from_user().
> Finally, wrap the new function to follow the usual "unsafe_" convention
> of taking a label argument. The new raw_copy_from_user_allowed() calls
> __copy_tofrom_user() internally, but this is still safe to call in user
> access blocks formed with user_*_access_begin()/user_*_access_end()
> since asm functions are not instrumented for tracing.
Would objtool accept that if it was implemented on powerpc ?
__copy_tofrom_user() is a function which is optimised for larger memory copies (using dcbz, etc ...)
Do we need such an optimisation for unsafe_copy_from_user() ? Or can we do a simple loop as done for
unsafe_copy_to_user() instead ?
Christophe
>
> Signed-off-by: Christopher M. Riedl <cmr@codefail.de>
> ---
> arch/powerpc/include/asm/uaccess.h | 28 +++++++++++++++++++---------
> 1 file changed, 19 insertions(+), 9 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/uaccess.h b/arch/powerpc/include/asm/uaccess.h
> index 26781b044932..66940b4eb692 100644
> --- a/arch/powerpc/include/asm/uaccess.h
> +++ b/arch/powerpc/include/asm/uaccess.h
> @@ -418,38 +418,45 @@ raw_copy_in_user(void __user *to, const void __user *from, unsigned long n)
> }
> #endif /* __powerpc64__ */
>
> -static inline unsigned long raw_copy_from_user(void *to,
> - const void __user *from, unsigned long n)
> +static inline unsigned long
> +raw_copy_from_user_allowed(void *to, const void __user *from, unsigned long n)
> {
> - unsigned long ret;
> if (__builtin_constant_p(n) && (n <= 8)) {
> - ret = 1;
> + unsigned long ret = 1;
>
> switch (n) {
> case 1:
> barrier_nospec();
> - __get_user_size(*(u8 *)to, from, 1, ret);
> + __get_user_size_allowed(*(u8 *)to, from, 1, ret);
> break;
> case 2:
> barrier_nospec();
> - __get_user_size(*(u16 *)to, from, 2, ret);
> + __get_user_size_allowed(*(u16 *)to, from, 2, ret);
> break;
> case 4:
> barrier_nospec();
> - __get_user_size(*(u32 *)to, from, 4, ret);
> + __get_user_size_allowed(*(u32 *)to, from, 4, ret);
> break;
> case 8:
> barrier_nospec();
> - __get_user_size(*(u64 *)to, from, 8, ret);
> + __get_user_size_allowed(*(u64 *)to, from, 8, ret);
> break;
> }
> if (ret == 0)
> return 0;
> }
>
> + return __copy_tofrom_user((__force void __user *)to, from, n);
> +}
> +
> +static inline unsigned long
> +raw_copy_from_user(void *to, const void __user *from, unsigned long n)
> +{
> + unsigned long ret;
> +
> barrier_nospec();
> allow_read_from_user(from, n);
> - ret = __copy_tofrom_user((__force void __user *)to, from, n);
> + ret = raw_copy_from_user_allowed(to, from, n);
> prevent_read_from_user(from, n);
> return ret;
> }
> @@ -571,6 +578,9 @@ user_write_access_begin(const void __user *ptr, size_t len)
> #define unsafe_get_user(x, p, e) unsafe_op_wrap(__get_user_allowed(x, p), e)
> #define unsafe_put_user(x, p, e) __put_user_goto(x, p, e)
>
> +#define unsafe_copy_from_user(d, s, l, e) \
> + unsafe_op_wrap(raw_copy_from_user_allowed(d, s, l), e)
> +
> #define unsafe_copy_to_user(d, s, l, e) \
> do { \
> u8 __user *_dst = (u8 __user *)(d); \
>
^ permalink raw reply
* Re: [PATCH 1/8] powerpc/uaccess: Add unsafe_copy_from_user
From: Christophe Leroy @ 2020-10-16 13:18 UTC (permalink / raw)
To: Christoph Hellwig, Christopher M. Riedl; +Cc: linuxppc-dev, linux-kernel, viro
In-Reply-To: <20201016065403.GA9343@infradead.org>
Le 16/10/2020 à 08:54, Christoph Hellwig a écrit :
> On Thu, Oct 15, 2020 at 10:01:52AM -0500, Christopher M. Riedl wrote:
>> Implement raw_copy_from_user_allowed() which assumes that userspace read
>> access is open. Use this new function to implement raw_copy_from_user().
>> Finally, wrap the new function to follow the usual "unsafe_" convention
>> of taking a label argument. The new raw_copy_from_user_allowed() calls
>> __copy_tofrom_user() internally, but this is still safe to call in user
>> access blocks formed with user_*_access_begin()/user_*_access_end()
>> since asm functions are not instrumented for tracing.
>
> Please also add a fallback unsafe_copy_from_user to linux/uaccess.h
> so this can be used as a generic API.
>
I guess this can be done in a separate patch independant of that series ?
Christophe
^ permalink raw reply
* Re: [PATCH 2/8] powerpc/signal: Add unsafe_copy_{vsx, fpr}_from_user()
From: Christophe Leroy @ 2020-10-16 13:48 UTC (permalink / raw)
To: Christopher M. Riedl, linuxppc-dev
In-Reply-To: <20201015150159.28933-3-cmr@codefail.de>
Le 15/10/2020 à 17:01, Christopher M. Riedl a écrit :
> Reuse the "safe" implementation from signal.c except for calling
> unsafe_copy_from_user() to copy into a local buffer. Unlike the
> unsafe_copy_{vsx,fpr}_to_user() functions the "copy from" functions
> cannot use unsafe_get_user() directly to bypass the local buffer since
> doing so significantly reduces signal handling performance.
Why can't the functions use unsafe_get_user(), why does it significantly reduces signal handling
performance ? How much significant ? I would expect that not going through an intermediate memory
area would be more efficient
Christophe
>
> Signed-off-by: Christopher M. Riedl <cmr@codefail.de>
> ---
> arch/powerpc/kernel/signal.h | 33 +++++++++++++++++++++++++++++++++
> 1 file changed, 33 insertions(+)
>
> diff --git a/arch/powerpc/kernel/signal.h b/arch/powerpc/kernel/signal.h
> index 2559a681536e..e9aaeac0da37 100644
> --- a/arch/powerpc/kernel/signal.h
> +++ b/arch/powerpc/kernel/signal.h
> @@ -53,6 +53,33 @@ unsigned long copy_ckfpr_from_user(struct task_struct *task, void __user *from);
> &buf[i], label);\
> } while (0)
>
> +#define unsafe_copy_fpr_from_user(task, from, label) do { \
> + struct task_struct *__t = task; \
> + u64 __user *__f = (u64 __user *)from; \
> + u64 buf[ELF_NFPREG]; \
> + int i; \
> + \
> + unsafe_copy_from_user(buf, __f, ELF_NFPREG * sizeof(double), \
> + label); \
> + for (i = 0; i < ELF_NFPREG - 1; i++) \
> + __t->thread.TS_FPR(i) = buf[i]; \
> + __t->thread.fp_state.fpscr = buf[i]; \
> +} while (0)
> +
> +#define unsafe_copy_vsx_from_user(task, from, label) do { \
> + struct task_struct *__t = task; \
> + u64 __user *__f = (u64 __user *)from; \
> + u64 buf[ELF_NVSRHALFREG]; \
> + int i; \
> + \
> + unsafe_copy_from_user(buf, __f, \
> + ELF_NVSRHALFREG * sizeof(double), \
> + label); \
> + for (i = 0; i < ELF_NVSRHALFREG ; i++) \
> + __t->thread.fp_state.fpr[i][TS_VSRLOWOFFSET] = buf[i]; \
> +} while (0)
> +
> +
> #ifdef CONFIG_PPC_TRANSACTIONAL_MEM
> #define unsafe_copy_ckfpr_to_user(to, task, label) do { \
> struct task_struct *__t = task; \
> @@ -80,6 +107,10 @@ unsigned long copy_ckfpr_from_user(struct task_struct *task, void __user *from);
> unsafe_copy_to_user(to, (task)->thread.fp_state.fpr, \
> ELF_NFPREG * sizeof(double), label)
>
> +#define unsafe_copy_fpr_from_user(task, from, label) \
> + unsafe_copy_from_user((task)->thread.fp_state.fpr, from \
> + ELF_NFPREG * sizeof(double), label)
> +
> static inline unsigned long
> copy_fpr_to_user(void __user *to, struct task_struct *task)
> {
> @@ -115,6 +146,8 @@ copy_ckfpr_from_user(struct task_struct *task, void __user *from)
> #else
> #define unsafe_copy_fpr_to_user(to, task, label) do { } while (0)
>
> +#define unsafe_copy_fpr_from_user(task, from, label) do { } while (0)
> +
> static inline unsigned long
> copy_fpr_to_user(void __user *to, struct task_struct *task)
> {
>
^ permalink raw reply
* Re: [PATCH 6/8] powerpc/signal64: Replace setup_trampoline() w/ unsafe_setup_trampoline()
From: Christophe Leroy @ 2020-10-16 13:56 UTC (permalink / raw)
To: Christopher M. Riedl, linuxppc-dev; +Cc: Daniel Axtens
In-Reply-To: <20201015150159.28933-7-cmr@codefail.de>
Le 15/10/2020 à 17:01, Christopher M. Riedl a écrit :
> From: Daniel Axtens <dja@axtens.net>
>
> Previously setup_trampoline() performed a costly KUAP switch on every
> uaccess operation. These repeated uaccess switches cause a significant
> drop in signal handling performance.
>
> Rewrite setup_trampoline() to assume that a userspace write access
> window is open. Replace all uaccess functions with their 'unsafe'
> versions to avoid the repeated uaccess switches.
>
> Signed-off-by: Daniel Axtens <dja@axtens.net>
> Signed-off-by: Christopher M. Riedl <cmr@codefail.de>
> ---
> arch/powerpc/kernel/signal_64.c | 32 +++++++++++++++++++-------------
> 1 file changed, 19 insertions(+), 13 deletions(-)
>
> diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
> index bd92064e5576..6d4f7a5c4fbf 100644
> --- a/arch/powerpc/kernel/signal_64.c
> +++ b/arch/powerpc/kernel/signal_64.c
> @@ -600,30 +600,33 @@ static long restore_tm_sigcontexts(struct task_struct *tsk,
> /*
> * Setup the trampoline code on the stack
> */
> -static long setup_trampoline(unsigned int syscall, unsigned int __user *tramp)
> +#define unsafe_setup_trampoline(syscall, tramp, e) \
> + unsafe_op_wrap(__unsafe_setup_trampoline(syscall, tramp), e)
> +static long notrace __unsafe_setup_trampoline(unsigned int syscall,
> + unsigned int __user *tramp)
> {
> int i;
> - long err = 0;
>
> /* bctrl # call the handler */
> - err |= __put_user(PPC_INST_BCTRL, &tramp[0]);
> + unsafe_put_user(PPC_INST_BCTRL, &tramp[0], err);
> /* addi r1, r1, __SIGNAL_FRAMESIZE # Pop the dummy stackframe */
> - err |= __put_user(PPC_INST_ADDI | __PPC_RT(R1) | __PPC_RA(R1) |
> - (__SIGNAL_FRAMESIZE & 0xffff), &tramp[1]);
> + unsafe_put_user(PPC_INST_ADDI | __PPC_RT(R1) | __PPC_RA(R1) |
> + (__SIGNAL_FRAMESIZE & 0xffff), &tramp[1], err);
> /* li r0, __NR_[rt_]sigreturn| */
> - err |= __put_user(PPC_INST_ADDI | (syscall & 0xffff), &tramp[2]);
> + unsafe_put_user(PPC_INST_ADDI | (syscall & 0xffff), &tramp[2], err);
> /* sc */
> - err |= __put_user(PPC_INST_SC, &tramp[3]);
> + unsafe_put_user(PPC_INST_SC, &tramp[3], err);
>
> /* Minimal traceback info */
> for (i=TRAMP_TRACEBACK; i < TRAMP_SIZE ;i++)
> - err |= __put_user(0, &tramp[i]);
> + unsafe_put_user(0, &tramp[i], err);
>
> - if (!err)
> - flush_icache_range((unsigned long) &tramp[0],
> - (unsigned long) &tramp[TRAMP_SIZE]);
> + flush_icache_range((unsigned long)&tramp[0],
> + (unsigned long)&tramp[TRAMP_SIZE]);
This flush should be done outside the user_write_access block.
>
> - return err;
> + return 0;
> +err:
> + return 1;
> }
>
> /*
> @@ -888,7 +891,10 @@ int handle_rt_signal64(struct ksignal *ksig, sigset_t *set,
> if (vdso64_rt_sigtramp && tsk->mm->context.vdso_base) {
> regs->nip = tsk->mm->context.vdso_base + vdso64_rt_sigtramp;
> } else {
> - err |= setup_trampoline(__NR_rt_sigreturn, &frame->tramp[0]);
> + if (!user_write_access_begin(frame, sizeof(struct rt_sigframe)))
> + return -EFAULT;
> + err |= __unsafe_setup_trampoline(__NR_rt_sigreturn, &frame->tramp[0]);
> + user_write_access_end();
> if (err)
> goto badframe;
> regs->nip = (unsigned long) &frame->tramp[0];
>
Christophe
^ permalink raw reply
* Re: [PATCH 7/8] powerpc/signal64: Rewrite handle_rt_signal64() to minimise uaccess switches
From: Christophe Leroy @ 2020-10-16 14:00 UTC (permalink / raw)
To: Christopher M. Riedl, linuxppc-dev; +Cc: Daniel Axtens
In-Reply-To: <20201015150159.28933-8-cmr@codefail.de>
Le 15/10/2020 à 17:01, Christopher M. Riedl a écrit :
> From: Daniel Axtens <dja@axtens.net>
>
> Add uaccess blocks and use the 'unsafe' versions of functions doing user
> access where possible to reduce the number of times uaccess has to be
> opened/closed.
>
> There is no 'unsafe' version of copy_siginfo_to_user, so move it
> slightly to allow for a "longer" uaccess block.
>
> Signed-off-by: Daniel Axtens <dja@axtens.net>
> Signed-off-by: Christopher M. Riedl <cmr@codefail.de>
> ---
> arch/powerpc/kernel/signal_64.c | 54 ++++++++++++++++-----------------
> 1 file changed, 27 insertions(+), 27 deletions(-)
>
> diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
> index 6d4f7a5c4fbf..3b97e3681a8f 100644
> --- a/arch/powerpc/kernel/signal_64.c
> +++ b/arch/powerpc/kernel/signal_64.c
> @@ -843,46 +843,42 @@ int handle_rt_signal64(struct ksignal *ksig, sigset_t *set,
> /* Save the thread's msr before get_tm_stackpointer() changes it */
> unsigned long msr = regs->msr;
> #endif
> -
> frame = get_sigframe(ksig, tsk, sizeof(*frame), 0);
> - if (!access_ok(frame, sizeof(*frame)))
> + if (!user_write_access_begin(frame, sizeof(*frame)))
> goto badframe;
>
> - err |= __put_user(&frame->info, &frame->pinfo);
> - err |= __put_user(&frame->uc, &frame->puc);
> - err |= copy_siginfo_to_user(&frame->info, &ksig->info);
> - if (err)
> - goto badframe;
> + unsafe_put_user(&frame->info, &frame->pinfo, badframe_block);
> + unsafe_put_user(&frame->uc, &frame->puc, badframe_block);
>
> /* Create the ucontext. */
> - err |= __put_user(0, &frame->uc.uc_flags);
> - err |= __save_altstack(&frame->uc.uc_stack, regs->gpr[1]);
> + unsafe_put_user(0, &frame->uc.uc_flags, badframe_block);
> + unsafe_save_altstack(&frame->uc.uc_stack, regs->gpr[1], badframe_block);
> +
> #ifdef CONFIG_PPC_TRANSACTIONAL_MEM
> if (MSR_TM_ACTIVE(msr)) {
> /* The ucontext_t passed to userland points to the second
> * ucontext_t (for transactional state) with its uc_link ptr.
> */
> - err |= __put_user(&frame->uc_transact, &frame->uc.uc_link);
> + unsafe_put_user(&frame->uc_transact, &frame->uc.uc_link, badframe_block);
> + user_write_access_end();
Whaou. Doing this inside an #ifdef sequence is dirty.
Can you reorganise code to avoid that and to avoid nesting #ifdef/#endif and the if/else as I did in
signal32 ?
> err |= setup_tm_sigcontexts(&frame->uc.uc_mcontext,
> &frame->uc_transact.uc_mcontext,
> tsk, ksig->sig, NULL,
> (unsigned long)ksig->ka.sa.sa_handler,
> msr);
> + if (!user_write_access_begin(frame, sizeof(struct rt_sigframe)))
> + goto badframe;
> +
> } else
> #endif
> {
> - err |= __put_user(0, &frame->uc.uc_link);
> -
> - if (!user_write_access_begin(frame, sizeof(struct rt_sigframe)))
> - return -EFAULT;
> - err |= __unsafe_setup_sigcontext(&frame->uc.uc_mcontext, tsk,
> - ksig->sig, NULL,
> - (unsigned long)ksig->ka.sa.sa_handler, 1);
> - user_write_access_end();
> + unsafe_put_user(0, &frame->uc.uc_link, badframe_block);
> + unsafe_setup_sigcontext(&frame->uc.uc_mcontext, tsk, ksig->sig,
> + NULL, (unsigned long)ksig->ka.sa.sa_handler,
> + 1, badframe_block);
> }
> - err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
> - if (err)
> - goto badframe;
> +
> + unsafe_copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set), badframe_block);
>
> /* Make sure signal handler doesn't get spurious FP exceptions */
> tsk->thread.fp_state.fpscr = 0;
> @@ -891,15 +887,17 @@ int handle_rt_signal64(struct ksignal *ksig, sigset_t *set,
> if (vdso64_rt_sigtramp && tsk->mm->context.vdso_base) {
> regs->nip = tsk->mm->context.vdso_base + vdso64_rt_sigtramp;
> } else {
> - if (!user_write_access_begin(frame, sizeof(struct rt_sigframe)))
> - return -EFAULT;
> - err |= __unsafe_setup_trampoline(__NR_rt_sigreturn, &frame->tramp[0]);
> - user_write_access_end();
> - if (err)
> - goto badframe;
> + unsafe_setup_trampoline(__NR_rt_sigreturn, &frame->tramp[0],
> + badframe_block);
> regs->nip = (unsigned long) &frame->tramp[0];
> }
>
> + user_write_access_end();
> +
> + /* Save the siginfo outside of the unsafe block. */
> + if (copy_siginfo_to_user(&frame->info, &ksig->info))
> + goto badframe;
> +
> /* Allocate a dummy caller frame for the signal handler. */
> newsp = ((unsigned long)frame) - __SIGNAL_FRAMESIZE;
> err |= put_user(regs->gpr[1], (unsigned long __user *)newsp);
> @@ -939,6 +937,8 @@ int handle_rt_signal64(struct ksignal *ksig, sigset_t *set,
>
> return 0;
>
> +badframe_block:
> + user_write_access_end();
> badframe:
> signal_fault(current, regs, "handle_rt_signal64", frame);
>
>
Christophe
^ permalink raw reply
* Re: [PATCH 8/8] powerpc/signal64: Rewrite rt_sigreturn() to minimise uaccess switches
From: Christophe Leroy @ 2020-10-16 14:07 UTC (permalink / raw)
To: linuxppc-dev, Christopher M. Riedl
In-Reply-To: <20201015150159.28933-9-cmr@codefail.de>
Le 15/10/2020 à 17:01, Christopher M. Riedl a écrit :
> From: Daniel Axtens <dja@axtens.net>
>
> Add uaccess blocks and use the 'unsafe' versions of functions doing user
> access where possible to reduce the number of times uaccess has to be
> opened/closed.
>
> Signed-off-by: Daniel Axtens <dja@axtens.net>
> Signed-off-by: Christopher M. Riedl <cmr@codefail.de>
> ---
> arch/powerpc/kernel/signal_64.c | 23 +++++++++++++++--------
> 1 file changed, 15 insertions(+), 8 deletions(-)
>
> diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
> index 3b97e3681a8f..0f4ff7a5bfc1 100644
> --- a/arch/powerpc/kernel/signal_64.c
> +++ b/arch/powerpc/kernel/signal_64.c
> @@ -779,18 +779,22 @@ SYSCALL_DEFINE0(rt_sigreturn)
> */
> regs->msr &= ~MSR_TS_MASK;
>
> - if (__get_user(msr, &uc->uc_mcontext.gp_regs[PT_MSR]))
> + if (!user_read_access_begin(uc, sizeof(*uc)))
> goto badframe;
> +
> + unsafe_get_user(msr, &uc->uc_mcontext.gp_regs[PT_MSR], badframe_block);
> +
> if (MSR_TM_ACTIVE(msr)) {
> /* We recheckpoint on return. */
> struct ucontext __user *uc_transact;
>
> /* Trying to start TM on non TM system */
> if (!cpu_has_feature(CPU_FTR_TM))
> - goto badframe;
> + goto badframe_block;
> +
> + unsafe_get_user(uc_transact, &uc->uc_link, badframe_block);
> + user_read_access_end();
user_access_end() only in the if branch ?
>
> - if (__get_user(uc_transact, &uc->uc_link))
> - goto badframe;
> if (restore_tm_sigcontexts(current, &uc->uc_mcontext,
> &uc_transact->uc_mcontext))
> goto badframe;
> @@ -810,12 +814,13 @@ SYSCALL_DEFINE0(rt_sigreturn)
> * causing a TM bad thing.
> */
> current->thread.regs->msr &= ~MSR_TS_MASK;
> +
> +#ifndef CONFIG_PPC_TRANSACTIONAL_MEM
> if (!user_read_access_begin(uc, sizeof(*uc)))
The matching user_read_access_end() is not in the same #ifndef ? That's dirty and hard to follow.
Can you re-organise the code to avoid all those nesting ?
> - return -EFAULT;
> - if (__unsafe_restore_sigcontext(current, NULL, 1, &uc->uc_mcontext)) {
> - user_read_access_end();
> goto badframe;
> - }
> +#endif
> + unsafe_restore_sigcontext(current, NULL, 1, &uc->uc_mcontext,
> + badframe_block);
> user_read_access_end();
> }
>
> @@ -825,6 +830,8 @@ SYSCALL_DEFINE0(rt_sigreturn)
> set_thread_flag(TIF_RESTOREALL);
> return 0;
>
> +badframe_block:
> + user_read_access_end();
> badframe:
> signal_fault(current, regs, "rt_sigreturn", uc);
>
>
Christophe
^ permalink raw reply
* [powerpc:merge] BUILD SUCCESS 4fa6f5d55f64e974784cfc8f38312d48479a4323
From: kernel test robot @ 2020-10-16 15:08 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: 4fa6f5d55f64e974784cfc8f38312d48479a4323 Automatic merge of 'next' into merge (2020-10-15 22:13)
elapsed time: 1664m
configs tested: 130
configs skipped: 3
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
arm cm_x300_defconfig
arm zx_defconfig
powerpc mpc8560_ads_defconfig
mips jmr3927_defconfig
powerpc tqm8555_defconfig
arm alldefconfig
powerpc ps3_defconfig
xtensa generic_kc705_defconfig
powerpc katmai_defconfig
sparc sparc32_defconfig
sh se7780_defconfig
arm colibri_pxa300_defconfig
arm xcep_defconfig
powerpc eiger_defconfig
mips ip32_defconfig
powerpc motionpro_defconfig
mips malta_defconfig
arm lpc32xx_defconfig
arm simpad_defconfig
arm at91_dt_defconfig
arm lart_defconfig
parisc generic-64bit_defconfig
x86_64 alldefconfig
riscv defconfig
riscv nommu_k210_defconfig
mips ip28_defconfig
i386 alldefconfig
arc vdk_hs38_defconfig
powerpc pmac32_defconfig
mips tb0287_defconfig
powerpc mgcoge_defconfig
arm tct_hammer_defconfig
arm vexpress_defconfig
powerpc tqm8540_defconfig
arm nhk8815_defconfig
sh ap325rxa_defconfig
powerpc ppc64e_defconfig
mips ath79_defconfig
arm jornada720_defconfig
arm aspeed_g5_defconfig
arm mvebu_v5_defconfig
powerpc stx_gp3_defconfig
s390 zfcpdump_defconfig
sh se7705_defconfig
powerpc mpc834x_itxgp_defconfig
arm ep93xx_defconfig
arm spear3xx_defconfig
powerpc mpc885_ads_defconfig
sh polaris_defconfig
powerpc powernv_defconfig
sh ecovec24-romimage_defconfig
powerpc ppc6xx_defconfig
ia64 allmodconfig
ia64 defconfig
ia64 allyesconfig
m68k allmodconfig
m68k defconfig
m68k allyesconfig
nios2 defconfig
arc allyesconfig
nds32 allnoconfig
c6x allyesconfig
nds32 defconfig
nios2 allyesconfig
csky defconfig
alpha defconfig
alpha allyesconfig
xtensa allyesconfig
h8300 allyesconfig
arc defconfig
sh allmodconfig
parisc defconfig
s390 allyesconfig
parisc allyesconfig
s390 defconfig
i386 allyesconfig
sparc allyesconfig
sparc defconfig
i386 defconfig
mips allyesconfig
mips allmodconfig
powerpc allyesconfig
powerpc allmodconfig
powerpc allnoconfig
i386 randconfig-a005-20201014
i386 randconfig-a006-20201014
i386 randconfig-a001-20201014
i386 randconfig-a003-20201014
i386 randconfig-a004-20201014
i386 randconfig-a002-20201014
i386 randconfig-a005-20201016
i386 randconfig-a006-20201016
i386 randconfig-a001-20201016
i386 randconfig-a003-20201016
i386 randconfig-a004-20201016
i386 randconfig-a002-20201016
x86_64 randconfig-a016-20201014
x86_64 randconfig-a012-20201014
x86_64 randconfig-a015-20201014
x86_64 randconfig-a013-20201014
x86_64 randconfig-a014-20201014
x86_64 randconfig-a011-20201014
i386 randconfig-a016-20201014
i386 randconfig-a013-20201014
i386 randconfig-a015-20201014
i386 randconfig-a011-20201014
i386 randconfig-a012-20201014
i386 randconfig-a014-20201014
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 kexec
clang tested configs:
x86_64 randconfig-a004-20201014
x86_64 randconfig-a002-20201014
x86_64 randconfig-a006-20201014
x86_64 randconfig-a001-20201014
x86_64 randconfig-a005-20201014
x86_64 randconfig-a003-20201014
---
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 ffd0b25ca049a477cb757e5bcf2d5e1664d12e5d
From: kernel test robot @ 2020-10-16 15:08 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: ffd0b25ca049a477cb757e5bcf2d5e1664d12e5d Revert "powerpc/pci: unmap legacy INTx interrupts when a PHB is removed"
elapsed time: 1663m
configs tested: 197
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
arm h3600_defconfig
sh apsh4ad0a_defconfig
s390 alldefconfig
arm multi_v4t_defconfig
powerpc ppc44x_defconfig
mips tb0287_defconfig
sh sh7724_generic_defconfig
arm netwinder_defconfig
xtensa defconfig
mips e55_defconfig
xtensa audio_kc705_defconfig
m68k mvme147_defconfig
powerpc cell_defconfig
arm collie_defconfig
mips maltaaprp_defconfig
arm cm_x300_defconfig
arm zx_defconfig
powerpc mpc8560_ads_defconfig
mips jmr3927_defconfig
powerpc tqm8555_defconfig
arm alldefconfig
powerpc ps3_defconfig
xtensa generic_kc705_defconfig
arc vdk_hs38_defconfig
powerpc katmai_defconfig
sparc sparc32_defconfig
sh se7780_defconfig
xtensa virt_defconfig
arm lpc18xx_defconfig
arm u300_defconfig
arm colibri_pxa300_defconfig
arm xcep_defconfig
powerpc eiger_defconfig
mips ip32_defconfig
powerpc motionpro_defconfig
mips malta_defconfig
arm lpc32xx_defconfig
arm simpad_defconfig
arm at91_dt_defconfig
arm lart_defconfig
parisc generic-64bit_defconfig
x86_64 alldefconfig
riscv defconfig
riscv nommu_k210_defconfig
mips ip28_defconfig
i386 alldefconfig
powerpc pmac32_defconfig
arm tct_hammer_defconfig
powerpc kilauea_defconfig
mips nlm_xlp_defconfig
arm mps2_defconfig
mips decstation_defconfig
sh r7785rp_defconfig
arm lubbock_defconfig
powerpc ppc64_defconfig
arm mini2440_defconfig
sh rts7751r2dplus_defconfig
powerpc mgcoge_defconfig
arm vexpress_defconfig
powerpc tqm8540_defconfig
arm nhk8815_defconfig
arm davinci_all_defconfig
mips cavium_octeon_defconfig
riscv alldefconfig
powerpc mpc512x_defconfig
arm oxnas_v6_defconfig
arm pxa_defconfig
arm bcm2835_defconfig
m68k amcore_defconfig
sh se7206_defconfig
sh r7780mp_defconfig
ia64 bigsur_defconfig
arm aspeed_g5_defconfig
arm mvebu_v5_defconfig
powerpc stx_gp3_defconfig
s390 zfcpdump_defconfig
sh se7705_defconfig
powerpc mpc834x_itxgp_defconfig
arm ep93xx_defconfig
arm spear3xx_defconfig
riscv allyesconfig
mips maltaup_defconfig
powerpc sbc8548_defconfig
sh sh7710voipgw_defconfig
sh se7721_defconfig
h8300 h8s-sim_defconfig
arm stm32_defconfig
arm spitz_defconfig
sh sh7785lcr_32bit_defconfig
arc nsimosci_defconfig
powerpc mpc885_ads_defconfig
sh polaris_defconfig
powerpc powernv_defconfig
sh ecovec24-romimage_defconfig
powerpc ppc6xx_defconfig
arm omap2plus_defconfig
powerpc mpc5200_defconfig
m68k sun3x_defconfig
sh shmin_defconfig
arm shannon_defconfig
powerpc sam440ep_defconfig
m68k m5307c3_defconfig
sh sh03_defconfig
sh edosk7705_defconfig
arm sama5_defconfig
arm magician_defconfig
sh migor_defconfig
arm viper_defconfig
ia64 allmodconfig
ia64 defconfig
ia64 allyesconfig
m68k allmodconfig
m68k defconfig
m68k allyesconfig
nios2 defconfig
arc allyesconfig
nds32 allnoconfig
c6x allyesconfig
nds32 defconfig
nios2 allyesconfig
csky defconfig
alpha defconfig
alpha allyesconfig
xtensa allyesconfig
h8300 allyesconfig
arc defconfig
sh allmodconfig
parisc defconfig
s390 allyesconfig
parisc allyesconfig
s390 defconfig
i386 allyesconfig
sparc allyesconfig
sparc defconfig
i386 defconfig
mips allyesconfig
mips allmodconfig
powerpc allyesconfig
powerpc allmodconfig
powerpc allnoconfig
x86_64 randconfig-a004-20201015
x86_64 randconfig-a002-20201015
x86_64 randconfig-a006-20201015
x86_64 randconfig-a001-20201015
x86_64 randconfig-a005-20201015
x86_64 randconfig-a003-20201015
i386 randconfig-a005-20201014
i386 randconfig-a006-20201014
i386 randconfig-a001-20201014
i386 randconfig-a003-20201014
i386 randconfig-a004-20201014
i386 randconfig-a002-20201014
i386 randconfig-a005-20201016
i386 randconfig-a006-20201016
i386 randconfig-a001-20201016
i386 randconfig-a003-20201016
i386 randconfig-a004-20201016
i386 randconfig-a002-20201016
x86_64 randconfig-a016-20201014
x86_64 randconfig-a012-20201014
x86_64 randconfig-a015-20201014
x86_64 randconfig-a013-20201014
x86_64 randconfig-a014-20201014
x86_64 randconfig-a011-20201014
i386 randconfig-a016-20201015
i386 randconfig-a013-20201015
i386 randconfig-a015-20201015
i386 randconfig-a011-20201015
i386 randconfig-a012-20201015
i386 randconfig-a014-20201015
i386 randconfig-a016-20201014
i386 randconfig-a013-20201014
i386 randconfig-a015-20201014
i386 randconfig-a011-20201014
i386 randconfig-a012-20201014
i386 randconfig-a014-20201014
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 kexec
clang tested configs:
x86_64 randconfig-a004-20201014
x86_64 randconfig-a002-20201014
x86_64 randconfig-a006-20201014
x86_64 randconfig-a001-20201014
x86_64 randconfig-a005-20201014
x86_64 randconfig-a003-20201014
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply
* Re: [PATCH 04/20] dt-bindings: usb: usb-hcd: Add "tpl-support" property
From: Rob Herring @ 2020-10-16 15:44 UTC (permalink / raw)
To: Serge Semin
Cc: linux-arm-kernel, devicetree, linux-snps-arc, Mathias Nyman,
Neil Armstrong, Greg Kroah-Hartman, Lad Prabhakar, linux-usb,
linux-mips, Serge Semin, Alexey Malahov, Manu Gautam, Andy Gross,
Bjorn Andersson, Pavel Parkhomenko, Kevin Hilman, Felipe Balbi,
linuxppc-dev, Yoshihiro Shimoda, linux-kernel, Roger Quadros
In-Reply-To: <20201014172710.iay3lvb37saeksaj@mobilestation>
On Wed, Oct 14, 2020 at 08:27:10PM +0300, Serge Semin wrote:
> On Wed, Oct 14, 2020 at 08:27:56AM -0500, Rob Herring wrote:
> > On Wed, 14 Oct 2020 13:13:46 +0300, Serge Semin wrote:
> > > The host controller device might be designed to work for the particular
> > > products or applications. In that case its DT node is supposed to be
> > > equipped with the tpl-support property.
> > >
> > > Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> > >
> > > ---
> > >
> > > Changelog v2:
> > > - Grammar fix: "s/it'/its"
> > > - Discard '|' from the property description, since we don't need to preserve
> > > the text formatting.
> > > ---
> > > Documentation/devicetree/bindings/usb/usb-hcd.yaml | 6 ++++++
> > > 1 file changed, 6 insertions(+)
> > >
> >
> >
> > My bot found errors running 'make dt_binding_check' on your patch:
> >
> > Traceback (most recent call last):
> > File "/usr/local/bin/dt-extract-example", line 45, in <module>
> > binding = yaml.load(open(args.yamlfile, encoding='utf-8').read())
> > File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/main.py", line 343, in load
> > return constructor.get_single_data()
> > File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/constructor.py", line 111, in get_single_data
> > node = self.composer.get_single_node()
> > File "_ruamel_yaml.pyx", line 706, in _ruamel_yaml.CParser.get_single_node
> > File "_ruamel_yaml.pyx", line 724, in _ruamel_yaml.CParser._compose_document
> > File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
> > File "_ruamel_yaml.pyx", line 891, in _ruamel_yaml.CParser._compose_mapping_node
> > File "_ruamel_yaml.pyx", line 904, in _ruamel_yaml.CParser._parse_next_event
> > ruamel.yaml.scanner.ScannerError: mapping values are not allowed in this context
> > in "<unicode string>", line 27, column 14
> > make[1]: *** [Documentation/devicetree/bindings/Makefile:20: Documentation/devicetree/bindings/usb/usb-hcd.example.dts] Error 1
> > make[1]: *** Deleting file 'Documentation/devicetree/bindings/usb/usb-hcd.example.dts'
> > make[1]: *** Waiting for unfinished jobs....
> > ./Documentation/devicetree/bindings/usb/usb-hcd.yaml:27:14: [error] syntax error: mapping values are not allowed here (syntax)
> > make[1]: *** [Documentation/devicetree/bindings/Makefile:59: Documentation/devicetree/bindings/processed-schema-examples.json] Error 123
> > make: *** [Makefile:1366: dt_binding_check] Error 2
> >
> >
> > See https://patchwork.ozlabs.org/patch/1382001
> >
> > If you already ran 'make dt_binding_check' and didn't see the above
> > error(s), then make sure dt-schema is up to date:
> >
> > pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade
> >
> > Please check and re-submit.
>
> Hm, that's weird. Of course I did the dt_binding_check before submission, but
> even after the dt-schema repo update I failed to see the error:
>
> $ make -j8 ARCH=mips CROSS_COMPILE=mipsel-baikal-linux- dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/usb/usb-hcd.yaml
> CHKDT Documentation/devicetree/bindings/usb/usb-hcd.yaml
> SCHEMA Documentation/devicetree/bindings/processed-schema-examples.yaml
> DTC Documentation/devicetree/bindings/usb/usb-hcd.example.dt.yaml
> CHECK Documentation/devicetree/bindings/usb/usb-hcd.example.dt.yaml
>
> Rob, any idea why has the bot got mad at me?
Humm, I'm not sure. We'll see if it happens again when you send v2.
Note that yamllint is also run now and that's the line with '[error]'.
So neither yamllint nor ruamel are happy (could be the same parser code
ultimately).
Rob
^ permalink raw reply
* Re: [PATCH v4 2/2] ASoC: dt-bindings: fsl_xcvr: Add document for XCVR
From: Rob Herring @ 2020-10-16 17:17 UTC (permalink / raw)
To: Viorel Suman (OSS)
Cc: devicetree, alsa-devel, Fabio Estevam, Matthias Schiffer,
Philipp Zabel, Timur Tabi, Xiubo Li, Shengjiu Wang, Mark Brown,
Takashi Iwai, Jaroslav Kysela, Nicolin Chen, Rob Herring,
Viorel Suman, Liam Girdwood, Cosmin-Gabriel Samoila, linuxppc-dev,
linux-kernel
In-Reply-To: <20201013121733.83684-3-viorel.suman@oss.nxp.com>
On Tue, 13 Oct 2020 15:17:33 +0300, Viorel Suman (OSS) wrote:
> From: Viorel Suman <viorel.suman@nxp.com>
>
> XCVR (Audio Transceiver) is a new IP module found on i.MX8MP.
>
> Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
> ---
> .../devicetree/bindings/sound/fsl,xcvr.yaml | 104 ++++++++++++++++++
> 1 file changed, 104 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/sound/fsl,xcvr.yaml
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply
* Re: [PATCH 01/20] dt-bindings: usb: usb-hcd: Convert generic USB properties to DT schema
From: Rob Herring @ 2020-10-16 18:33 UTC (permalink / raw)
To: Serge Semin
Cc: Neil Armstrong, linux-kernel, Pavel Parkhomenko, Kevin Hilman,
Andy Gross, linux-snps-arc, devicetree, Mathias Nyman,
Lad Prabhakar, Alexey Malahov, Rob Herring, Bjorn Andersson,
linux-arm-kernel, Roger Quadros, Felipe Balbi, Greg Kroah-Hartman,
Yoshihiro Shimoda, linux-usb, linux-mips, Serge Semin,
Manu Gautam, linuxppc-dev
In-Reply-To: <20201014101402.18271-2-Sergey.Semin@baikalelectronics.ru>
On Wed, 14 Oct 2020 13:13:43 +0300, Serge Semin wrote:
> The generic USB HCD properties have been described in the legacy bindings
> text file: Documentation/devicetree/bindings/usb/generic.txt . Let's
> convert it' content into the USB HCD DT schema properties so all USB DT
> nodes would be validated to have them properly utilized.
>
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
>
> ---
>
> Changelog v2:
> - Discard '|' in all the new properties, since we don't need to preserve
> the text formatting.
> - Convert abbreviated form of the "maximum-speed" enum restriction into
> the multi-lined version of the list.
> - Drop quotes from around the string constants.
> ---
> .../devicetree/bindings/usb/generic.txt | 57 ------------
> .../devicetree/bindings/usb/usb-hcd.yaml | 88 +++++++++++++++++++
> 2 files changed, 88 insertions(+), 57 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/usb/generic.txt
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply
* Re: [PATCH 02/20] dt-bindings: usb: usb-hcd: Add "otg-rev" property restriction
From: Rob Herring @ 2020-10-16 18:33 UTC (permalink / raw)
To: Serge Semin
Cc: Neil Armstrong, linux-kernel, Pavel Parkhomenko, Kevin Hilman,
Andy Gross, linux-snps-arc, devicetree, Mathias Nyman,
Lad Prabhakar, Alexey Malahov, Rob Herring, Bjorn Andersson,
linux-arm-kernel, Roger Quadros, Felipe Balbi, Greg Kroah-Hartman,
Yoshihiro Shimoda, linux-usb, linux-mips, Serge Semin,
Manu Gautam, linuxppc-dev
In-Reply-To: <20201014101402.18271-3-Sergey.Semin@baikalelectronics.ru>
On Wed, 14 Oct 2020 13:13:44 +0300, Serge Semin wrote:
> There are only four OTG revisions are currently supported by the kernel:
> 0x0100, 0x0120, 0x0130, 0x0200. Any another value is considered as
> invalid.
>
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> ---
> Documentation/devicetree/bindings/usb/usb-hcd.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply
* Re: [PATCH 03/20] dt-bindings: usb: usb-hcd: Add "ulpi/serial/hsic" PHY types
From: Rob Herring @ 2020-10-16 18:34 UTC (permalink / raw)
To: Serge Semin
Cc: Neil Armstrong, linux-mips, Pavel Parkhomenko, Kevin Hilman,
Andy Gross, linux-snps-arc, devicetree, Mathias Nyman,
Lad Prabhakar, Alexey Malahov, Rob Herring, Bjorn Andersson,
linux-arm-kernel, Roger Quadros, Felipe Balbi, Greg Kroah-Hartman,
Yoshihiro Shimoda, linux-usb, linux-kernel, Serge Semin,
Manu Gautam, linuxppc-dev
In-Reply-To: <20201014101402.18271-4-Sergey.Semin@baikalelectronics.ru>
On Wed, 14 Oct 2020 13:13:45 +0300, Serge Semin wrote:
> Aside from the UTMI+ there are also ULPI, Serial and HSIC PHY types
> that can be specified in the phy_type HCD property. Add them to the
> enumeration of the acceptable values.
>
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
>
> ---
>
> Changelog v2:
> - Grammar fix: "s/PHY types can be/PHY types that can be"
> - Drop quotes from around the string constants.
> ---
> Documentation/devicetree/bindings/usb/usb-hcd.yaml | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
Reviewed-by: Rob Herring <robh@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