From: Vineet Gupta <vineetg@rivosinc.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
palmer@rivosinc.com, Paul Walmsley <paul.walmsley@sifive.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Kees Cook <keescook@chromium.org>, Guo Ren <guoren@kernel.org>,
Greentime Hu <greentime.hu@sifive.com>,
Conor Dooley <conor.dooley@microchip.com>,
linux@rivosinc.com, kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] riscv: elf: add .riscv.attributes parsing
Date: Thu, 12 Jan 2023 12:22:10 -0800 [thread overview]
Message-ID: <1c0412a7-7544-9398-c4fa-657b7ea59b94@rivosinc.com> (raw)
In-Reply-To: <87tu0xko6g.fsf@email.froward.int.ebiederm.org>
On 1/11/23 08:53, Eric W. Biederman wrote:
> Vineet Gupta <vineetg@rivosinc.com> writes:
>
>> This implements the elf loader hook to parse RV specific
>> .riscv.attributes section. This section is inserted by compilers
>> (gcc/llvm) with build related information such as -march organized as
>> tag/value attribute pairs.
>>
>> It identifies the various attribute tags (and corresponding values) as
>> currently specified in the psABI specification.
>>
>> This patch only implements the elf parsing mechanics, leaving out the
>> recording/usage of the attributes to subsequent patches.
> Why does the kernel care?
>
> Unless I am mistaken the kind of information you are describing is
> typically dealt with by the dynamic linker, rather than the kernel.
>
> As a general strategy I think it is smart to leave as much to
> userspace and the dynamic linker and possible intead of asking
> the kernel's elf loader to care.
That is true in general. But in some cases we might have to do stuff
before kick starting usermode such as setting up a shadow stack with
special permissions etc.
> That allows more rapid
> prototyping and reduces the impact of parsing bugs.
prev parent reply other threads:[~2023-01-12 20:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-10 20:18 Vineet Gupta
2023-01-10 20:48 ` Jessica Clarke
2023-01-10 21:50 ` Vineet Gupta
2023-01-10 23:21 ` Jessica Clarke
2023-01-10 23:45 ` Vineet Gupta
2023-01-11 0:29 ` Jessica Clarke
2023-01-10 22:04 ` Conor Dooley
2023-01-10 22:16 ` Vineet Gupta
2023-01-10 22:29 ` Conor Dooley
2023-01-11 16:53 ` Eric W. Biederman
2023-01-12 20:22 ` Vineet Gupta [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=1c0412a7-7544-9398-c4fa-657b7ea59b94@rivosinc.com \
--to=vineetg@rivosinc.com \
--cc=aou@eecs.berkeley.edu \
--cc=conor.dooley@microchip.com \
--cc=ebiederm@xmission.com \
--cc=greentime.hu@sifive.com \
--cc=guoren@kernel.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux@rivosinc.com \
--cc=lkp@intel.com \
--cc=palmer@rivosinc.com \
--cc=paul.walmsley@sifive.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
all inboxes | Powered by JetHome®