linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>, James Morse <james.morse@arm.com>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2] arm64: implement support for static call trampolines
Date: Thu, 29 Oct 2020 12:46:05 +0100	[thread overview]
Message-ID: <20201029114605.GM2628@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CAMj1kXEniWw_yKJQLftnix+YwW4JUPiaBQ=a62Fr5-EdU6YGhQ@mail.gmail.com>

On Thu, Oct 29, 2020 at 11:58:52AM +0100, Ard Biesheuvel wrote:
> On Thu, 29 Oct 2020 at 11:40, Peter Zijlstra <peterz@infradead.org> wrote:

> > Would it make things easier if your trampoline consisted of two complete
> > slots, between which you can flip?
> >
> > Something like:
> >
> >         0x00    B 0x24 / NOP
> >         0x04    < slot 1 >
> >                 ....
> >         0x20
> >         0x24    < slot 2 >
> >                 ....
> >         0x40
> >
> > Then each (20 byte) slot can contain any of the variants above and you
> > can write the unused slot without stop-machine. Then, when the unused
> > slot is populated, flip the initial instruction (like a static-branch),
> > issue synchronize_rcu_tasks() and flip to using the other slot for next
> > time.
> >
> 
> Once we've populated a slot and activated it, we have to assume that
> it is live and we can no longer modify it freely.

Urhm how so? Once you pass through synchronize_rcu_tasks() nobody should
still be using the old one.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-10-29 11:47 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-28 18:41 [PATCH v2] arm64: implement support for static call trampolines Ard Biesheuvel
2020-10-29 10:28 ` Peter Zijlstra
2020-10-29 10:40 ` Peter Zijlstra
2020-10-29 10:58   ` Ard Biesheuvel
2020-10-29 11:46     ` Peter Zijlstra [this message]
2020-10-29 11:49       ` Ard Biesheuvel
2020-10-29 11:54         ` Peter Zijlstra
2020-10-29 12:14           ` Ard Biesheuvel
2020-10-29 11:27 ` Quentin Perret
2020-10-29 11:32   ` Ard Biesheuvel
2020-10-29 11:44     ` Peter Zijlstra
2020-10-29 14:10       ` Steven Rostedt
2020-10-29 11:54     ` Quentin Perret
2020-10-29 13:22       ` Ard Biesheuvel
2020-11-16 10:18       ` Quentin Perret
2020-11-16 10:31         ` Ard Biesheuvel
2020-11-16 12:05           ` Quentin Perret
2020-10-29 11:50 ` Mark Rutland
2020-10-29 11:58   ` Peter Zijlstra
2020-10-29 13:30     ` Mark Rutland
2020-10-29 11:59   ` Ard Biesheuvel
2020-10-29 13:21     ` Mark Rutland

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=20201029114605.GM2628@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=ardb@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=james.morse@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=will@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).