public inbox for live-patching@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Lawrence <joe.lawrence@redhat.com>
To: Song Liu <song@kernel.org>, Petr Mladek <pmladek@suse.com>
Cc: live-patching@vger.kernel.org, jpoimboe@kernel.org,
	jikos@kernel.org, Miroslav Benes <mbenes@suse.cz>,
	Josh Poimboeuf <jpoimboe@redhat.com>
Subject: Re: [PATCH v7] livepatch: Clear relocation targets on a module removal
Date: Thu, 5 Jan 2023 13:09:25 -0500	[thread overview]
Message-ID: <641c0330-163a-336b-081c-456e0be826b6@redhat.com> (raw)
In-Reply-To: <CAPhsuW5E9m5tb_ZCknH4QfFMukqwZHkKxvkHxo5A-znt5tm0ow@mail.gmail.com>

On 1/5/23 11:53, Song Liu wrote:
> Btw: I am confused with this one:
> 
>                 case R_PPC64_REL16_HA:
>                         /* Subtract location pointer */
>                         value -= (unsigned long)location;
>                         value = ((value + 0x8000) >> 16);
>                         *((uint16_t *) location)
>                                 = (*((uint16_t *) location) & ~0xffff)
>                                 | (value & 0xffff);
>                         break;
> 
> (*((uint16_t *) location) & ~0xffff) should always be zero, no?

It looks like a lot of extra read/bit twiddling to do:

  *(uint16_t *) location = value;

or am I missing a corner case that this handles?

-- 
Joe


  reply	other threads:[~2023-01-05 18:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-14 17:40 [PATCH v7] livepatch: Clear relocation targets on a module removal Song Liu
2023-01-03 17:00 ` Song Liu
2023-01-03 22:39   ` Joe Lawrence
2023-01-03 23:29     ` Song Liu
2023-01-04 10:26 ` Petr Mladek
2023-01-04 17:34   ` Song Liu
2023-01-04 23:12     ` Joe Lawrence
2023-01-05  5:59       ` Song Liu
2023-01-05 15:05         ` Joe Lawrence
2023-01-05 17:11           ` Song Liu
2023-01-06 13:02           ` Miroslav Benes
2023-01-06 16:26             ` Petr Mladek
2023-01-06 16:51               ` Song Liu
2023-01-05 11:19     ` Petr Mladek
2023-01-05 16:53       ` Song Liu
2023-01-05 18:09         ` Joe Lawrence [this message]
2023-01-05 13:03 ` Petr Mladek

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=641c0330-163a-336b-081c-456e0be826b6@redhat.com \
    --to=joe.lawrence@redhat.com \
    --cc=jikos@kernel.org \
    --cc=jpoimboe@kernel.org \
    --cc=jpoimboe@redhat.com \
    --cc=live-patching@vger.kernel.org \
    --cc=mbenes@suse.cz \
    --cc=pmladek@suse.com \
    --cc=song@kernel.org \
    /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