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: <87eef5qq5l.wl-maz@kernel.org>
Date:   Tue, 20 Apr 2021 10:08:38 +0100
From:   Marc Zyngier <maz@...nel.org>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     linux-kernel@...r.kernel.org, kernel-team@...roid.com
Subject: Re: [PATCH] genirq/irqaction: Move dev_id and percpu_dev_id in a union

On Mon, 19 Apr 2021 00:44:14 +0100,
Thomas Gleixner <tglx@...utronix.de> wrote:
> 
> On Sat, Apr 10 2021 at 13:00, Marc Zyngier wrote:
> > dev_id and percpu_dev_id are mutually exclusive in struct irqaction,
> > as they conceptually represent the same thing, only in a per-cpu
> > fashion.
> >
> > Move them into an anonymous union, saving a few bytes on the way.
> 
> The reason why they are not in an anomymous union is that any misuse of
> interfaces will result in an instantaneous explosion while with your
> variant it will cause hard to diagnose side effects.
> 
> I rather waste the extra 4/8 bytes unless there is a compelling reason
> not to do so.

Fair enough. I just happened to spot it while doing some vaguely
related rework (turning the irqaction.irq field into an irqdesc).

Happy to leave it as is.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ