From: "Prakhya, Sai Praneeth" <sai.praneeth.prakhya@intel.com>
To: "linux-efi@vger.kernel.org" <linux-efi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"x86@kernel.org" <x86@kernel.org>
Cc: "Neri, Ricardo" <ricardo.neri@intel.com>,
"matt@codeblueprint.co.uk" <matt@codeblueprint.co.uk>,
Al Stone <astone@redhat.com>, Borislav Petkov <bp@alien8.de>,
Ingo Molnar <mingo@kernel.org>, Andy Lutomirski <luto@kernel.org>,
Bhupesh Sharma <bhsharma@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: RE: [PATCH V3 2/5] efi: Introduce __efi_init attribute
Date: Tue, 4 Sep 2018 22:25:11 +0000 [thread overview]
Message-ID: <FFF73D592F13FD46B8700F0A279B802F485B981D@ORSMSX114.amr.corp.intel.com> (raw)
In-Reply-To: <1536099149-12564-3-git-send-email-sai.praneeth.prakhya@intel.com>
Hi Boris and Ard,
> Buggy firmware could illegally access some efi regions even after the kernel has
> assumed control of the platform. When
> "CONFIG_EFI_WARN_ON_ILLEGAL_ACCESS" is enabled, the efi page fault
> handler will detect and recover from these illegal accesses.
> efi_md_typeattr_format() and memory_type_name are used by the efi page
> fault handler to print information about memory descriptor that was illegally
> accessed. As the page fault handler is present during/after kernel boot it doesn't
> have an __init attribute, but
> efi_md_typeattr_format() has it and thus during kernel build, "WARNING:
> modpost: Found * section mismatch(es)" build warning is observed. To fix it,
> remove __init attribute for efi_md_typeattr_format().
>
> In order to not keep efi_md_typeattr_format() and memory_type_name
> needlessly when "CONFIG_EFI_WARN_ON_ILLEGAL_ACCESS" is not selected,
> add a new __efi_init attribute whose value changes based on whether the config
> option is selected or not.
In previous versions (i.e. up to V2), where we handled EFI_BOOT_SERVICES_<CODE/DATA>
regions differently, it made sense to have a separate attribute like __efi_init because many
function definitions were modified. From V3, do you think it's still OK to have __efi_init or
should I just remove __init attribute (and not have __efi_init) for efi_md_typeattr_format()
and memory_type_name because we are just modifying two.
Regards,
Sai
next prev parent reply other threads:[~2018-09-04 22:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-04 22:12 [PATCH V3 0/5] Add efi page fault handler to detect and recover Sai Praneeth Prakhya
2018-09-04 22:12 ` [PATCH V3 1/5] efi: Make efi_rts_work accessible to efi page fault handler Sai Praneeth Prakhya
2018-09-04 22:12 ` [PATCH V3 2/5] efi: Introduce __efi_init attribute Sai Praneeth Prakhya
2018-09-04 22:25 ` Prakhya, Sai Praneeth [this message]
2018-09-04 22:12 ` [PATCH V3 3/5] x86/efi: Permanently save the EFI_MEMORY_MAP passed by the firmware Sai Praneeth Prakhya
2018-09-05 11:48 ` Peter Zijlstra
2018-09-05 12:27 ` Ard Biesheuvel
2018-09-05 12:56 ` Peter Zijlstra
2018-09-05 13:03 ` Ard Biesheuvel
2018-09-05 13:06 ` Thomas Gleixner
2018-09-05 17:53 ` Prakhya, Sai Praneeth
2018-09-06 12:56 ` Ard Biesheuvel
2018-09-06 17:34 ` Prakhya, Sai Praneeth
2018-09-04 22:12 ` [PATCH V3 4/5] x86/efi: Add efi page fault handler to recover from the page faults caused by firmware Sai Praneeth Prakhya
2018-09-04 22:12 ` [PATCH V3 5/5] x86/efi: Introduce EFI_WARN_ON_ILLEGAL_ACCESS Sai Praneeth Prakhya
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=FFF73D592F13FD46B8700F0A279B802F485B981D@ORSMSX114.amr.corp.intel.com \
--to=sai.praneeth.prakhya@intel.com \
--cc=ard.biesheuvel@linaro.org \
--cc=astone@redhat.com \
--cc=bhsharma@redhat.com \
--cc=bp@alien8.de \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=matt@codeblueprint.co.uk \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=ricardo.neri@intel.com \
--cc=tglx@linutronix.de \
--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
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).