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: <u34sykpbi6vw7xyalqnsjqt4aieayjotyppl3dwilv3hq7kghf@prx4ktfpk36o>
Date: Wed, 12 Nov 2025 20:17:47 +0530
From: Brahmajit Das <listout@...tout.xyz>
To: David Laight <david.laight.linux@...il.com>
Cc: syzbot+d1b7fa1092def3628bd7@...kaller.appspotmail.com, 
	andrii@...nel.org, ast@...nel.org, bpf@...r.kernel.org, contact@...aud-lcm.com, 
	daniel@...earbox.net, eddyz87@...il.com, haoluo@...gle.com, john.fastabend@...il.com, 
	jolsa@...nel.org, kpsingh@...nel.org, linux-kernel@...r.kernel.org, 
	martin.lau@...ux.dev, netdev@...r.kernel.org, sdf@...ichev.me, song@...nel.org, 
	syzkaller-bugs@...glegroups.com, yonghong.song@...ux.dev
Subject: Re: [PATCH bpf-next v3] bpf: Clamp trace length in __bpf_get_stack
 to fix OOB write

On 12.11.2025 13:35, David Laight wrote:
> On Tue, 11 Nov 2025 13:42:54 +0530
> Brahmajit Das <listout@...tout.xyz> wrote:
> 
...snip...
> 
> Please can we have no unnecessary min_t().
> You wouldn't write:
> 	x = (u32)a < (u32)b ? (u32)a : (u32)b;
> 
>     David
>  
> >  	copy_len = trace_nr * elem_size;
> >  
> >  	ips = trace->ip + skip;
> 

Hi David,

Sorry, I didn't quite get that. Would prefer something like:
	trace_nr = (trace_nr <= num_elem) ? trace_nr : num_elem;
The pre-refactor code.

-- 
Regards,
listout

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ