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: <20161027183541.GA24456@linux.intel.com>
Date:   Thu, 27 Oct 2016 11:35:42 -0700
From:   Fenghua Yu <fenghua.yu@...el.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     Fenghua Yu <fenghua.yu@...el.com>,
        "H. Peter Anvin" <h.peter.anvin@...el.com>,
        Ingo Molnar <mingo@...e.hu>, Tony Luck <tony.luck@...el.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Stephane Eranian <eranian@...gle.com>,
        Borislav Petkov <bp@...e.de>,
        Dave Hansen <dave.hansen@...el.com>,
        Nilay Vaish <nilayvaish@...il.com>, Shaohua Li <shli@...com>,
        David Carrillo-Cisneros <davidcc@...gle.com>,
        Ravi V Shankar <ravi.v.shankar@...el.com>,
        Sai Prakhya <sai.praneeth.prakhya@...el.com>,
        Vikas Shivappa <vikas.shivappa@...ux.intel.com>,
        linux-kernel <linux-kernel@...r.kernel.org>, x86 <x86@...nel.org>
Subject: Re: [PATCH v5 12/18] x86/intel_rdt: Add "info" files to resctrl file
 system

On Thu, Oct 27, 2016 at 08:25:57PM +0200, Thomas Gleixner wrote:
> 
> 
> On Thu, 27 Oct 2016, Fenghua Yu wrote:
> 
> > On Wed, Oct 26, 2016 at 04:45:50PM +0200, Thomas Gleixner wrote:
> > > On Sat, 22 Oct 2016, Fenghua Yu wrote:
> > > > +/*
> > > > + * Forcibly remove all of subdirectories under root.
> > > > + */
> > > > +static void rmdir_all_sub(void)
> > > > +{
> > > > +	kernfs_remove(kn_info);
> > > 
> > > What clears kn_info?
> > 
> > Is the question "Why clears kn_info?"
> > 
> > kn_info is created during mount time and has different contents
> > under "info" directory with CDP enabled or disabled by mount parameter "cdp".
> > 
> > umount needs to remove kn_info so that it's ready to be created next time
> > during mount time. So user can do CAT mount, check "info", umount, and then
> > CDP mount, check "info". The user will see different contents in two "info"
> > checks.
> 
> Lemme rephrase. What does: kn_info = NULL; ?
> 
> We should clear static variables for correctness sake. The current code has
> no problem with that, but 5 month down the road something is going to trip
> over the stale reference.
> 
> Thanks,
> 
> 	tglx

Ok. I see. I'll add kn_info = NULL after kernfs_remove().

Thanks.

-Fenghua

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ