[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wh6sXSO63kka+EWEqq0tGwtOnXYFWMXPQ6T_wZa+Np3MQ@mail.gmail.com>
Date: Mon, 29 May 2023 07:00:05 -0400
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Johan Hovold <johan@...nel.org>
Cc: Luis Chamberlain <mcgrof@...nel.org>,
Lucas De Marchi <lucas.demarchi@...el.com>,
Petr Pavlu <petr.pavlu@...e.com>, gregkh@...uxfoundation.org,
rafael@...nel.org, song@...nel.org, lucas.de.marchi@...il.com,
christophe.leroy@...roup.eu, peterz@...radead.org, rppt@...nel.org,
dave@...olabs.net, willy@...radead.org, vbabka@...e.cz,
mhocko@...e.com, dave.hansen@...ux.intel.com,
colin.i.king@...il.com, jim.cromie@...il.com,
catalin.marinas@....com, jbaron@...mai.com,
rick.p.edgecombe@...el.com, yujie.liu@...el.com, david@...hat.com,
tglx@...utronix.de, hch@....de, patches@...ts.linux.dev,
linux-modules@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, pmladek@...e.com, prarit@...hat.com,
lennart@...ttering.net
Subject: Re: [PATCH 2/2] module: add support to avoid duplicates early on load
On Mon, May 29, 2023 at 4:58 AM Johan Hovold <johan@...nel.org> wrote:
>
> I have not tried to figure out exactly why things break, but it does
> seem like this one should be reverted.
Yes, I have done so.
However, can I ask you to just verify that it was purely the exclusive
open part, and it wasn't that I messed up something else. IOW, can you
replace the
return exclusive_deny_write_access(file);
in prepare_file_for_module_load() with just a "return 0", and remove the
allow_write_access(f.file);
line in finit_module()?
That's obviously _instead_ of the revert that I already pushed out,
just to verify that "yup, it's that part, not something silly
elsewhere"
I do wonder what it is that is different in your setup, and maybe you
could also enable the
pr_debug("finit_module: fd=%d, uargs=%p, flags=%i\n", fd, uargs, flags);
in finit_module() while you are at it? Since you'd be editing that
file anyway for the test, just change the pr_debug() to a printk() and
then do
dmesg | grep finit_module
to see what it all results in (on a working kernel, of course).
Linus
Powered by blists - more mailing lists