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: <8d2c34e9d1ac5534ccf856242c13f2fd3c1000bd.camel@redhat.com>
Date: Mon, 28 Jul 2025 13:07:30 +0200
From: Gabriele Monaco <gmonaco@...hat.com>
To: Nam Cao <namcao@...utronix.de>
Cc: Steven Rostedt <rostedt@...dmis.org>, Masami Hiramatsu
 <mhiramat@...nel.org>,  Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
 linux-trace-kernel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] rv: Fix wrong type cast in monitors_show()

On Mon, 2025-07-28 at 11:36 +0200, Nam Cao wrote:
> On Mon, Jul 28, 2025 at 10:59:01AM +0200, Gabriele Monaco wrote:
> > Good catch, thanks! The container_of is the way to go.
> > Do you have valid reasons not to move the list_head to the top?
> > It's
> > not a big deal but it would save computing and summing the offset.
> > It
> > doesn't seem name (the current first element) really needs to stay
> > there.
> 
> I checked x86_64 and riscv64, the generated assembly of this function
> before & after moving the list_head on top is almost the same except
> for
> some instructions' intermediate values. Both architectures have
> instructions which load data at (pointer + offset), so this offset
> computing does not require any extra instruction.
> 
> Best regards,
> Nam

Alright then, thanks for checking!

Reviewed-by: Gabriele Monaco <gmonaco@...hat.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ