public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium•org>
To: Mark Rutland <mark.rutland@arm•com>
Cc: linux-kernel@vger•kernel.org,
	Steven Rostedt <rostedt@goodmis•org>,
	Sachin Sant <sachinp@linux•ibm.com>,
	Yinan Liu <yinan@linux•alibaba.com>,
	linuxppc-dev@lists•ozlabs.org, ardb@kernel•org
Subject: Re: [powerpc] ftrace warning kernel/trace/ftrace.c:2068 with code-patching selftests
Date: Thu, 27 Jan 2022 08:41:38 -0800	[thread overview]
Message-ID: <202201270834.4420E21F6@keescook> (raw)
In-Reply-To: <YfKGKWW5UfZ15kCW@FVFF77S0Q05N>

On Thu, Jan 27, 2022 at 11:46:49AM +0000, Mark Rutland wrote:
> I'm not sure how x86 works here; AFAICT the relocations are performed during
> decompression, but it looks like there's some special build-time processing
> associated with that, and the vmlinux doesn't contain standard ELF relocations.
> 
> Kees, IIUC you added the x86_64 support there, can you shed any light on if/how
> this works on x86?

I think Sven beat me to it, and this was answered in
https://lore.kernel.org/lkml/yt9dy231gzae.fsf@linux.ibm.com
but let me know if anything needs further info.

An additional note is that x86 is built with "-2G addressing"
(-mcmodel=kernel). There was some work done to make it actually
PIE, which would allow the KASLR base to move further:
https://github.com/KSPP/linux/issues/38

-Kees

-- 
Kees Cook

  parent reply	other threads:[~2022-01-27 16:42 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-24  9:19 [powerpc] ftrace warning kernel/trace/ftrace.c:2068 with code-patching selftests Sachin Sant
2022-01-24 12:15 ` Yinan Liu
2022-01-24 16:45   ` Steven Rostedt
2022-01-25  3:20     ` Yinan Liu
2022-01-26 14:37       ` Mark Rutland
2022-01-27 11:46         ` Mark Rutland
2022-01-27 12:03           ` Ard Biesheuvel
2022-01-27 12:20             ` Mark Rutland
2022-01-27 12:22               ` Ard Biesheuvel
2022-01-27 12:59                 ` Mark Rutland
2022-01-27 13:07                   ` Ard Biesheuvel
2022-01-27 13:24                     ` Mark Rutland
2022-01-27 13:59                       ` Ard Biesheuvel
2022-01-27 14:54                         ` Mark Rutland
2022-01-27 15:01                           ` Ard Biesheuvel
2022-01-27 12:04           ` Sven Schnelle
2022-01-27 12:27             ` Mark Rutland
2022-01-27 12:46               ` Steven Rostedt
2022-01-27 13:08                 ` Mark Rutland
2022-01-27 13:16                   ` Sven Schnelle
2022-01-27 13:33                     ` Mark Rutland
2022-01-27 13:55                       ` Steven Rostedt
2022-01-27 14:56                         ` Mark Rutland
2022-01-27 16:41           ` Kees Cook [this message]
2022-01-25  4:00     ` Sachin Sant
2022-01-25 14:28       ` Steven Rostedt

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=202201270834.4420E21F6@keescook \
    --to=keescook@chromium$(echo .)org \
    --cc=ardb@kernel$(echo .)org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=mark.rutland@arm$(echo .)com \
    --cc=rostedt@goodmis$(echo .)org \
    --cc=sachinp@linux$(echo .)ibm.com \
    --cc=yinan@linux$(echo .)alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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