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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <369716bf-0216-4114-b502-a2d2c819ee8c@roeck-us.net>
Date: Sun, 17 Mar 2024 17:16:05 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Barry Song <21cnbao@...il.com>
Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
	chris@...kel.net, jcmvbkbc@...il.com, willy@...radead.org,
	alexghiti@...osinc.com, rppt@...nel.org, dennis@...nel.org,
	Barry Song <v-songbaohua@...o.com>,
	Huacai Chen <chenhuacai@...ngson.cn>,
	Herbert Xu <herbert@...dor.apana.org.au>,
	kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] xtensa: remove redundant flush_dcache_page and
 ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE macros

On Wed, Mar 13, 2024 at 05:50:36PM +1300, Barry Song wrote:
> From: Barry Song <v-songbaohua@...o.com>
> 
> xtensa's flush_dcache_page() can be a no-op sometimes. There is a
> generic implementation for this case in include/asm-generic/
> cacheflush.h.
>  #ifndef ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE
>  static inline void flush_dcache_page(struct page *page)
>  {
>  }
> 
>  #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0
>  #endif
> 
> So remove the superfluous flush_dcache_page() definition, which also
> helps silence potential build warnings complaining the page variable
> passed to flush_dcache_page() is not used.
> 
>    In file included from crypto/scompress.c:12:
>    include/crypto/scatterwalk.h: In function 'scatterwalk_pagedone':
>    include/crypto/scatterwalk.h:76:30: warning: variable 'page' set but not used [-Wunused-but-set-variable]
>       76 |                 struct page *page;
>          |                              ^~~~
>    crypto/scompress.c: In function 'scomp_acomp_comp_decomp':
> >> crypto/scompress.c:174:38: warning: unused variable 'dst_page' [-Wunused-variable]
>      174 |                         struct page *dst_page = sg_page(req->dst);
>          |
> 
> The issue was originally reported on LoongArch by kernel test
> robot. And Huacai fixed it on LoongArch, but I found xtensa
> obviously has the same issue.
> 

Maybe I am doing something wrong, but this patch doesn't build
for me.

 CC      arch/xtensa/kernel/asm-offsets.s
In file included from ./include/linux/highmem.h:8,
                 from ./include/linux/bvec.h:10,
                 from ./include/linux/blk_types.h:10,
                 from ./include/linux/writeback.h:13,
                 from ./include/linux/memcontrol.h:23,
                 from ./include/linux/swap.h:9,
                 from ./include/linux/suspend.h:5,
                 from arch/xtensa/kernel/asm-offsets.c:24:
/include/linux/cacheflush.h:9:5: error: "ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE" is not defined, evaluates to 0 [-Werror=undef]
    9 | #if ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE

Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ