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: <CALZtONDG-aStW9MU_Tt4zEc3Z66GNxNkjpTAnvUhwZw3jG4EUA@mail.gmail.com>
Date:	Thu, 28 May 2015 17:19:40 -0400
From:	Dan Streetman <ddstreet@...e.org>
To:	Paul McKenney <paulmck@...ux.vnet.ibm.com>
Cc:	Josh Triplett <josh@...htriplett.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	Lai Jiangshan <laijs@...fujitsu.com>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] rcu: introduce list_last_or_null_rcu

On Thu, May 28, 2015 at 5:17 PM, Paul E. McKenney
<paulmck@...ux.vnet.ibm.com> wrote:
> On Thu, May 28, 2015 at 05:14:25PM -0400, Dan Streetman wrote:
>> On Thu, May 28, 2015 at 5:05 PM, Paul E. McKenney
>> <paulmck@...ux.vnet.ibm.com> wrote:
>> > On Thu, May 28, 2015 at 04:42:20PM -0400, Dan Streetman wrote:
>> >> On Thu, May 28, 2015 at 4:39 PM,  <josh@...htriplett.org> wrote:
>> >> > On Thu, May 28, 2015 at 04:35:27PM -0400, Dan Streetman wrote:
>> >> >> Add list_last_or_null_rcu(), to simplify getting the last entry from a
>> >> >> rcu-protected list.  The standard list_last_entry() can't be used as it
>> >> >> is not rcu-protected; the list may be modified concurrently.  And the
>> >> >> ->prev pointer can't be used, as only the ->next pointers are protected
>> >> >> by rcu.
>> >> >>
>> >> >> This simply iterates forward through the entire list, to get to the last
>> >> >> entry.  If the list is empty, it returns NULL.
>> >> >>
>> >> >> Signed-off-by: Dan Streetman <ddstreet@...e.org>
>> >> >
>> >> > The list iteration functions are macros because they introduce a loop
>> >> > with attached loop block.  For this, is there any reason not to make it
>> >> > an inline function instead of a macro?
>> >>
>> >> true, there's no reason i can see not to make it inline, let me send
>> >> an updated patch.
>> >
>> > Hmmm...  If we can now do type-generic inline functions, it might make
>> > sense to convert some of the others as well.
>>
>> oh, ok.  how do we do type-generic inline funcs?  return void*?
>
> I was hoping that you would tell me.  I use macros in that case.

ha, if I ever get to the point where i think i know more than you,
i'll let you know ;-)

>
>                                                         Thanx, Paul
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ