[PATCH 3/4] net/hns3: support Rx/Tx bd dump

Stephen Hemminger stephen at networkplumber.org
Fri May 27 17:36:03 CEST 2022


On Fri, 27 May 2022 10:33:50 +0800
"Min Hu (Connor)" <humin29 at huawei.com> wrote:

> +	for (i = 0; i < HNS3_BD_DW_NUM; i++) {
> +		/*
> +		 * For the sake of security, first 8 bytes of BD which stands
> +		 * for physical address of packet should not be shown.
> +		 */
> +		if (i < HNS3_BD_ADDRESS_LAST_DW) {
> +			fprintf(file, "TX BD WORD[%d]:0x%08x\n", i, 0);
> +			continue;
> +		}
> +
> +		fprintf(file, "Tx BD WORD[%d]:0x%08x\n", i, *(bd_data + i));

Use hex dump that exists?
Also this is not the kernel so leaking physical address values is not a real
security concern.


More information about the dev mailing list