public inbox for linux-efi@vger.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL 0/2] EFI updates for v4.15
@ 2017-10-25 10:14 Ard Biesheuvel
  2017-10-25 10:14 ` [PATCH 1/2] efi/capsule-loader: pr_err() strings should end with newlines Ard Biesheuvel
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ard Biesheuvel @ 2017-10-25 10:14 UTC (permalink / raw)
  To: linux-efi-u79uwXL29TY76Z2rM5mHXA, Ingo Molnar, Thomas Gleixner,
	H . Peter Anvin
  Cc: Ard Biesheuvel, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Arvind Yadav,
	Jan Kiszka, Kweh Hock Leong, Matt Fleming, Stephen Boyd

The following changes since commit 8a5776a5f49812d29fe4b2d0a2d71675c3facf3f:

  Linux 4.14-rc4 (2017-10-08 20:53:29 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git efi-next

for you to fetch changes up to c19611def8fd3f524bc945f0e8f9becace8fdf06:

  arm64: efi: ignore EFI_MEMORY_XP attribute if RP and/or WP are set (2017-10-16 16:21:26 +0100)

----------------------------------------------------------------
EFI changes for v4.15:
- ignore EFI_MEMORY_XP attributes on ARM if _RP/_WP are set as well
- a cosmetic pr_err() format string fix

----------------------------------------------------------------
Ard Biesheuvel (1):
      arm64: efi: ignore EFI_MEMORY_XP attribute if RP and/or WP are set

Arvind Yadav (1):
      efi/capsule-loader: pr_err() strings should end with newlines

 arch/arm64/kernel/efi.c               | 4 +++-
 drivers/firmware/efi/capsule-loader.c | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] efi/capsule-loader: pr_err() strings should end with newlines
  2017-10-25 10:14 [GIT PULL 0/2] EFI updates for v4.15 Ard Biesheuvel
@ 2017-10-25 10:14 ` Ard Biesheuvel
  2017-10-25 10:14 ` [PATCH 2/2] arm64: efi: ignore EFI_MEMORY_XP attribute if RP and/or WP are set Ard Biesheuvel
  2017-12-26 10:40 ` [GIT PULL 0/2] EFI updates for v4.15 Ard Biesheuvel
  2 siblings, 0 replies; 6+ messages in thread
From: Ard Biesheuvel @ 2017-10-25 10:14 UTC (permalink / raw)
  To: linux-efi, Ingo Molnar, Thomas Gleixner, H . Peter Anvin
  Cc: Arvind Yadav, Ard Biesheuvel, linux-kernel, Jan Kiszka,
	Kweh Hock Leong, Matt Fleming

From: Arvind Yadav <arvind.yadav.cs@gmail.com>

pr_err() messages should terminated with a new-line to avoid
other messages being concatenated onto the end.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Kweh Hock Leong <hock.leong.kweh@intel.com>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 drivers/firmware/efi/capsule-loader.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/capsule-loader.c b/drivers/firmware/efi/capsule-loader.c
index ec8ac5c4dd84..51d2874942a2 100644
--- a/drivers/firmware/efi/capsule-loader.c
+++ b/drivers/firmware/efi/capsule-loader.c
@@ -49,7 +49,7 @@ int __efi_capsule_setup_info(struct capsule_info *cap_info)
 	pages_needed = ALIGN(cap_info->total_size, PAGE_SIZE) / PAGE_SIZE;
 
 	if (pages_needed == 0) {
-		pr_err("invalid capsule size");
+		pr_err("invalid capsule size\n");
 		return -EINVAL;
 	}
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] arm64: efi: ignore EFI_MEMORY_XP attribute if RP and/or WP are set
  2017-10-25 10:14 [GIT PULL 0/2] EFI updates for v4.15 Ard Biesheuvel
  2017-10-25 10:14 ` [PATCH 1/2] efi/capsule-loader: pr_err() strings should end with newlines Ard Biesheuvel
@ 2017-10-25 10:14 ` Ard Biesheuvel
  2017-12-26 10:40 ` [GIT PULL 0/2] EFI updates for v4.15 Ard Biesheuvel
  2 siblings, 0 replies; 6+ messages in thread
From: Ard Biesheuvel @ 2017-10-25 10:14 UTC (permalink / raw)
  To: linux-efi, Ingo Molnar, Thomas Gleixner, H . Peter Anvin
  Cc: Ard Biesheuvel, linux-kernel, Matt Fleming

The UEFI memory map is a bit vague about how to interpret the
EFI_MEMORY_XP attribute when it is combined with EFI_MEMORY_RP and/or
EFI_MEMORY_WP, which have retroactively been redefined as cacheability
attributes rather than permission attributes.

So let's ignore EFI_MEMORY_XP if _RP and/or _WP are also set. In this
case, it is likely that they are being used to describe the capability
of the region (i.e., whether it has the controls to reconfigure it as
non-executable) rather than the nature of the contents of the region
(i.e., whether it contains data that we will never attempt to execute)

Reported-by: Stephen Boyd <sboyd@codeaurora.org>
Tested-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 arch/arm64/kernel/efi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c
index 82cd07592519..f85ac58d08a3 100644
--- a/arch/arm64/kernel/efi.c
+++ b/arch/arm64/kernel/efi.c
@@ -48,7 +48,9 @@ static __init pteval_t create_mapping_protection(efi_memory_desc_t *md)
 		return pgprot_val(PAGE_KERNEL_ROX);
 
 	/* RW- */
-	if (attr & EFI_MEMORY_XP || type != EFI_RUNTIME_SERVICES_CODE)
+	if (((attr & (EFI_MEMORY_RP | EFI_MEMORY_WP | EFI_MEMORY_XP)) ==
+	     EFI_MEMORY_XP) ||
+	    type != EFI_RUNTIME_SERVICES_CODE)
 		return pgprot_val(PAGE_KERNEL);
 
 	/* RWX */
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [GIT PULL 0/2] EFI updates for v4.15
  2017-10-25 10:14 [GIT PULL 0/2] EFI updates for v4.15 Ard Biesheuvel
  2017-10-25 10:14 ` [PATCH 1/2] efi/capsule-loader: pr_err() strings should end with newlines Ard Biesheuvel
  2017-10-25 10:14 ` [PATCH 2/2] arm64: efi: ignore EFI_MEMORY_XP attribute if RP and/or WP are set Ard Biesheuvel
@ 2017-12-26 10:40 ` Ard Biesheuvel
       [not found]   ` <CAKv+Gu9UniZugun1LAJCUc0_NsMWDP3RLn4sLxRbvbTN0ocycA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2 siblings, 1 reply; 6+ messages in thread
From: Ard Biesheuvel @ 2017-12-26 10:40 UTC (permalink / raw)
  To: linux-efi, Ingo Molnar, Thomas Gleixner, H . Peter Anvin
  Cc: Ard Biesheuvel, Linux Kernel Mailing List, Arvind Yadav,
	Jan Kiszka, Kweh Hock Leong, Matt Fleming, Stephen Boyd

On 25 October 2017 at 11:14, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> The following changes since commit 8a5776a5f49812d29fe4b2d0a2d71675c3facf3f:
>
>   Linux 4.14-rc4 (2017-10-08 20:53:29 -0700)
>
> are available in the git repository at:
>
>   git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git efi-next
>
> for you to fetch changes up to c19611def8fd3f524bc945f0e8f9becace8fdf06:
>
>   arm64: efi: ignore EFI_MEMORY_XP attribute if RP and/or WP are set (2017-10-16 16:21:26 +0100)
>
> ----------------------------------------------------------------
> EFI changes for v4.15:
> - ignore EFI_MEMORY_XP attributes on ARM if _RP/_WP are set as well
> - a cosmetic pr_err() format string fix
>
> ----------------------------------------------------------------
> Ard Biesheuvel (1):
>       arm64: efi: ignore EFI_MEMORY_XP attribute if RP and/or WP are set
>
> Arvind Yadav (1):
>       efi/capsule-loader: pr_err() strings should end with newlines
>
>  arch/arm64/kernel/efi.c               | 4 +++-
>  drivers/firmware/efi/capsule-loader.c | 2 +-
>  2 files changed, 4 insertions(+), 2 deletions(-)

Ingo,

It appears these patches have never made it into the TIP tree. Shall I
just resend them as part of the pull request for v4.16?

Thanks,
Ard.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [GIT PULL 0/2] EFI updates for v4.15
       [not found]   ` <CAKv+Gu9UniZugun1LAJCUc0_NsMWDP3RLn4sLxRbvbTN0ocycA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-12-27 18:46     ` Ingo Molnar
       [not found]       ` <20171227184651.ma4dsoi3a77arjxu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Ingo Molnar @ 2017-12-27 18:46 UTC (permalink / raw)
  To: Ard Biesheuvel
  Cc: linux-efi-u79uwXL29TY76Z2rM5mHXA, Thomas Gleixner,
	H . Peter Anvin, Linux Kernel Mailing List, Arvind Yadav,
	Jan Kiszka, Kweh Hock Leong, Matt Fleming, Stephen Boyd


* Ard Biesheuvel <ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:

> On 25 October 2017 at 11:14, Ard Biesheuvel <ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
> > The following changes since commit 8a5776a5f49812d29fe4b2d0a2d71675c3facf3f:
> >
> >   Linux 4.14-rc4 (2017-10-08 20:53:29 -0700)
> >
> > are available in the git repository at:
> >
> >   git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git efi-next
> >
> > for you to fetch changes up to c19611def8fd3f524bc945f0e8f9becace8fdf06:
> >
> >   arm64: efi: ignore EFI_MEMORY_XP attribute if RP and/or WP are set (2017-10-16 16:21:26 +0100)
> >
> > ----------------------------------------------------------------
> > EFI changes for v4.15:
> > - ignore EFI_MEMORY_XP attributes on ARM if _RP/_WP are set as well
> > - a cosmetic pr_err() format string fix
> >
> > ----------------------------------------------------------------
> > Ard Biesheuvel (1):
> >       arm64: efi: ignore EFI_MEMORY_XP attribute if RP and/or WP are set
> >
> > Arvind Yadav (1):
> >       efi/capsule-loader: pr_err() strings should end with newlines
> >
> >  arch/arm64/kernel/efi.c               | 4 +++-
> >  drivers/firmware/efi/capsule-loader.c | 2 +-
> >  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> Ingo,
> 
> It appears these patches have never made it into the TIP tree. Shall I
> just resend them as part of the pull request for v4.16?

Indeed - my mistake ...

Feel free to send them as efi/urgent material, or as v4.16 bits.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [GIT PULL 0/2] EFI updates for v4.15
       [not found]       ` <20171227184651.ma4dsoi3a77arjxu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-12-28 22:20         ` Ard Biesheuvel
  0 siblings, 0 replies; 6+ messages in thread
From: Ard Biesheuvel @ 2017-12-28 22:20 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-efi-u79uwXL29TY76Z2rM5mHXA, Thomas Gleixner,
	H . Peter Anvin, Linux Kernel Mailing List, Arvind Yadav,
	Jan Kiszka, Kweh Hock Leong, Matt Fleming, Stephen Boyd

On 27 December 2017 at 18:46, Ingo Molnar <mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
>
> * Ard Biesheuvel <ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
>
>> On 25 October 2017 at 11:14, Ard Biesheuvel <ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
>> > The following changes since commit 8a5776a5f49812d29fe4b2d0a2d71675c3facf3f:
>> >
>> >   Linux 4.14-rc4 (2017-10-08 20:53:29 -0700)
>> >
>> > are available in the git repository at:
>> >
>> >   git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git efi-next
>> >
>> > for you to fetch changes up to c19611def8fd3f524bc945f0e8f9becace8fdf06:
>> >
>> >   arm64: efi: ignore EFI_MEMORY_XP attribute if RP and/or WP are set (2017-10-16 16:21:26 +0100)
>> >
>> > ----------------------------------------------------------------
>> > EFI changes for v4.15:
>> > - ignore EFI_MEMORY_XP attributes on ARM if _RP/_WP are set as well
>> > - a cosmetic pr_err() format string fix
>> >
>> > ----------------------------------------------------------------
>> > Ard Biesheuvel (1):
>> >       arm64: efi: ignore EFI_MEMORY_XP attribute if RP and/or WP are set
>> >
>> > Arvind Yadav (1):
>> >       efi/capsule-loader: pr_err() strings should end with newlines
>> >
>> >  arch/arm64/kernel/efi.c               | 4 +++-
>> >  drivers/firmware/efi/capsule-loader.c | 2 +-
>> >  2 files changed, 4 insertions(+), 2 deletions(-)
>>
>> Ingo,
>>
>> It appears these patches have never made it into the TIP tree. Shall I
>> just resend them as part of the pull request for v4.16?
>
> Indeed - my mistake ...
>
> Feel free to send them as efi/urgent material, or as v4.16 bits.
>

Thanks - I will just add them to the v4.16 queue.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-12-28 22:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-25 10:14 [GIT PULL 0/2] EFI updates for v4.15 Ard Biesheuvel
2017-10-25 10:14 ` [PATCH 1/2] efi/capsule-loader: pr_err() strings should end with newlines Ard Biesheuvel
2017-10-25 10:14 ` [PATCH 2/2] arm64: efi: ignore EFI_MEMORY_XP attribute if RP and/or WP are set Ard Biesheuvel
2017-12-26 10:40 ` [GIT PULL 0/2] EFI updates for v4.15 Ard Biesheuvel
     [not found]   ` <CAKv+Gu9UniZugun1LAJCUc0_NsMWDP3RLn4sLxRbvbTN0ocycA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-12-27 18:46     ` Ingo Molnar
     [not found]       ` <20171227184651.ma4dsoi3a77arjxu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-12-28 22:20         ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox