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]
Date:   Wed, 19 Dec 2018 08:38:03 +0100
From:   Daniel Bristot de Oliveira <bristot@...hat.com>
To:     Borislav Petkov <bp@...en8.de>
Cc:     linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Pavel Tatashin <pasha.tatashin@...cle.com>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        "Steven Rostedt (VMware)" <rostedt@...dmis.org>,
        Zhou Chengming <zhouchengming1@...wei.com>,
        Jiri Kosina <jkosina@...e.cz>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        "Peter Zijlstra (Intel)" <peterz@...radead.org>,
        Chris von Recklinghausen <crecklin@...hat.com>,
        Jason Baron <jbaron@...mai.com>, Scott Wood <swood@...hat.com>,
        Marcelo Tosatti <mtosatti@...hat.com>,
        Clark Williams <williams@...hat.com>, x86@...nel.org
Subject: Re: [PATCH V2 1/9] jump_label: Add for_each_label_entry helper

On 12/18/18 10:19 PM, Borislav Petkov wrote:
> On Tue, Dec 18, 2018 at 05:46:30PM +0100, Daniel Bristot de Oliveira wrote:
>> This patch adds the helper:
>> 	for_each_label_entry(key, entry, stop)
>>
>> For the "for each jump label entry" for defined as:
>> 	for (; (entry < stop) && (jump_entry_key(entry) == key); entry++)
>>
>> Simplifying the reading and usage.
> 
> Please avoid writing "This patch" in a commit message and also what it
> does - that should be obvious. Instead say something like:
> 
> "Add a helper macro to make jump entry iteration code more readable."
> 
> or so.

Right! I will change it!

> But then, IINM, this macro is being used only once. Isn't that a bit too
> much? I mean, you could just as well do:
> 
> 	# iterate over each jump entry
> 	for (; (entry < stop) && (jump_entry_key(entry) == key); entry++) {
> 
> and have it even more readable without introducing macro which is not
> going to be used elsewhere. Or is it going to...?

It is also used in the patch 9. But I can remove it, no problem.

Thoughts?

Thanks!

-- Daniel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ