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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEbi=3dSkAcTey8WeRuxN7oYq_O47QAZffLwruQRbpGpmqT-yA@mail.gmail.com>
Date:   Mon, 13 Jul 2020 18:05:10 +0800
From:   Greentime Hu <green.hu@...il.com>
To:     Christoph Hellwig <hch@....de>
Cc:     Nick Hu <nickhu@...estech.com>, Vincent Chen <deanbo422@...il.com>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        linux-riscv@...ts.infradead.org,
        linux-arch <linux-arch@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/6] uaccess: remove segment_eq

Christoph Hellwig <hch@....de> 於 2020年7月10日 週五 下午9:57寫道:
>
> segment_eq is only used to implement uaccess_kernel.  Just open code
> uaccess_kernel in the arch uaccess headers and remove one layer of
> indirection.
>
> Signed-off-by: Christoph Hellwig <hch@....de>
> ---
>  arch/alpha/include/asm/uaccess.h      | 2 +-
>  arch/arc/include/asm/segment.h        | 3 +--
>  arch/arm/include/asm/uaccess.h        | 4 ++--
>  arch/arm64/include/asm/uaccess.h      | 2 +-
>  arch/csky/include/asm/segment.h       | 2 +-
>  arch/h8300/include/asm/segment.h      | 2 +-
>  arch/ia64/include/asm/uaccess.h       | 2 +-
>  arch/m68k/include/asm/segment.h       | 2 +-
>  arch/microblaze/include/asm/uaccess.h | 2 +-
>  arch/mips/include/asm/uaccess.h       | 2 +-
>  arch/nds32/include/asm/uaccess.h      | 2 +-
>  arch/nios2/include/asm/uaccess.h      | 2 +-
>  arch/openrisc/include/asm/uaccess.h   | 2 +-
>  arch/parisc/include/asm/uaccess.h     | 2 +-
>  arch/powerpc/include/asm/uaccess.h    | 3 +--
>  arch/riscv/include/asm/uaccess.h      | 4 +---
>  arch/s390/include/asm/uaccess.h       | 2 +-
>  arch/sh/include/asm/segment.h         | 3 +--
>  arch/sparc/include/asm/uaccess_32.h   | 2 +-
>  arch/sparc/include/asm/uaccess_64.h   | 2 +-
>  arch/x86/include/asm/uaccess.h        | 2 +-
>  arch/xtensa/include/asm/uaccess.h     | 2 +-
>  include/asm-generic/uaccess.h         | 4 ++--
>  include/linux/uaccess.h               | 2 --
>  24 files changed, 25 insertions(+), 32 deletions(-)
>
[...]
> diff --git a/arch/nds32/include/asm/uaccess.h b/arch/nds32/include/asm/uaccess.h
> index 3a9219f53ee0d8..010ba5f1d7dd6b 100644
> --- a/arch/nds32/include/asm/uaccess.h
> +++ b/arch/nds32/include/asm/uaccess.h
> @@ -44,7 +44,7 @@ static inline void set_fs(mm_segment_t fs)
>         current_thread_info()->addr_limit = fs;
>  }
>
> -#define segment_eq(a, b)       ((a) == (b))
> +#define uaccess_kernel()       (get_fs() == KERNEL_DS)
>
>  #define __range_ok(addr, size) (size <= get_fs() && addr <= (get_fs() -size))
>
Hi Christoph, Thank you.
Acked-by: Greentime Hu <green.hu@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ