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: <CAAhV-H5HRXwGVs8T3=rvnjhLVdAWEDXgDD_PW2mysmBWmksk2w@mail.gmail.com>
Date:   Thu, 4 Aug 2022 11:14:41 +0800
From:   Huacai Chen <chenhuacai@...nel.org>
To:     Qing Zhang <zhangqing@...ngson.cn>
Cc:     WANG Xuerui <kernel@...0n.name>, loongarch@...ts.linux.dev,
        LKML <linux-kernel@...r.kernel.org>,
        linux-arch <linux-arch@...r.kernel.org>,
        Jiaxun Yang <jiaxun.yang@...goat.com>
Subject: Re: [PATCH] LoongArch: Requires __force attributes for any casts

Queued for 5.20, thanks.

On Tue, Aug 2, 2022 at 2:09 PM Qing Zhang <zhangqing@...ngson.cn> wrote:
>
> sudo make C=2
> warning:
> arch/loongarch/kernel/ptrace.c: note: in included file (through include/linux/uaccess.h, include/linux/sched/task.h, include/linux/sched/signal.h, include/linux/ptrace.h, include/linux/audit.h):
> ./arch/loongarch/include/asm/uaccess.h:232:32: warning: incorrect type in argument 2 (different address spaces)
> ./arch/loongarch/include/asm/uaccess.h:232:32:    expected void const *from
> ./arch/loongarch/include/asm/uaccess.h:232:32:    got void const [noderef] __user *from
>
> Signed-off-by: Qing Zhang <zhangqing@...ngson.cn>
>
> diff --git a/arch/loongarch/include/asm/uaccess.h b/arch/loongarch/include/asm/uaccess.h
> index 2b44edc604a2..a8ae2af4025a 100644
> --- a/arch/loongarch/include/asm/uaccess.h
> +++ b/arch/loongarch/include/asm/uaccess.h
> @@ -229,13 +229,13 @@ extern unsigned long __copy_user(void *to, const void *from, __kernel_size_t n);
>  static inline unsigned long __must_check
>  raw_copy_from_user(void *to, const void __user *from, unsigned long n)
>  {
> -       return __copy_user(to, from, n);
> +       return __copy_user(to, (__force const void *)from, n);
>  }
>
>  static inline unsigned long __must_check
>  raw_copy_to_user(void __user *to, const void *from, unsigned long n)
>  {
> -       return __copy_user(to, from, n);
> +       return __copy_user((__force void *)to, from, n);
>  }
>
>  #define INLINE_COPY_FROM_USER
> --
> 2.20.1
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ