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: <2a4c3426-8afb-f56f-b31a-44a4505f5030@physik.fu-berlin.de>
Date:   Mon, 18 Jan 2021 20:59:45 +0100
From:   John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>
To:     Yejune Deng <yejune.deng@...il.com>, ysato@...rs.sourceforge.jp,
        dalias@...c.org
Cc:     linux-sh@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sh: kdump: add some attribute to function

On 12/10/20 7:49 AM, Yejune Deng wrote:
> add '__iomem' for ioremap() and '__user' for copy_to_user().
> 
> Signed-off-by: Yejune Deng <yejune.deng@...il.com>
> ---
>  arch/sh/kernel/crash_dump.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/sh/kernel/crash_dump.c b/arch/sh/kernel/crash_dump.c
> index a908612..5b41b59 100644
> --- a/arch/sh/kernel/crash_dump.c
> +++ b/arch/sh/kernel/crash_dump.c
> @@ -26,7 +26,7 @@
>  ssize_t copy_oldmem_page(unsigned long pfn, char *buf,
>                                 size_t csize, unsigned long offset, int userbuf)
>  {
> -	void  *vaddr;
> +	void  __iomem *vaddr;
>  
>  	if (!csize)
>  		return 0;
> @@ -34,7 +34,7 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf,
>  	vaddr = ioremap(pfn << PAGE_SHIFT, PAGE_SIZE);
>  
>  	if (userbuf) {
> -		if (copy_to_user(buf, (vaddr + offset), csize)) {
> +		if (copy_to_user((void __user *)buf, (vaddr + offset), csize)) {
>  			iounmap(vaddr);
>  			return -EFAULT;
>  		}

Successfully boot-tested on my SH-7785LCR. No regressions.

Tested-by: John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@...ian.org
`. `'   Freie Universitaet Berlin - glaubitz@...sik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ