From: Peter Zijlstra <peterz@infradead.org> To: Josh Poimboeuf <jpoimboe@redhat.com> Cc: x86@kernel.org, linux-kernel@vger.kernel.org, rostedt@goodmis.org, mhiramat@kernel.org, bristot@redhat.com, jbaron@akamai.com, torvalds@linux-foundation.org, tglx@linutronix.de, mingo@kernel.org, namit@vmware.com, hpa@zytor.com, luto@kernel.org, ard.biesheuvel@linaro.org, jeyu@kernel.org, live-patching@vger.kernel.org Subject: Re: [PATCH v4 15/16] module: Move where we mark modules RO,X Date: Thu, 24 Oct 2019 15:16:34 +0200 Message-ID: <20191024131634.GC4131@hirez.programming.kicks-ass.net> (raw) In-Reply-To: <20191023170025.f34g3vxaqr4f5gqh@treble> On Wed, Oct 23, 2019 at 12:00:25PM -0500, Josh Poimboeuf wrote: > > This then raises a number of questions: > > > > 1) why is that RELA (that obviously does not depend on any module) > > applied so late? > > Good question. The 'pv_ops' symbol is exported by the core kernel, so I > can't see any reason why we'd need to apply that rela late. In theory, > kpatch-build isn't supposed to convert that to a klp rela. Maybe > something went wrong in the patch creation code. > > I'm also questioning why we even need to apply the parainstructions > section late. Maybe we can remove that apply_paravirt() call > altogether, along with .klp.arch.parainstruction sections. > > I'll need to look into it... Right, that really should be able to run early. Esp. after commit 11e86dc7f274 ("x86/paravirt: Detect over-sized patching bugs in paravirt_patch_call()") paravirt patching is unconditional. We _never_ run with the indirect call except very early boot, but modules should have them patched way before their init section runs. We rely on this for spectre-v2 and friends. > > 3) Is there ever a possible module-dependent RELA to a paravirt / > > alternative site? > > Good question... > > Then for 3) we only have alternatives left, and I _think_ it unlikely to > > be the case, but I'll have to have a hard look at that. > > I'm not sure about alternatives, but maybe we can enforce such > limitations with tooling and/or kernel checks. Right, so on IRC you implied you might have some additional details on how alternatives were affected; did you manage to dig that up?
next prev parent reply index Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <20191018073525.768931536@infradead.org> [not found] ` <20191018074634.801435443@infradead.org> [not found] ` <20191021135312.jbbxsuipxldocdjk@treble> [not found] ` <20191021141402.GI1817@hirez.programming.kicks-ass.net> [not found] ` <20191023114835.GT1817@hirez.programming.kicks-ass.net> 2019-10-23 17:00 ` Josh Poimboeuf 2019-10-24 13:16 ` Peter Zijlstra [this message] 2019-10-25 6:44 ` Petr Mladek 2019-10-25 8:43 ` Peter Zijlstra 2019-10-25 10:06 ` Peter Zijlstra 2019-10-25 13:50 ` Josh Poimboeuf 2019-10-26 1:17 ` Josh Poimboeuf 2019-10-28 10:07 ` Peter Zijlstra 2019-10-28 10:43 ` Peter Zijlstra 2019-10-25 9:16 ` Peter Zijlstra
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=20191024131634.GC4131@hirez.programming.kicks-ass.net \ --to=peterz@infradead.org \ --cc=ard.biesheuvel@linaro.org \ --cc=bristot@redhat.com \ --cc=hpa@zytor.com \ --cc=jbaron@akamai.com \ --cc=jeyu@kernel.org \ --cc=jpoimboe@redhat.com \ --cc=linux-kernel@vger.kernel.org \ --cc=live-patching@vger.kernel.org \ --cc=luto@kernel.org \ --cc=mhiramat@kernel.org \ --cc=mingo@kernel.org \ --cc=namit@vmware.com \ --cc=rostedt@goodmis.org \ --cc=tglx@linutronix.de \ --cc=torvalds@linux-foundation.org \ --cc=x86@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
Live-Patching Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/live-patching/0 live-patching/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 live-patching live-patching/ https://lore.kernel.org/live-patching \ live-patching@vger.kernel.org public-inbox-index live-patching Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.live-patching AGPL code for this site: git clone https://public-inbox.org/public-inbox.git