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: <CAGsJ_4wWEdxk0qNV89bL0zeGaXUBb7h92mdNeRCgcUCY5C84ww@mail.gmail.com>
Date: Mon, 18 Mar 2024 07:48:19 +0800
From: Barry Song <21cnbao@...il.com>
To: Guenter Roeck <linux@...ck-us.net>
Cc: herbert@...dor.apana.org.au, davem@...emloft.net, 
	linux-crypto@...r.kernel.org, akpm@...ux-foundation.org, chrisl@...nel.org, 
	sjenning@...hat.com, vitaly.wool@...sulko.com, linux-kernel@...r.kernel.org, 
	Barry Song <v-songbaohua@...o.com>, Johannes Weiner <hannes@...xchg.org>, 
	Nhat Pham <nphamcs@...il.com>, Yosry Ahmed <yosryahmed@...gle.com>, 
	Chengming Zhou <zhouchengming@...edance.com>
Subject: Re: [PATCH v7] crypto: scompress: remove memcpy if sg_nents is 1 and
 pages are lowmem

On Mon, Mar 18, 2024 at 7:13 AM Guenter Roeck <linux@...ck-us.net> wrote:
>
> Hi,
>
> On Sat, Mar 02, 2024 at 08:27:45AM +1300, Barry Song wrote:
> [ ... ]
> > @@ -152,8 +165,17 @@ static int scomp_acomp_comp_decomp(struct acomp_req *req, int dir)
> >                       ret = -ENOSPC;
> >                       goto out;
> >               }
> > -             scatterwalk_map_and_copy(scratch->dst, req->dst, 0, req->dlen,
> > -                                      1);
> > +             if (dst == scratch->dst) {
> > +                     scatterwalk_map_and_copy(scratch->dst, req->dst, 0,
> > +                                              req->dlen, 1);
> > +             } else {
> > +                     int nr_pages = DIV_ROUND_UP(req->dst->offset + req->dlen, PAGE_SIZE);
> > +                     int i;
> > +                     struct page *dst_page = sg_page(req->dst);
> > +
> > +                     for (i = 0; i < nr_pages; i++)
> > +                             flush_dcache_page(dst_page + i);
>
> flush_dcache_page() is an empty macro on some architectures
> such as xtensa. This results in

Hi Guenter,

this is a bug of xtensa, could you test the patch:
https://lore.kernel.org/all/20240313045036.51065-1-21cnbao@gmail.com/


>
> Building xtensa:allmodconfig ... failed
> --------------
> Error log:
> crypto/scompress.c: In function 'scomp_acomp_comp_decomp':
> crypto/scompress.c:174:38: error: unused variable 'dst_page'
>
> on the affected architectures.
>
> Guenter

Thanks
Barry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ