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: Mon, 15 Apr 2024 16:20:47 -0700
From: Jacob Pan <jacob.jun.pan@...ux.intel.com>
To: "Tian, Kevin" <kevin.tian@...el.com>
Cc: LKML <linux-kernel@...r.kernel.org>, X86 Kernel <x86@...nel.org>, Peter
 Zijlstra <peterz@...radead.org>, "iommu@...ts.linux.dev"
 <iommu@...ts.linux.dev>, Thomas Gleixner <tglx@...utronix.de>, Lu Baolu
 <baolu.lu@...ux.intel.com>, "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
 "Hansen, Dave" <dave.hansen@...el.com>, Joerg Roedel <joro@...tes.org>, "H.
 Peter Anvin" <hpa@...or.com>, Borislav Petkov <bp@...en8.de>, Ingo Molnar
 <mingo@...hat.com>, "Luse, Paul E" <paul.e.luse@...el.com>, "Williams, Dan
 J" <dan.j.williams@...el.com>, Jens Axboe <axboe@...nel.dk>, "Raj, Ashok"
 <ashok.raj@...el.com>, "maz@...nel.org" <maz@...nel.org>,
 "seanjc@...gle.com" <seanjc@...gle.com>, Robin Murphy
 <robin.murphy@....com>, "jim.harris@...sung.com" <jim.harris@...sung.com>,
 "a.manzanares@...sung.com" <a.manzanares@...sung.com>, Bjorn Helgaas
 <helgaas@...nel.org>, "Zeng, Guang" <guang.zeng@...el.com>,
 "robert.hoo.linux@...il.com" <robert.hoo.linux@...il.com>,
 jacob.jun.pan@...ux.intel.com
Subject: Re: [PATCH v2 11/13] iommu/vt-d: Make posted MSI an opt-in cmdline
 option

Hi Kevin,

On Fri, 12 Apr 2024 09:31:32 +0000, "Tian, Kevin" <kevin.tian@...el.com>
wrote:

> > From: Jacob Pan <jacob.jun.pan@...ux.intel.com>
> > Sent: Saturday, April 6, 2024 6:31 AM
> > 
> > +#ifdef CONFIG_X86_POSTED_MSI
> > +		else if (!strncmp(str, "posted_msi", 10)) {
> > +			if (disable_irq_post || disable_irq_remap)
> > +				pr_warn("Posted MSI not enabled due to
> > conflicting options!");
> > +			else
> > +				enable_posted_msi = 1;
> > +		}
> > +#endif  
> 
> the check of disable_irq_remap is unnecessary. It's unlikely to have
> a configuration with disable_irq_post=0 while disable_irq_remap=1
> given the latter has bigger scope.
> 
> but thinking more do we really need a check here? there is no order
> guarantee that "posted_msi" is parsed after the parameters deciding
> the value of two disable variables.
> 
> it probably makes more sense to just set enable_posted_msi here
> and then do all required checks when picking up the irqchip in
> intel_irq_remapping_alloc().

Makes sense, I have a helper function posted_msi_supported() called in
intel_irq_remapping_alloc() already.

My intention was to alert negligent users, but is is not really necessary
as you said.

Thanks,

Jacob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ