lkml.org 
[lkml]   [2020]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 7/7] kprobes: Replace rp->free_instance with freelist
On Thu, Aug 27, 2020 at 06:12:44PM +0200, Peter Zijlstra wrote:
> struct kretprobe_instance {
> union {
> + /*
> + * Dodgy as heck, this relies on not clobbering freelist::refs.
> + * llist: only clobbers freelist::next.
> + * rcu: clobbers both, but only after rp::freelist is gone.
> + */
> + struct freelist_node freelist;
> struct llist_node llist;
> - struct hlist_node hlist;
> struct rcu_head rcu;
> };

Masami, make sure to make this something like:

union {
struct freelist_node freelist;
struct rcu_head rcu;
};
struct llist_node llist;

for v4, because after some sleep I'm fairly sure what I wrote above was
broken.

We'll only use RCU once the freelist is gone, so sharing that storage
should still be okay.

\
 
 \ /
  Last update: 2020-08-28 10:50    [W:0.206 / U:0.948 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site