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: <87v8av5cmt.fsf@nvidia.com>
Date: Wed, 25 Oct 2023 10:25:53 +0200
From: Petr Machata <petrm@...dia.com>
To: David Ahern <dsahern@...il.com>
CC: Patrisious Haddad <phaddad@...dia.com>, <jgg@...pe.ca>, <leon@...nel.org>,
	<stephen@...workplumber.org>, <netdev@...r.kernel.org>,
	<linux-rdma@...r.kernel.org>, <linuxarm@...wei.com>,
	<linux-kernel@...r.kernel.org>, <huangjunxian6@...ilicon.com>,
	<michaelgur@...dia.com>
Subject: Re: [PATCH v2 iproute2-next 2/3] rdma: Add an option to set
 privileged QKEY parameter


David Ahern <dsahern@...il.com> writes:

> On 10/23/23 5:22 AM, Patrisious Haddad wrote:
>> diff --git a/rdma/sys.c b/rdma/sys.c
>> index fd785b25..db34cb41 100644
>> --- a/rdma/sys.c
>> +++ b/rdma/sys.c
>> @@ -40,6 +40,17 @@ static int sys_show_parse_cb(const struct nlmsghdr *nlh, void *data)
>>  				   mode_str);
>>  	}
>>  
>> +	if (tb[RDMA_NLDEV_SYS_ATTR_PRIVILEGED_QKEY_MODE]) {
>> +		uint8_t pqkey_mode;
>> +
>> +		pqkey_mode =
>> +			mnl_attr_get_u8(tb[RDMA_NLDEV_SYS_ATTR_PRIVILEGED_QKEY_MODE]);
>
> just make it mode so it fits on one line.
>
> 40 characters for an attribute name .... I will never understand this
> fascination with writing a sentence for an attribute name.

Yeah, I noticed this after the review, and figured oh whatever. But this
would be better:

		int at = RDMA_NLDEV_SYS_ATTR_PRIVILEGED_QKEY_MODE;
		uint8_t pqkey_mode;

		pqkey_mode = mnl_attr_get_u8(tb[at]);
		print_color_on_off(PRINT_ANY, COLOR_NONE, "privileged-qkey",
				   "privileged-qkey %s ", pqkey_mode);

>> +
>> +		print_color_on_off(PRINT_ANY, COLOR_NONE, "privileged-qkey",
>> +				   "privileged-qkey %s ", pqkey_mode);
>> +
>> +	}
>> +
>>  	if (tb[RDMA_NLDEV_SYS_ATTR_COPY_ON_FORK])
>>  		cof = mnl_attr_get_u8(tb[RDMA_NLDEV_SYS_ATTR_COPY_ON_FORK]);
>>  
>
> keep Petr's reviewed-by tag on the respin.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ