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: <ZtD7IBiG1BGQres3@Asurada-Nvidia>
Date: Thu, 29 Aug 2024 15:50:08 -0700
From: Nicolin Chen <nicolinc@...dia.com>
To: Will Deacon <will@...nel.org>
CC: <joro@...tes.org>, <jgg@...dia.com>, <thierry.reding@...il.com>,
	<vdumpa@...dia.com>, <jonathanh@...dia.com>, <linux-kernel@...r.kernel.org>,
	<iommu@...ts.linux.dev>, <linux-arm-kernel@...ts.infradead.org>,
	<linux-tegra@...r.kernel.org>, Robin Murphy <robin.murphy@....com>
Subject: Re: [PATCH v13 06/10] iommu/arm-smmu-v3: Add
 acpi_smmu_acpi_probe_model for impl

Hi Will,

On Tue, Aug 27, 2024 at 09:18:47AM -0700, Nicolin Chen wrote:
> On Tue, Aug 27, 2024 at 04:57:48PM +0100, Robin Murphy wrote:
> > > > -static void acpi_smmu_get_options(u32 model, struct arm_smmu_device *smmu)
> > > > +static int acpi_smmu_iort_probe_model(struct acpi_iort_node *node,
> > > > +                                  struct arm_smmu_device *smmu)
> > > >   {
> > > > -    switch (model) {
> > > > +    struct acpi_iort_smmu_v3 *iort_smmu =
> > > > +            (struct acpi_iort_smmu_v3 *)node->node_data;
> > > > +
> > > > +    switch (iort_smmu->model) {
> > > >      case ACPI_IORT_SMMU_V3_CAVIUM_CN99XX:
> > > >              smmu->options |= ARM_SMMU_OPT_PAGE0_REGS_ONLY;
> > > >              break;
> > > >      case ACPI_IORT_SMMU_V3_HISILICON_HI161X:
> > > >              smmu->options |= ARM_SMMU_OPT_SKIP_PREFETCH;
> > > >              break;
> > > > +    case ACPI_IORT_SMMU_V3_GENERIC:
> > > > +            break;
> > > > +    default:
> > > > +            dev_err(smmu->dev, "Unknown/unsupported IORT model!\n");
> > > > +            return -ENXIO;
> > > 
> > > We probably don't want this 'default' case, otherwise the driver will
> > > need to be updated every time there's a new model.
> > 
> > ...although the intent is very strongly that there should never be any
> > new models, because by now hardware should really not be failing to
> > implement SMMU_IIDR correctly. In some ways, having this might help
> > further discourage people from abusing the mechanism and making random
> > stuff up in their firmware :/
> 
> I don't have a strong feeling about this, though Robin's point was
> my intention here.
> 
> Apart from this "default case", I typo-ed the function name in the
> patch subject and commit message. Also, there's a missed kdoc line
> in struct tegra241_cmdqv (PATCH-8).
> 
> So, I prepared a v14:
> https://github.com/nicolinc/iommufd/commits/vcmdq_in_kernel-v14
> v14 changelog (attaching git-diff at the EOM):
>  * Rebased on Will's for-joerg/arm-smmu/updates
>  * Added a missed kdoc for "dev" in struct tegra241_cmdqv
>  * Dropped the default case in acpi_smmu_iort_probe_model()
>    (did this before seeing Robin's mail here.)
> 
> Let's see what makes the best for you, Will.

I just sent v14 by keeping the default case, given Robin's remarks
here. If you'd like to remove the default case, please feel free!

Thank you
Nicolin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ