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: <20250411180150.GY199604@unreal>
Date: Fri, 11 Apr 2025 21:01:50 +0300
From: Leon Romanovsky <leon@...nel.org>
To: Chen Linxuan <chenlinxuan@...ontech.com>
Cc: Chengchang Tang <tangchengchang@...wei.com>,
	Junxian Huang <huangjunxian6@...ilicon.com>,
	Jason Gunthorpe <jgg@...pe.ca>, Winston Wen <wentao@...ontech.com>,
	linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 5/7] RDMA/hns: initialize db in update_srq_db()

On Fri, Apr 11, 2025 at 06:54:53PM +0800, Chen Linxuan wrote:
> On x86_64 with gcc version 13.3.0, I compile
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c with:
> 
>   make defconfig
>   ./scripts/kconfig/merge_config.sh .config <(
>     echo CONFIG_COMPILE_TEST=y
>     echo CONFIG_HNS3=m
>     echo CONFIG_INFINIBAND=m
>     echo CONFIG_INFINIBAND_HNS_HIP08=m
>   )
>   make KCFLAGS="-fno-inline-small-functions -fno-inline-functions-called-once" \
>     drivers/infiniband/hw/hns/hns_roce_hw_v2.o
> 
> Then I get a compile error:
> 
>     CALL    scripts/checksyscalls.sh
>     DESCEND objtool
>     INSTALL libsubcmd_headers
>     CC [M]  drivers/infiniband/hw/hns/hns_roce_hw_v2.o
>   In file included from drivers/infiniband/hw/hns/hns_roce_hw_v2.c:47:
>   drivers/infiniband/hw/hns/hns_roce_hw_v2.c: In function 'update_srq_db':
>   drivers/infiniband/hw/hns/hns_roce_common.h:74:17: error: 'db' is used uninitialized [-Werror=uninitialized]
>      74 |                 *((__le32 *)_ptr + (field_h) / 32) &=                          \
>         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   drivers/infiniband/hw/hns/hns_roce_common.h:90:17: note: in expansion of macro '_hr_reg_clear'
>      90 |                 _hr_reg_clear(ptr, field_type, field_h, field_l);              \
>         |                 ^~~~~~~~~~~~~
>   drivers/infiniband/hw/hns/hns_roce_common.h:95:39: note: in expansion of macro '_hr_reg_write'
>      95 | #define hr_reg_write(ptr, field, val) _hr_reg_write(ptr, field, val)
>         |                                       ^~~~~~~~~~~~~
>   drivers/infiniband/hw/hns/hns_roce_hw_v2.c:948:9: note: in expansion of macro 'hr_reg_write'
>     948 |         hr_reg_write(&db, DB_TAG, srq->srqn);
>         |         ^~~~~~~~~~~~
>   drivers/infiniband/hw/hns/hns_roce_hw_v2.c:946:31: note: 'db' declared here
>     946 |         struct hns_roce_v2_db db;
>         |                               ^~
>   cc1: all warnings being treated as errors
> 
> Signed-off-by: Chen Linxuan <chenlinxuan@...ontech.com>
> Co-Developed-by: Winston Wen <wentao@...ontech.com>
> Signed-off-by: Winston Wen <wentao@...ontech.com>
> ---
>  drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to rdma-next.

Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ