linux-parisc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sven Schnelle <svens@stackframe.org>
To: Rolf Eike Beer <eike-kernel@sf-tec.de>
Cc: linux-parisc@vger.kernel.org
Subject: Re: [PATCH 1/6] parisc: add support for patching multiple words
Date: Wed, 29 May 2019 20:18:13 +0200	[thread overview]
Message-ID: <20190529181813.GD15295@t470p.stackframe.org> (raw)
In-Reply-To: <3453931.8BTnNjY2jm@daneel.sf-tec.de>

On Wed, May 29, 2019 at 07:58:57PM +0200, Rolf Eike Beer wrote:
> Sven Schnelle wrote:
> > On Tue, May 28, 2019 at 10:19:11AM +0200, Rolf Eike Beer wrote:
> > > Another nitpick: the "+4" and "-sizeof(u32)" are just the same at the end,
> > > but why do they use entirely different wording? What do we need "addr" for
> > > anyway, one could just look at "p" which would cross a page boundary at
> > > the
> > > same time, no?
> > 
> > You can't, because of the patch_map() call below which updates the fixed
> > mapping. That call needs the real virtual address, while *p holds the
> > virtual address of the fixed mapping for patching.
> 
> Can that remapping really place it at a non-zero offset regarding to the 
> underlying page? That it moves the page descriptor around is normal, but it 
> will keep the low order bits intact, so the page boundary crossing will be 
> still the same, no?

For the page crossing check it doesn't make a difference whether you check p or
addr, but for the patch_map() you can only use addr. So we have to update both
variables.

Regards
Sven



  reply	other threads:[~2019-05-29 18:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-27 19:04 [PATCH 0/6] Dynamic FTRACE for PA-RISC Sven Schnelle
2019-05-27 19:04 ` [PATCH 1/6] parisc: add support for patching multiple words Sven Schnelle
2019-05-28  8:19   ` Rolf Eike Beer
2019-05-29 17:49     ` Sven Schnelle
2019-05-29 17:58       ` Rolf Eike Beer
2019-05-29 18:18         ` Sven Schnelle [this message]
2019-05-27 19:04 ` [PATCH 2/6] parisc: add spinlock to patch function Sven Schnelle
2019-05-27 19:04 ` [PATCH 3/6] parisc: add WARN_ON() to clear_fixmap Sven Schnelle
2019-05-27 19:04 ` [PATCH 4/6] parisc: use pr_debug() in kernel/module.c Sven Schnelle
2019-05-28  8:24   ` Rolf Eike Beer
2019-05-29 17:54     ` Sven Schnelle
2019-05-27 19:04 ` [PATCH 5/6] compiler.h: add CC_USING_PATCHABLE_FUNCTION_ENTRY Sven Schnelle
2019-05-27 19:04 ` [PATCH 6/6] parisc: add dynamic ftrace Sven Schnelle
2019-05-28  8:26   ` Rolf Eike Beer

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=20190529181813.GD15295@t470p.stackframe.org \
    --to=svens@stackframe.org \
    --cc=eike-kernel@sf-tec.de \
    --cc=linux-parisc@vger.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;
as well as URLs for NNTP newsgroup(s).