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, 17 Jun 2021 08:41:24 +0100
From:   John Garry <john.garry@...wei.com>
To:     Lu Baolu <baolu.lu@...ux.intel.com>, <joro@...tes.org>,
        <will@...nel.org>, <dwmw2@...radead.org>, <robin.murphy@....com>,
        <corbet@....net>
CC:     <linux-kernel@...r.kernel.org>, <iommu@...ts.linux-foundation.org>,
        <linuxarm@...wei.com>, <thunder.leizhen@...wei.com>,
        <chenxiang66@...ilicon.com>, <linux-doc@...r.kernel.org>
Subject: Re: [PATCH v13 6/6] iommu: Remove mode argument from
 iommu_set_dma_strict()


>> @@ -349,10 +349,9 @@ static int __init iommu_dma_setup(char *str)
>>   }
>>   early_param("iommu.strict", iommu_dma_setup);
>> -void iommu_set_dma_strict(bool strict)
>> +void iommu_set_dma_strict(void)
>>   {
>> -    if (strict || !(iommu_cmd_line & IOMMU_CMD_LINE_STRICT))
>> -        iommu_dma_strict = strict;
>> +    iommu_dma_strict = true;
> 
> Sorry, I still can't get how iommu.strict kernel option works.
> 
> static int __init iommu_dma_setup(char *str)
> {
>          int ret = kstrtobool(str, &iommu_dma_strict);
> 
>          if (!ret)
>                  iommu_cmd_line |= IOMMU_CMD_LINE_STRICT;
>          return ret;
> }
> early_param("iommu.strict", iommu_dma_setup);
> 
> The bit IOMMU_CMD_LINE_STRICT is only set, but not used anywhere.

It is used in patch 2/6:

+	pr_info("DMA domain TLB invalidation policy: %s mode %s\n",
+		iommu_dma_strict ? "strict" : "lazy",
+		(iommu_cmd_line & IOMMU_CMD_LINE_STRICT) ?
+			"(set via kernel command line)" : "");

> Hence,
> I am wondering how could it work? A bug or I missed anything?

It is really just used for informative purpose now.

Thanks,
john

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ