lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <877c70bd-52ef-95ed-1029-e84911e9162b@gmail.com>
Date:   Wed, 13 Oct 2021 11:54:45 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Arnd Bergmann <arnd@...nel.org>, Daniel Mack <daniel@...que.org>,
        Haojian Zhuang <haojian.zhuang@...il.com>,
        Robert Jarzmik <robert.jarzmik@...e.fr>,
        Felipe Balbi <balbi@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Rikard Falkeborn <rikard.falkeborn@...il.com>,
        linux-arm-kernel@...ts.infradead.org, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH] [RFC] usb: gadget: avoid unusual inline assembly

On 9/27/21 5:38 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
> 
> clang does not understand the "mrc%?" syntax:
> 
> drivers/usb/gadget/udc/pxa25x_udc.c:2330:11: error: invalid % escape in inline assembly string
> 
> I don't understand it either, but removing the %? here gets it to build.
> This is probably wrong and someone else should do a proper patch.
> 
> Any suggestions?
> 
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
>  drivers/usb/gadget/udc/pxa25x_udc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/udc/pxa25x_udc.c b/drivers/usb/gadget/udc/pxa25x_udc.c
> index a09ec1d826b2..52cdfd8212d6 100644
> --- a/drivers/usb/gadget/udc/pxa25x_udc.c
> +++ b/drivers/usb/gadget/udc/pxa25x_udc.c
> @@ -2325,7 +2325,7 @@ static int pxa25x_udc_probe(struct platform_device *pdev)
>  	pr_info("%s: version %s\n", driver_name, DRIVER_VERSION);
>  
>  	/* insist on Intel/ARM/XScale */
> -	asm("mrc%? p15, 0, %0, c0, c0" : "=r" (chiprev));
> +	asm("mrc p15, 0, %0, c0, c0" : "=r" (chiprev));

You could consider using read_cpuid() from
arch/arm/include/asm/cputype.h as this driver really does not seem to
have portability in mind.

>  	if ((chiprev & CP15R0_VENDOR_MASK) != CP15R0_XSCALE_VALUE) {
>  		pr_err("%s: not XScale!\n", driver_name);
>  		return -ENODEV;
> 


-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ