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: <20200419085657.GA26904@SDF.ORG>
Date:   Sun, 19 Apr 2020 08:56:57 +0000
From:   George Spelvin <lkml@....ORG>
To:     David Miller <davem@...emloft.net>
Cc:     tung.q.nguyen@...tech.com.au, jmaloy@...hat.com,
        ying.xue@...driver.com, netdev@...r.kernel.org, lkml@....org
Subject: Re: [PATCH] tipc: Remove redundant tsk->published flag

On Sat, Apr 18, 2020 at 03:32:11PM -0700, David Miller wrote:
> From: George Spelvin <lkml@....org>
> Date: Thu, 16 Apr 2020 03:27:35 GMT
> 
>> @@ -3847,7 +3839,7 @@ int tipc_sk_dump(struct sock *sk, u16 dqueues, char *buf)
>>  	size_t sz = (dqueues) ? SK_LMAX : SK_LMIN;
>>  	struct tipc_sock *tsk;
>>  	struct publication *p;
>> -	bool tsk_connected;
>> +	bool tsk_connected, tsk_published;
>>  
> 
> Please preserve the reverse christmas tree ordering of local variables
> here.

Happy to, but is that actually defined anywhere?  "Preserve" implies that 
it was present before the patch, and I can't infer a rule which is obeyed 
by the pre-patch declarations:
	int i = 0;
	size_t sz = (dqueues) ? SK_LMAX : SK_LMIN;
	struct tipc_sock *tsk;
	struct publication *p;
	bool tsk_connected;

One option is to sort by the full line length, including initialization:
	size_t sz = (dqueues) ? SK_LMAX : SK_LMIN;
	struct tipc_sock *tsk;
	struct publication *p;
	bool tsk_connected;
	int i = 0;

The other is to sort by the *declaration* length:
	struct tipc_sock *tsk;
	struct publication *p;
	bool tsk_connected;
	size_t sz = (dqueues) ? SK_LMAX : SK_LMIN;
	int i = 0;

Looking at the local variable declarations in the rest of the file isn't
producing any clarity.

Thank you.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ