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: <20220831101907.5rqz6ylj2dyojqnj@ava.usersys.com>
Date:   Wed, 31 Aug 2022 11:19:07 +0100
From:   Aaron Tomlin <atomlin@...hat.com>
To:     Petr Pavlu <petr.pavlu@...e.com>
Cc:     mcgrof@...nel.org, christophe.leroy@...roup.eu,
        linux-kernel@...r.kernel.org, linux-modules@...r.kernel.org,
        atomlin@...mlin.com
Subject: Re: [PATCH modules-next] module: Add debugfs interface to view
 unloaded tainted modules

On Mon 2022-08-29 09:14 +0200, Petr Pavlu wrote:
> On 8/23/22 21:32, Aaron Tomlin wrote:
> > [...]
> > @@ -59,3 +60,68 @@ void print_unloaded_tainted_modules(void)
> >  		}
> >  	}
> >  }
> > +
> > +#ifdef CONFIG_DEBUG_FS
> > +static void *unloaded_tainted_modules_seq_start(struct seq_file *m, loff_t *pos)
> > +{
> > +	mutex_lock(&module_mutex);
> > +	return seq_list_start_rcu(&unloaded_tainted_modules, *pos);
> > +}

Hi Petr,

> unloaded_tainted_modules looks to be a proper RCU list which makes me think
> this reader could use just rcu_read_lock() instead of
> mutex_lock(&module_mutex)?

If I understand correctly, yes: the use of rcu_read_lock() and
rcu_read_unlock(), respectively, will be sufficient.

I will send a follow up patch.


Kind regards,

-- 
Aaron Tomlin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ