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: <eteswsookugqwr5pju5fuzc6m2wly4pxrbp3y2umke6ojvwo3x@pwjqsu77yh6s>
Date: Mon, 13 May 2024 19:30:49 +0200
From: Michal Koutný <mkoutny@...e.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org, 
	Masami Hiramatsu <mhiramat@...nel.org>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, 
	Christian Brauner <brauner@...nel.org>, Oleg Nesterov <oleg@...hat.com>, 
	Kent Overstreet <kent.overstreet@...ux.dev>, Kees Cook <keescook@...omium.org>, 
	Andrew Morton <akpm@...ux-foundation.org>, Tycho Andersen <tandersen@...flix.com>, 
	Jens Axboe <axboe@...nel.dk>, Aleksa Sarai <cyphar@...har.com>
Subject: Re: [PATCH 1/3] tracing: Remove dependency of saved_cmdlines_buffer
 on PID_MAX_DEFAULT

On Tue, Apr 09, 2024 at 11:01:26AM GMT, Steven Rostedt <rostedt@...dmis.org> wrote:
> > -	tpid = pid & (PID_MAX_DEFAULT - 1);
> > +	tpid = pid % PID_MAP_SIZE;
> 
> Does that compile to the same? This is a fast path.

I didn't check.
If fast is the intetion, I would change it to something
like BUILD_BUG_ON(!(PID_MAP_SIZE % 2)) and keep the bit operation
without reliance on compiler optimizations.

Thanks for the response (I may not follow up on this single commit
though).

Michal

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ