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]
Message-ID: <078d74b2-151e-4b4a-55fc-9cd8f6fb910c@huawei.com>
Date:   Tue, 26 Jul 2022 10:53:25 +0800
From:   Hanjun Guo <guohanjun@...wei.com>
To:     Shameerali Kolothum Thodi <shameerali.kolothum.thodi@...wei.com>,
        renzhijie <renzhijie2@...wei.com>,
        "lpieralisi@...nel.org" <lpieralisi@...nel.org>,
        "sudeep.holla@....com" <sudeep.holla@....com>,
        "rafael@...nel.org" <rafael@...nel.org>,
        "lenb@...nel.org" <lenb@...nel.org>,
        "jroedel@...e.de" <jroedel@...e.de>,
        "robin.murphy@....com" <robin.murphy@....com>
CC:     "linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "lorenzo.pieralisi@...aro.org" <lorenzo.pieralisi@...aro.org>
Subject: Re: [PATCH -next] ACPI/IORT: Fix build error
 implicit-function-declaration

On 2022/7/25 21:50, Shameerali Kolothum Thodi wrote:
[...]
>>
>> If CONFIG_ACPI_IORT=y and CONFIG_IOMMU_API is not set,
>> make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-, will be failed, like
>> this:
>>
>> drivers/acpi/arm64/iort.c: In function ‘iort_get_rmr_sids’:
>> drivers/acpi/arm64/iort.c:1406:2: error: implicit declaration of function
>> ‘iort_iommu_rmr_get_resv_regions’; did you mean
>> ‘iort_iommu_get_resv_regions’? [-Werror=implicit-function-declaration]
>>    iort_iommu_rmr_get_resv_regions(iommu_fwnode, NULL, head);
>>    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>    iort_iommu_get_resv_regions
>> cc1: some warnings being treated as errors
>> make[3]: *** [drivers/acpi/arm64/iort.o] Error 1
> 
> Thanks for spotting this.
> 
>> The function iort_iommu_rmr_get_resv_regions() is declared at #ifdef
>> CONFIG_IOMMU_API area, and the callers of  iort_get_rmr_sids() and
>> iort_put_rmr_sids() would select IOMMU_API.
>> To fix this error, move the definitions to #ifdef CONFIG_IOMMU_API area.
> 
> That makes sense. And the only callers of these are SMMU drivers I think we
> don't need stub functions under !CONFIG_IOMMU_API(Lorenzo, could you
> please double check this).

I think so, because SMMU drivers will select IOMMU_API,
in drivers/iommu/Kconfig, it says:

# IOMMU_API always gets selected by whoever wants it. 

config IOMMU_API 

bool

> 
> Nit: Please wrap the commit description to a max of 75 chars per line.

Zhijie, would you mind send a updated version?

Thanks
Hanjun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ