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]
Date:   Thu, 18 Feb 2021 10:39:39 +0000
From:   Marc Zyngier <maz@...nel.org>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     Michael Walle <michael@...le.cc>, linux-kernel@...r.kernel.org,
        tglx@...utronix.de
Subject: Re: [PATCH] irqdomain: remove debugfs_file from struct irq_domain

On 2021-02-18 09:38, Greg KH wrote:
> On Thu, Feb 18, 2021 at 09:04:42AM +0000, Marc Zyngier wrote:
>> On Thu, 18 Feb 2021 08:54:00 +0000,
>> Greg KH <gregkh@...uxfoundation.org> wrote:
>> 
>> [...]
>> 
>> > > > Wow, wait, you are removing a debugfs file _before_ debugfs is even
>> > > > initialized?  Didn't expect that, ok, let me go try this again...
>> > >
>> > > Yeah, that's a poor man's rename (file being deleted and re-created).
>> >
>> > True, but that's not happening here, right?  Some driver is being
>> > initialized and creates a debugfs file, and then decides to unload so it
>> > removes the debugfs file?
>> 
>> No, that's not what is happening.
>> 
>> The irqchip driver starts, creates an irqdomain. File gets created, at
>> least in theory (it fails because debugfs isn't ready, but that's not
>> the issue).
>> 
>> It then changes an attribute to the domain (the so-called bus_token),
>> which gets reflected in the domain name to avoid aliasing.
>> Delete/create follows.
>> 
>> > Why was it trying to create the file in the first place if it didn't
>> > properly bind to the hardware?
>> 
>> See above. We encode properties of the domain in the filename, and
>> reflect the change of these properties as they happen.
> 
> Ah, ok, you really are doing delete/re-create.  Crazy.  And amazing it
> was working previously without the checks I just added...
> 
> Funny that you all never were even noticing that the debugfs files are
> not present in the system because they are tryign to be created before
> debugfs is present?  Is that an issue or has no one complained?

See how irq_debugfs_init() is called in the middle of the boot sequence,
and retroactively populates all the debugfs files what we missed during
the early boot.

So we're not missing anything in the end, it's just delayed.

> Anyway, I'll go turn this into a real patch and get it into 5.12-rc1 so
> that the irqdomain patch I sent you will not blow anything up.  Feel
> free to also queue it up in your tree if you want to as well.

Thanks for that.

         M.
-- 
Jazz is not dead. It just smells funny...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ