From: "Hou Wenlong" <houwenlong.hwl@antgroup.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: <linux-kernel@vger.kernel.org>,
"Thomas Garnier" <thgarnie@chromium.org>,
"Lai Jiangshan" <jiangshan.ljs@antgroup.com>,
"Kees Cook" <keescook@chromium.org>,
"Nathan Chancellor" <nathan@kernel.org>,
"Nick Desaulniers" <ndesaulniers@google.com>,
"Tom Rix" <trix@redhat.com>, <bpf@vger.kernel.org>,
<llvm@lists.linux.dev>
Subject: Re: [PATCH RFC 00/43] x86/pie: Make kernel image's virtual address flexible
Date: Sat, 06 May 2023 15:19:06 +0800 [thread overview]
Message-ID: <20230506071906.GA99736@k08j02272.eu95sqa> (raw)
In-Reply-To: <20230428152206.GA1464060@hirez.programming.kicks-ass.net>
On Fri, Apr 28, 2023 at 11:22:06PM +0800, Peter Zijlstra wrote:
>
> For some raison I didn't get 0/n but did get all of the others. Please
> keep your Cc list consistent.
>
Sorry, I'll pay attention next time.
> On Fri, Apr 28, 2023 at 05:50:40PM +0800, Hou Wenlong wrote:
>
> > - It is not allowed to reference global variables in an alternative
> > section since RIP-relative addressing is not fixed in
> > apply_alternatives(). Fortunately, all disallowed relocations in the
> > alternative section can be captured by objtool. I believe that this
> > issue can also be fixed by using objtool.
>
> https://lkml.kernel.org/r/Y9py2a5Xw0xbB8ou@hirez.programming.kicks-ass.net
Thank you for your patch. However, it's more complicated for call depth
tracking case. Although, the per-cpu variable in the alternative section
is relocated, but the content of the "skl_call_thunk_template" is copied
into another place, so the offset is still incorrect. I'm not sure if
this case is common or not. Since the destination is clear, I could do
relocation here as well, but it would make the code more complicated.
Thanks!
prev parent reply other threads:[~2023-05-06 7:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-28 9:50 [PATCH RFC 00/43] x86/pie: Make kernel image's virtual address flexible Hou Wenlong
2023-04-28 9:51 ` [PATCH RFC 30/43] x86/bpf: Adapt BPF_CALL JIT codegen for PIE support Hou Wenlong
2023-04-28 15:22 ` [PATCH RFC 00/43] x86/pie: Make kernel image's virtual address flexible Peter Zijlstra
2023-05-06 7:19 ` Hou Wenlong [this message]
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=20230506071906.GA99736@k08j02272.eu95sqa \
--to=houwenlong.hwl@antgroup.com \
--cc=bpf@vger.kernel.org \
--cc=jiangshan.ljs@antgroup.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=peterz@infradead.org \
--cc=thgarnie@chromium.org \
--cc=trix@redhat.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