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: <CAJF2gTQb=P2+0OY+KL0aQ4=0wgfHP-R-PfjO_b0_vxvqM+t0mQ@mail.gmail.com>
Date: Sat, 23 Dec 2023 10:38:35 +0800
From: Guo Ren <guoren@...nel.org>
To: David Laight <David.Laight@...lab.com>
Cc: Leonardo Bras <leobras@...hat.com>, 
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, 
	"paul.walmsley@...ive.com" <paul.walmsley@...ive.com>, "palmer@...belt.com" <palmer@...belt.com>, 
	"alexghiti@...osinc.com" <alexghiti@...osinc.com>, "charlie@...osinc.com" <charlie@...osinc.com>, 
	"xiao.w.wang@...el.com" <xiao.w.wang@...el.com>, "david@...hat.com" <david@...hat.com>, 
	"panqinglin2020@...as.ac.cn" <panqinglin2020@...as.ac.cn>, 
	"rick.p.edgecombe@...el.com" <rick.p.edgecombe@...el.com>, "willy@...radead.org" <willy@...radead.org>, 
	"bjorn@...osinc.com" <bjorn@...osinc.com>, 
	"conor.dooley@...rochip.com" <conor.dooley@...rochip.com>, "cleger@...osinc.com" <cleger@...osinc.com>, 
	"linux-riscv@...ts.infradead.org" <linux-riscv@...ts.infradead.org>, Guo Ren <guoren@...ux.alibaba.com>
Subject: Re: [PATCH V2 4/4] riscv: mm: Optimize TASK_SIZE definition

Hi David,

On Fri, Dec 22, 2023 at 7:52 PM David Laight <David.Laight@...lab.com> wrote:
>
> From: Guo Ren
> > Sent: 22 December 2023 11:25
> ...
> > > > +#define TASK_SIZE    (is_compat_task() ? \
> > > >                        TASK_SIZE_32 : TASK_SIZE_64)
> > I would remove is_compat_task() in the next version because your patch
> > contains that.
>
> Does TASK_SIZE get used in access_ok() ?
> If so the repeated expansion of that 'mess' will slow things down.
>
> OTOH access_ok(ptr, len) can just check (ptr | (ptr + len)) < 0)
> and rely on the page faults for everything else.
I mean, I would remove is_compat_task() optimization.
test_thread_flag(TIF_32BIT) -> (is_compat_task() ?
Sorry for the bad wording.

Leonardo's new patch series contains the optimization on
is_compat_task(), so I canceled mine.


>
>         David
>
> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
> Registration No: 1397386 (Wales)



-- 
Best Regards
 Guo Ren

Powered by blists - more mailing lists