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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b6484679-0950-8c8e-98c5-da0e4c1d97e2@linux.intel.com>
Date:   Fri, 18 Jun 2021 09:51:48 +0800
From:   Lu Baolu <baolu.lu@...ux.intel.com>
To:     Robin Murphy <robin.murphy@....com>,
        John Garry <john.garry@...wei.com>, joro@...tes.org,
        will@...nel.org, dwmw2@...radead.org, corbet@....net
Cc:     baolu.lu@...ux.intel.com, 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()

Hi Robin,

On 6/18/21 2:56 AM, Robin Murphy wrote:
>>> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
>>> index 60b1ec42e73b..ff221d3ddcbc 100644
>>> --- a/drivers/iommu/iommu.c
>>> +++ b/drivers/iommu/iommu.c
>>> @@ -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);
> 
> Note that this is the bit that does the real work - if the argument 
> parses OK then iommu_dma_strict is reassigned with the appropriate 
> value. The iommu_cmd_line stuff is a bit of additional bookkeeping, 
> basically just so we can see whether default values have been overridden.

Ah, get it. Thanks a lot. I missed this part and naively thought it just
converts a string to integer.

Best regards,
baolu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ