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: <CABCJKucZKvFcTQEqbKNUfdYv-upxsH6cmw1=iHUORPFJc+vKHQ@mail.gmail.com>
Date: Thu, 2 Jan 2025 16:24:22 -0800
From: Sami Tolvanen <samitolvanen@...gle.com>
To: Elliot Berman <elliot.berman@....qualcomm.com>
Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>, linux-modules@...r.kernel.org, 
	linux-kernel@...r.kernel.org, Daniel Gomez <da.gomez@...sung.com>, 
	Luis Chamberlain <mcgrof@...nel.org>, "Paul E . McKenney" <paulmck@...nel.org>, 
	Peter Zijlstra <peterz@...radead.org>, Petr Pavlu <petr.pavlu@...e.com>, 
	Thomas Gleixner <tglx@...utronix.de>, Elliot Berman <quic_eberman@...cinc.com>, 
	Kees Cook <kees@...nel.org>, Nathan Chancellor <nathan@...nel.org>, 
	Steven Rostedt <rostedt@...dmis.org>, llvm@...ts.linux.dev
Subject: Re: [PATCH v2 28/28] cfi: Use RCU while invoking __module_address().

Hi Elliot,

On Mon, Dec 30, 2024 at 7:33 PM Elliot Berman
<elliot.berman@....qualcomm.com> wrote:
>
> On Fri, Dec 20, 2024 at 06:41:42PM +0100, Sebastian Andrzej Siewior wrote:
> > __module_address() can be invoked within a RCU section, there is no
> > requirement to have preemption disabled.
> >
> > I'm not sure if using rcu_read_lock() will introduce the regression that
> > has been fixed in commit 14c4c8e41511a ("cfi: Use
> > rcu_read_{un}lock_sched_notrace").
> >
>
> You can replace the rcu_read_lock_sched_notrace() with guard(rcu)().
> Regular rcu lock doesn't generate function traces, so the recursive loop
> isn't possible.
>
> I've tested:
>  - the current kernel (no recursive loop)
>  - Revert back to rcu_read_lock_sched() (fails)

Which kernel version did you test? I assume something pre-KCFI as
arm64 doesn't use this code since v6.1.

>  - Your series as-is (no recurisve loop)

Note that this patch only adds a comment to is_module_cfi_trap(), so I
wouldn't expect a functional change.

Sami

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ