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: <557ceba1-9cf3-203c-cbb4-27cae68e0b90@redhat.com>
Date:   Tue, 24 Sep 2019 10:35:51 +0200
From:   David Hildenbrand <david@...hat.com>
To:     Anshuman Khandual <anshuman.khandual@....com>, linux-mm@...ck.org
Cc:     Dan Williams <dan.j.williams@...el.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Jason Gunthorpe <jgg@...pe.ca>,
        Logan Gunthorpe <logang@...tatee.com>,
        Ira Weiny <ira.weiny@...el.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/memremap: Drop unused SECTION_SIZE and SECTION_MASK

On 24.09.19 10:00, Anshuman Khandual wrote:
> SECTION_SIZE and SECTION_MASK macros are not getting used anymore. But they
> do conflict with existing definitions on arm64 platform causing following
> warning during build. Lets drop these unused macros.
> 
> mm/memremap.c:16: warning: "SECTION_MASK" redefined
>  #define SECTION_MASK ~((1UL << PA_SECTION_SHIFT) - 1)
> 
> In file included from ./arch/arm64/include/asm/processor.h:34,
>                  from ./include/linux/mutex.h:19,
>                  from ./include/linux/kernfs.h:12,
>                  from ./include/linux/sysfs.h:16,
>                  from ./include/linux/kobject.h:20,
>                  from ./include/linux/device.h:16,
>                  from mm/memremap.c:3:
> ./arch/arm64/include/asm/pgtable-hwdef.h:79: note: this is the location of
> the previous definition
>  #define SECTION_MASK  (~(SECTION_SIZE-1))
> 
> mm/memremap.c:17: warning: "SECTION_SIZE" redefined
>  #define SECTION_SIZE (1UL << PA_SECTION_SHIFT)
> 
> In file included from ./arch/arm64/include/asm/processor.h:34,
>                  from ./include/linux/mutex.h:19,
>                  from ./include/linux/kernfs.h:12,
>                  from ./include/linux/sysfs.h:16,
>                  from ./include/linux/kobject.h:20,
>                  from ./include/linux/device.h:16,
>                  from mm/memremap.c:3:
> ./arch/arm64/include/asm/pgtable-hwdef.h:78: note: this is the location of
> the previous definition
>  #define SECTION_SIZE  (_AC(1, UL) << SECTION_SHIFT)
> 
> Cc: Dan Williams <dan.j.williams@...el.com>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Jason Gunthorpe <jgg@...pe.ca>
> Cc: Logan Gunthorpe <logang@...tatee.com>
> Cc: Ira Weiny <ira.weiny@...el.com>
> Cc: linux-kernel@...r.kernel.org
> Reported-by: kbuild test robot <lkp@...el.com>
> Signed-off-by: Anshuman Khandual <anshuman.khandual@....com>
> ---
> Build and boot tested on arm64 platform with ZONE_DEVICE enabled. But
> only boot tested on arm64 and some other platforms with allmodconfig.
> 
>  mm/memremap.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/mm/memremap.c b/mm/memremap.c
> index f6c17339cd0d..bf2882bfbf48 100644
> --- a/mm/memremap.c
> +++ b/mm/memremap.c
> @@ -13,8 +13,6 @@
>  #include <linux/xarray.h>
>  
>  static DEFINE_XARRAY(pgmap_array);
> -#define SECTION_MASK ~((1UL << PA_SECTION_SHIFT) - 1)
> -#define SECTION_SIZE (1UL << PA_SECTION_SHIFT)
>  
>  #ifdef CONFIG_DEV_PAGEMAP_OPS
>  DEFINE_STATIC_KEY_FALSE(devmap_managed_key);
> 

Reviewed-by: David Hildenbrand <david@...hat.com>

-- 

Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ