From: Joe Lawrence <joe.lawrence@redhat.com>
To: Miroslav Benes <mbenes@suse.cz>
Cc: live-patching@vger.kernel.org, linux-kernel@vger.kernel.org,
Josh Poimboeuf <jpoimboe@redhat.com>,
Jessica Yu <jeyu@redhat.com>, Jiri Kosina <jikos@kernel.org>,
Petr Mladek <pmladek@suse.com>
Subject: Re: [PATCH v4] livepatch: introduce shadow variable API
Date: Wed, 16 Aug 2017 09:40:44 -0400 [thread overview]
Message-ID: <2fc0160b-d16a-97d3-3ea1-4a787b8afd48@redhat.com> (raw)
In-Reply-To: <alpine.LSU.2.20.1708161423040.4165@pobox.suse.cz>
On 08/16/2017 08:43 AM, Miroslav Benes wrote:
>
>> [ ... snip ... ]
>
> There is a comment above about locking and we do not take the spinlock
> here. That could surprise someone. So I'd keep only klp_shadow_add()
> comment, because there it is strictly needed. It depends on the context in
> all other cases.
Good catch, I think this changed in this last version when I moved some
of the work outside the lock.
> Could you also add a comment above klp_shadow_lock definition about what
> it aims to protect?
>
How about "klp_shadow_lock provides exclusive access to the
klp_shadow_hash and the shadow variables it references." or were
thinking of something more detailed?
>> + /* Look for <obj, id> again under the lock */
>> + spin_lock_irqsave(&klp_shadow_lock, flags);
>> + shadow_data = klp_shadow_get(obj, id);
>> + if (unlikely(shadow_data)) {
>
> shadow_data is not needed anywhere, so you could do the same as for the
> first speculative search and remove shadow_data variable all together.
Ok.
>> [ ... snip ... ]
>
> Otherwise it looks good. You can add my
>
> Acked-by: Miroslav Benes <mbenes@suse.cz>
>
> with those nits fixed.
Thank you for all the suggestions and reviews!
-- Joe
next prev parent reply other threads:[~2017-08-16 13:40 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-14 20:02 [PATCH v4] livepatch: shadow variables Joe Lawrence
2017-08-14 20:02 ` [PATCH v4] livepatch: introduce shadow variable API Joe Lawrence
2017-08-15 13:59 ` Josh Poimboeuf
2017-08-16 12:43 ` Miroslav Benes
2017-08-16 13:40 ` Joe Lawrence [this message]
2017-08-31 12:45 ` Miroslav Benes
2017-08-17 14:05 ` Petr Mladek
2017-08-17 16:01 ` Joe Lawrence
2017-08-17 16:28 ` Josh Poimboeuf
2017-08-18 9:42 ` Petr Mladek
2017-08-18 19:04 ` Josh Poimboeuf
2017-08-18 13:46 ` Joe Lawrence
2017-08-18 16:18 ` Petr Mladek
2017-08-18 20:25 ` Joe Lawrence
2017-08-21 11:24 ` Petr Mladek
2017-08-18 13:44 ` Nicolai Stange
2017-08-18 14:04 ` Petr Mladek
2017-08-18 14:19 ` Joe Lawrence
2017-08-18 14:46 ` Nicolai Stange
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2fc0160b-d16a-97d3-3ea1-4a787b8afd48@redhat.com \
--to=joe.lawrence@redhat.com \
--cc=jeyu@redhat.com \
--cc=jikos@kernel.org \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=pmladek@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome