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: <b33101ca-c5f8-be9e-7759-4d044c2fd340@huawei.com>
Date:   Tue, 29 Aug 2023 14:46:48 +0800
From:   Jijie Shao <shaojijie@...wei.com>
To:     Michal Kubecek <mkubecek@...e.cz>
CC:     <shaojijie@...wei.com>, <mkubeck@...e.cz>,
        <yisen.zhuang@...wei.com>, <salil.mehta@...wei.com>,
        <davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
        <pabeni@...hat.com>, <shenjian15@...wei.com>,
        <wangjie125@...wei.com>, <liuyonglong@...wei.com>,
        <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH ethtool] hns3: add support dump registers for hns3 driver


on 2023/8/28 7:20, Michal Kubecek wrote:
>> +#pragma pack(4)
>> +struct hns3_reg_tlv {
>> +	u16 tag;
>> +	u16 len;
>> +};
>> +
>> +struct hns3_reg_header {
>> +	u64 magic_number;
>> +	u8 is_vf;
>> +	u8 rsv[7];
>> +};
>> +
>> +#pragma pack()
> Could we please avoid these #pragma directives? AFAIK this is a Microsoft
> extension, which, while implemented in gcc for compatibility reasons, is
> not very common in linux world. To be honest, I had to search the web to
> see what exactly does it do - and even after that, only checking the object
> file with gdb revealed that it does not really do anything except weakening
> the alignment of struct hns3_reg_header (as a whole). Given how the
> structure is used in this file, the only practical effect would be
> header_len in hns3_dump_regs() being 12 rather than 16 (on 64-bit
> architectures).
>
> Michal

okay, I will remove it in v2


Thanks,

Jijie Shao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ