From: Segher Boessenkool <segher@kernel.crashing.org>
To: Jessica Yu <jeyu@kernel.org>
Cc: "Nicholas Piggin" <npiggin@gmail.com>,
"Michal Suchánek" <msuchanek@suse.de>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 1/2] module: add elf_check_module_arch for module specific elf arch checks
Date: Tue, 15 Jun 2021 07:50:57 -0500 [thread overview]
Message-ID: <20210615125057.GF5077@gate.crashing.org> (raw)
In-Reply-To: <YMiaZOqhHck9iy0n@p200300cbcf109700df096d564fe976c3.dip0.t-ipconnect.de>
On Tue, Jun 15, 2021 at 02:17:40PM +0200, Jessica Yu wrote:
> +int __weak elf_check_module_arch(Elf_Ehdr *hdr)
> +{
> + return 1;
> +}
But is this a good idea? It isn't useful to be able to attempt to load
a module not compiled for your architecture, and it increases the attack
surface tremendously. These checks are one of the few things that can
*not* be weak symbols, imo.
Segher
next prev parent reply other threads:[~2021-06-15 12:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-11 9:39 [PATCH v4 0/2] powerpc/64: Option to use ELF V2 ABI for big-endian Nicholas Piggin
2021-06-11 9:39 ` [PATCH v4 1/2] module: add elf_check_module_arch for module specific elf arch checks Nicholas Piggin
2021-06-14 12:06 ` Jessica Yu
2021-06-15 2:05 ` Nicholas Piggin
2021-06-15 12:17 ` Jessica Yu
2021-06-15 12:50 ` Segher Boessenkool [this message]
2021-06-15 13:41 ` Jessica Yu
2021-06-15 14:30 ` Segher Boessenkool
2021-06-16 2:39 ` Michael Ellerman
2021-06-16 1:18 ` Nicholas Piggin
2021-06-16 12:54 ` Jessica Yu
2021-06-17 5:21 ` Nicholas Piggin
2021-06-16 2:37 ` Michael Ellerman
2021-06-16 13:49 ` Jessica Yu
2021-06-11 9:39 ` [PATCH v4 2/2] powerpc/64: Option to use ELF V2 ABI for big-endian kernels Nicholas Piggin
2021-06-11 9:58 ` Michal Suchánek
2021-06-11 10:20 ` Michal Suchánek
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=20210615125057.GF5077@gate.crashing.org \
--to=segher@kernel.crashing.org \
--cc=jeyu@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=msuchanek@suse.de \
--cc=npiggin@gmail.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;
as well as URLs for NNTP newsgroup(s).