Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1503047 > unrolled thread

[GIT PULL 0/8] EFI changes for v4.10

Started byMatt Fleming <matt@codeblueprint.co.uk>
First post2016-10-18 16:40 +0200
Last post2016-10-18 17:50 +0200
Articles 19 — 9 participants

Back to article view | Back to linux.kernel


Contents

  [GIT PULL 0/8] EFI changes for v4.10 Matt Fleming <matt@codeblueprint.co.uk> - 2016-10-18 16:40 +0200
    [PATCH 1/8] MAINTAINERS: add myself as EFI maintainer Matt Fleming <matt@codeblueprint.co.uk> - 2016-10-18 16:40 +0200
      [tip:efi/core] MAINTAINERS: Add myself as EFI maintainer tip-bot for Ard Biesheuvel <tipbot@zytor.com> - 2016-10-18 17:40 +0200
    [PATCH 3/8] efi/arm*: efi_init() error handling fix Matt Fleming <matt@codeblueprint.co.uk> - 2016-10-18 16:40 +0200
      [tip:efi/core] efi/arm*: Fix efi_init() error handling tip-bot for Yisheng Xie <tipbot@zytor.com> - 2016-10-18 17:40 +0200
    [PATCH 2/8] efi: Remove unused including <linux/version.h> Matt Fleming <matt@codeblueprint.co.uk> - 2016-10-18 16:40 +0200
      [tip:efi/core] efi: Remove unused include of <linux/version.h> tip-bot for Wei Yongjun <tipbot@zytor.com> - 2016-10-18 17:40 +0200
    [PATCH 4/8] efi/efi_test: Fix the uninitialized value datasize Matt Fleming <matt@codeblueprint.co.uk> - 2016-10-18 16:40 +0200
      [tip:efi/core] efi/efi_test: Fix uninitialized variable 'datasize' tip-bot for Ivan Hu <tipbot@zytor.com> - 2016-10-18 17:40 +0200
    [PATCH 5/8] efi/efi_test: Fix the uninitialized value rv Matt Fleming <matt@codeblueprint.co.uk> - 2016-10-18 16:40 +0200
      [tip:efi/core] efi/efi_test: Fix uninitialized variable 'rv' tip-bot for Ivan Hu <tipbot@zytor.com> - 2016-10-18 17:40 +0200
    [PATCH 6/8] efi/efi_test: Use memdup_user() as a cleanup Matt Fleming <matt@codeblueprint.co.uk> - 2016-10-18 16:40 +0200
      [tip:efi/core] efi/efi_test: Use memdup_user() as a cleanup tip-bot for Ivan Hu <tipbot@zytor.com> - 2016-10-18 17:40 +0200
    [PATCH 8/8] efi: efivar_ssdt_load: Don't return success on allocation failure Matt Fleming <matt@codeblueprint.co.uk> - 2016-10-18 16:40 +0200
      [tip:efi/core] efi/efivar_ssdt_load: Don't return success on  allocation failure tip-bot for Dan Carpenter <tipbot@zytor.com> - 2016-10-18 17:40 +0200
    Re: [GIT PULL 0/8] EFI changes for v4.10 Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-10-18 17:30 +0200
    Re: [GIT PULL 0/8] EFI changes for v4.10 Ingo Molnar <mingo@kernel.org> - 2016-10-18 17:30 +0200
    Re: [GIT PULL 0/8] EFI changes for v4.10 Lukas Wunner <lukas@wunner.de> - 2016-10-18 17:40 +0200
      Re: [GIT PULL 0/8] EFI changes for v4.10 Matt Fleming <matt@codeblueprint.co.uk> - 2016-10-18 17:50 +0200

#1503047 — [GIT PULL 0/8] EFI changes for v4.10

FromMatt Fleming <matt@codeblueprint.co.uk>
Date2016-10-18 16:40 +0200
Subject[GIT PULL 0/8] EFI changes for v4.10
Message-ID<stDIC-2X6-35@gated-at.bofh.it>
Folks, please queue up the following small changes for v4.10.

Note that there is a patch to MAINTAINERS in this pull request that
adds Ard as EFI co-maintainer. It'd probably be a good idea to send
that to Linus before v4.10.

The following changes since commit 92dc33501bfba74655dbf3ec63ea82d040fd6d58:

  x86/efi: Round EFI memmap reservations to EFI_PAGE_SIZE (2016-09-20 15:43:31 +0100)

are available in the git repository at:

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

for you to fetch changes up to a8226a73b82256b82c167956b0f4d3cd39312531:

  efi: efivar_ssdt_load: Don't return success on allocation failure (2016-10-13 11:55:40 +0100)

----------------------------------------------------------------
 * Add Ard as EFI co-maintainer in MAINTAINERS

 * Misc cleanups for efi_test driver - Ivan Hu and Wei Yongjun

 * Fix an early_memremap() leak for ARM/arm64 - Yisheng Xie

 * Return an error code on failure instead of success in
   efivar_ssdt_load() - Dan Carpenter

 * Expose EFI framebuffer configuration, which allows rendering
   localized status strings during firmware updates - Peter Jones

----------------------------------------------------------------
Ard Biesheuvel (1):
      MAINTAINERS: add myself as EFI maintainer

Dan Carpenter (1):
      efi: efivar_ssdt_load: Don't return success on allocation failure

Ivan Hu (3):
      efi/efi_test: Fix the uninitialized value datasize
      efi/efi_test: Fix the uninitialized value rv
      efi/efi_test: Use memdup_user() as a cleanup

Peter Jones (1):
      efifb: show framebuffer layout as device attributes

Wei Yongjun (1):
      efi: Remove unused including <linux/version.h>

Yisheng Xie (1):
      efi/arm*: efi_init() error handling fix

 MAINTAINERS                          |  3 +-
 drivers/firmware/efi/arm-init.c      |  4 ++-
 drivers/firmware/efi/efi.c           |  4 ++-
 drivers/firmware/efi/test/efi_test.c | 15 +++------
 drivers/video/fbdev/efifb.c          | 59 ++++++++++++++++++++++++++++--------
 5 files changed, 59 insertions(+), 26 deletions(-)

[toc] | [next] | [standalone]


#1503049 — [PATCH 1/8] MAINTAINERS: add myself as EFI maintainer

FromMatt Fleming <matt@codeblueprint.co.uk>
Date2016-10-18 16:40 +0200
Subject[PATCH 1/8] MAINTAINERS: add myself as EFI maintainer
Message-ID<stDIC-2X6-57@gated-at.bofh.it>
In reply to#1503047
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>

At the request of Matt, I am taking up co-maintainership of the EFI
subsystem. So add my name to the EFI section in MAINTAINERS, and
change the SCM tree reference to point to the new shared Git repo.

Cc: Matt Fleming <matt@codeblueprint.co.uk>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: Matt Fleming <matt@codeblueprint.co.uk>
---
 MAINTAINERS | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 007d05acbb5f..224518556a84 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4557,8 +4557,9 @@ F:	sound/usb/misc/ua101.c
 
 EXTENSIBLE FIRMWARE INTERFACE (EFI)
 M:	Matt Fleming <matt@codeblueprint.co.uk>
+M:	Ard Biesheuvel <ard.biesheuvel@linaro.org>
 L:	linux-efi@vger.kernel.org
-T:	git git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.git
+T:	git git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git
 S:	Maintained
 F:	Documentation/efi-stub.txt
 F:	arch/ia64/kernel/efi.c
-- 
2.10.0

[toc] | [prev] | [next] | [standalone]


#1503112 — [tip:efi/core] MAINTAINERS: Add myself as EFI maintainer

Fromtip-bot for Ard Biesheuvel <tipbot@zytor.com>
Date2016-10-18 17:40 +0200
Subject[tip:efi/core] MAINTAINERS: Add myself as EFI maintainer
Message-ID<stEEF-3BE-13@gated-at.bofh.it>
In reply to#1503049
Commit-ID:  6026ed2fe258b61ea5aadd91a95c4f36a6dbe167
Gitweb:     http://git.kernel.org/tip/6026ed2fe258b61ea5aadd91a95c4f36a6dbe167
Author:     Ard Biesheuvel <ard.biesheuvel@linaro.org>
AuthorDate: Tue, 18 Oct 2016 15:33:11 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 18 Oct 2016 17:11:14 +0200

MAINTAINERS: Add myself as EFI maintainer

At the request of Matt, I am taking up co-maintainership of the EFI
subsystem. So add my name to the EFI section in MAINTAINERS, and
change the SCM tree reference to point to the new shared Git repo.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20161018143318.15673-2-matt@codeblueprint.co.uk
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 MAINTAINERS | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 1cd38a7..6847ba8 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4620,8 +4620,9 @@ F:	sound/usb/misc/ua101.c
 
 EXTENSIBLE FIRMWARE INTERFACE (EFI)
 M:	Matt Fleming <matt@codeblueprint.co.uk>
+M:	Ard Biesheuvel <ard.biesheuvel@linaro.org>
 L:	linux-efi@vger.kernel.org
-T:	git git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi.git
+T:	git git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git
 S:	Maintained
 F:	Documentation/efi-stub.txt
 F:	arch/ia64/kernel/efi.c

[toc] | [prev] | [next] | [standalone]


#1503051 — [PATCH 3/8] efi/arm*: efi_init() error handling fix

FromMatt Fleming <matt@codeblueprint.co.uk>
Date2016-10-18 16:40 +0200
Subject[PATCH 3/8] efi/arm*: efi_init() error handling fix
Message-ID<stDIC-2X6-51@gated-at.bofh.it>
In reply to#1503047
From: Yisheng Xie <xieyisheng1@huawei.com>

There's an early memmap leak in efi_init error path, fix it.

Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
---
 drivers/firmware/efi/arm-init.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/arm-init.c b/drivers/firmware/efi/arm-init.c
index 8efe13075c92..f853ad2c4ca0 100644
--- a/drivers/firmware/efi/arm-init.c
+++ b/drivers/firmware/efi/arm-init.c
@@ -244,8 +244,10 @@ void __init efi_init(void)
 	     "Unexpected EFI_MEMORY_DESCRIPTOR version %ld",
 	      efi.memmap.desc_version);
 
-	if (uefi_init() < 0)
+	if (uefi_init() < 0) {
+		efi_memmap_unmap();
 		return;
+	}
 
 	reserve_regions();
 	efi_memattr_init();
-- 
2.10.0

[toc] | [prev] | [next] | [standalone]


#1503122 — [tip:efi/core] efi/arm*: Fix efi_init() error handling

Fromtip-bot for Yisheng Xie <tipbot@zytor.com>
Date2016-10-18 17:40 +0200
Subject[tip:efi/core] efi/arm*: Fix efi_init() error handling
Message-ID<stEEG-3BE-35@gated-at.bofh.it>
In reply to#1503051
Commit-ID:  0709a008c9fadc176500ece7395b8b5b8de143e3
Gitweb:     http://git.kernel.org/tip/0709a008c9fadc176500ece7395b8b5b8de143e3
Author:     Yisheng Xie <xieyisheng1@huawei.com>
AuthorDate: Tue, 18 Oct 2016 15:33:13 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 18 Oct 2016 17:11:17 +0200

efi/arm*: Fix efi_init() error handling

There's an early memmap() leak in the efi_init() error path, fix it.

Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20161018143318.15673-4-matt@codeblueprint.co.uk
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 drivers/firmware/efi/arm-init.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/arm-init.c b/drivers/firmware/efi/arm-init.c
index 8efe130..f853ad2 100644
--- a/drivers/firmware/efi/arm-init.c
+++ b/drivers/firmware/efi/arm-init.c
@@ -244,8 +244,10 @@ void __init efi_init(void)
 	     "Unexpected EFI_MEMORY_DESCRIPTOR version %ld",
 	      efi.memmap.desc_version);
 
-	if (uefi_init() < 0)
+	if (uefi_init() < 0) {
+		efi_memmap_unmap();
 		return;
+	}
 
 	reserve_regions();
 	efi_memattr_init();

[toc] | [prev] | [next] | [standalone]


#1503052 — [PATCH 2/8] efi: Remove unused including <linux/version.h>

FromMatt Fleming <matt@codeblueprint.co.uk>
Date2016-10-18 16:40 +0200
Subject[PATCH 2/8] efi: Remove unused including <linux/version.h>
Message-ID<stDIC-2X6-45@gated-at.bofh.it>
In reply to#1503047
From: Wei Yongjun <weiyongjun1@huawei.com>

Remove including <linux/version.h> that don't need it.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Cc: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
---
 drivers/firmware/efi/test/efi_test.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/firmware/efi/test/efi_test.c b/drivers/firmware/efi/test/efi_test.c
index f61bb52be318..ae51268737cc 100644
--- a/drivers/firmware/efi/test/efi_test.c
+++ b/drivers/firmware/efi/test/efi_test.c
@@ -8,7 +8,6 @@
  *
  */
 
-#include <linux/version.h>
 #include <linux/miscdevice.h>
 #include <linux/module.h>
 #include <linux/init.h>
-- 
2.10.0

[toc] | [prev] | [next] | [standalone]


#1503127 — [tip:efi/core] efi: Remove unused include of <linux/version.h>

Fromtip-bot for Wei Yongjun <tipbot@zytor.com>
Date2016-10-18 17:40 +0200
Subject[tip:efi/core] efi: Remove unused include of <linux/version.h>
Message-ID<stEEG-3BE-49@gated-at.bofh.it>
In reply to#1503052
Commit-ID:  10714dd37aa7ebb165677b9a793448950ff366ad
Gitweb:     http://git.kernel.org/tip/10714dd37aa7ebb165677b9a793448950ff366ad
Author:     Wei Yongjun <weiyongjun1@huawei.com>
AuthorDate: Tue, 18 Oct 2016 15:33:12 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 18 Oct 2016 17:11:16 +0200

efi: Remove unused include of <linux/version.h>

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20161018143318.15673-3-matt@codeblueprint.co.uk
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 drivers/firmware/efi/test/efi_test.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/firmware/efi/test/efi_test.c b/drivers/firmware/efi/test/efi_test.c
index f61bb52..ae51268 100644
--- a/drivers/firmware/efi/test/efi_test.c
+++ b/drivers/firmware/efi/test/efi_test.c
@@ -8,7 +8,6 @@
  *
  */
 
-#include <linux/version.h>
 #include <linux/miscdevice.h>
 #include <linux/module.h>
 #include <linux/init.h>

[toc] | [prev] | [next] | [standalone]


#1503053 — [PATCH 4/8] efi/efi_test: Fix the uninitialized value datasize

FromMatt Fleming <matt@codeblueprint.co.uk>
Date2016-10-18 16:40 +0200
Subject[PATCH 4/8] efi/efi_test: Fix the uninitialized value datasize
Message-ID<stDID-2X6-65@gated-at.bofh.it>
In reply to#1503047
From: Ivan Hu <ivan.hu@canonical.com>

Fix the minor issue found by CoverityScan
CID 1358931 (#1 of 1): Uninitialized scalar variable (UNINIT)9.
uninit_use: Using uninitialized value datasize.
199        prev_datasize = datasize;
200        status = efi.get_variable(name, vd, at, dz, data);

Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
Cc: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
---
 drivers/firmware/efi/test/efi_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/test/efi_test.c b/drivers/firmware/efi/test/efi_test.c
index ae51268737cc..348efc9cf59f 100644
--- a/drivers/firmware/efi/test/efi_test.c
+++ b/drivers/firmware/efi/test/efi_test.c
@@ -155,7 +155,7 @@ static long efi_runtime_get_variable(unsigned long arg)
 {
 	struct efi_getvariable __user *getvariable_user;
 	struct efi_getvariable getvariable;
-	unsigned long datasize, prev_datasize, *dz;
+	unsigned long datasize = 0, prev_datasize, *dz;
 	efi_guid_t vendor_guid, *vd = NULL;
 	efi_status_t status;
 	efi_char16_t *name = NULL;
-- 
2.10.0

[toc] | [prev] | [next] | [standalone]


#1503125 — [tip:efi/core] efi/efi_test: Fix uninitialized variable 'datasize'

Fromtip-bot for Ivan Hu <tipbot@zytor.com>
Date2016-10-18 17:40 +0200
Subject[tip:efi/core] efi/efi_test: Fix uninitialized variable 'datasize'
Message-ID<stEEG-3BE-37@gated-at.bofh.it>
In reply to#1503053
Commit-ID:  46b9b7135332d1e2c54e853108a5088ab28f2165
Gitweb:     http://git.kernel.org/tip/46b9b7135332d1e2c54e853108a5088ab28f2165
Author:     Ivan Hu <ivan.hu@canonical.com>
AuthorDate: Tue, 18 Oct 2016 15:33:14 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 18 Oct 2016 17:11:17 +0200

efi/efi_test: Fix uninitialized variable 'datasize'

Fix minor issue found by CoverityScan:

  CID 1358931 (#1 of 1): Uninitialized scalar variable (UNINIT)9.
  uninit_use: Using uninitialized value datasize.
  199        prev_datasize = datasize;
  200        status = efi.get_variable(name, vd, at, dz, data);

Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20161018143318.15673-5-matt@codeblueprint.co.uk
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 drivers/firmware/efi/test/efi_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/test/efi_test.c b/drivers/firmware/efi/test/efi_test.c
index ae51268..348efc9 100644
--- a/drivers/firmware/efi/test/efi_test.c
+++ b/drivers/firmware/efi/test/efi_test.c
@@ -155,7 +155,7 @@ static long efi_runtime_get_variable(unsigned long arg)
 {
 	struct efi_getvariable __user *getvariable_user;
 	struct efi_getvariable getvariable;
-	unsigned long datasize, prev_datasize, *dz;
+	unsigned long datasize = 0, prev_datasize, *dz;
 	efi_guid_t vendor_guid, *vd = NULL;
 	efi_status_t status;
 	efi_char16_t *name = NULL;

[toc] | [prev] | [next] | [standalone]


#1503054 — [PATCH 5/8] efi/efi_test: Fix the uninitialized value rv

FromMatt Fleming <matt@codeblueprint.co.uk>
Date2016-10-18 16:40 +0200
Subject[PATCH 5/8] efi/efi_test: Fix the uninitialized value rv
Message-ID<stDIC-2X6-53@gated-at.bofh.it>
In reply to#1503047
From: Ivan Hu <ivan.hu@canonical.com>

Fix the minor issue found by CoverityScan
520        kfree(name);
CID 1358932 (#1 of 1): Uninitialized scalar variable (UNINIT)17.
uninit_use: Using uninitialized value rv.
521        return rv;
522}

Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
Cc: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
---
 drivers/firmware/efi/test/efi_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/test/efi_test.c b/drivers/firmware/efi/test/efi_test.c
index 348efc9cf59f..bb26e12b0cfd 100644
--- a/drivers/firmware/efi/test/efi_test.c
+++ b/drivers/firmware/efi/test/efi_test.c
@@ -428,7 +428,7 @@ static long efi_runtime_get_nextvariablename(unsigned long arg)
 	efi_guid_t *vd = NULL;
 	efi_guid_t vendor_guid;
 	efi_char16_t *name = NULL;
-	int rv;
+	int rv = 0;
 
 	getnextvariablename_user = (struct efi_getnextvariablename __user *)arg;
 
-- 
2.10.0

[toc] | [prev] | [next] | [standalone]


#1503129 — [tip:efi/core] efi/efi_test: Fix uninitialized variable 'rv'

Fromtip-bot for Ivan Hu <tipbot@zytor.com>
Date2016-10-18 17:40 +0200
Subject[tip:efi/core] efi/efi_test: Fix uninitialized variable 'rv'
Message-ID<stEEG-3BE-53@gated-at.bofh.it>
In reply to#1503054
Commit-ID:  9c30a2199311df9a1f25d0586c96dfbb7e876cdf
Gitweb:     http://git.kernel.org/tip/9c30a2199311df9a1f25d0586c96dfbb7e876cdf
Author:     Ivan Hu <ivan.hu@canonical.com>
AuthorDate: Tue, 18 Oct 2016 15:33:15 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 18 Oct 2016 17:11:18 +0200

efi/efi_test: Fix uninitialized variable 'rv'

Fix minor issue found by CoverityScan:

  520        kfree(name);
  CID 1358932 (#1 of 1): Uninitialized scalar variable (UNINIT)17.
  uninit_use: Using uninitialized value rv.
  521        return rv;
  522}

Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20161018143318.15673-6-matt@codeblueprint.co.uk
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 drivers/firmware/efi/test/efi_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/test/efi_test.c b/drivers/firmware/efi/test/efi_test.c
index 348efc9..bb26e12 100644
--- a/drivers/firmware/efi/test/efi_test.c
+++ b/drivers/firmware/efi/test/efi_test.c
@@ -428,7 +428,7 @@ static long efi_runtime_get_nextvariablename(unsigned long arg)
 	efi_guid_t *vd = NULL;
 	efi_guid_t vendor_guid;
 	efi_char16_t *name = NULL;
-	int rv;
+	int rv = 0;
 
 	getnextvariablename_user = (struct efi_getnextvariablename __user *)arg;
 

[toc] | [prev] | [next] | [standalone]


#1503055 — [PATCH 6/8] efi/efi_test: Use memdup_user() as a cleanup

FromMatt Fleming <matt@codeblueprint.co.uk>
Date2016-10-18 16:40 +0200
Subject[PATCH 6/8] efi/efi_test: Use memdup_user() as a cleanup
Message-ID<stDID-2X6-71@gated-at.bofh.it>
In reply to#1503047
From: Ivan Hu <ivan.hu@canonical.com>

Fix coccicheck warning which recommends to use memdup_user()

This patch fixes below coccicheck warnings:
drivers/firmware/efi/test/efi_test.c:269:8-15: WARNING opportunity for
memdup_user

Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
Cc: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
---
 drivers/firmware/efi/test/efi_test.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/firmware/efi/test/efi_test.c b/drivers/firmware/efi/test/efi_test.c
index bb26e12b0cfd..8cd578f62059 100644
--- a/drivers/firmware/efi/test/efi_test.c
+++ b/drivers/firmware/efi/test/efi_test.c
@@ -265,14 +265,10 @@ static long efi_runtime_set_variable(unsigned long arg)
 			return rv;
 	}
 
-	data = kmalloc(setvariable.data_size, GFP_KERNEL);
-	if (!data) {
+	data = memdup_user(setvariable.data, setvariable.data_size);
+	if (IS_ERR(data)) {
 		kfree(name);
-		return -ENOMEM;
-	}
-	if (copy_from_user(data, setvariable.data, setvariable.data_size)) {
-		rv = -EFAULT;
-		goto out;
+		return PTR_ERR(data);
 	}
 
 	status = efi.set_variable(name, &vendor_guid,
-- 
2.10.0

[toc] | [prev] | [next] | [standalone]


#1503118 — [tip:efi/core] efi/efi_test: Use memdup_user() as a cleanup

Fromtip-bot for Ivan Hu <tipbot@zytor.com>
Date2016-10-18 17:40 +0200
Subject[tip:efi/core] efi/efi_test: Use memdup_user() as a cleanup
Message-ID<stEEF-3BE-23@gated-at.bofh.it>
In reply to#1503055
Commit-ID:  c208ed916e587048ba6b69840d08324100d7d325
Gitweb:     http://git.kernel.org/tip/c208ed916e587048ba6b69840d08324100d7d325
Author:     Ivan Hu <ivan.hu@canonical.com>
AuthorDate: Tue, 18 Oct 2016 15:33:16 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 18 Oct 2016 17:11:19 +0200

efi/efi_test: Use memdup_user() as a cleanup

Fix coccicheck warning which recommends to use memdup_user().

This patch fixes the following coccicheck warnings:

  drivers/firmware/efi/test/efi_test.c:269:8-15: WARNING opportunity for memdup_user

Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20161018143318.15673-7-matt@codeblueprint.co.uk
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 drivers/firmware/efi/test/efi_test.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/firmware/efi/test/efi_test.c b/drivers/firmware/efi/test/efi_test.c
index bb26e12..8cd578f 100644
--- a/drivers/firmware/efi/test/efi_test.c
+++ b/drivers/firmware/efi/test/efi_test.c
@@ -265,14 +265,10 @@ static long efi_runtime_set_variable(unsigned long arg)
 			return rv;
 	}
 
-	data = kmalloc(setvariable.data_size, GFP_KERNEL);
-	if (!data) {
+	data = memdup_user(setvariable.data, setvariable.data_size);
+	if (IS_ERR(data)) {
 		kfree(name);
-		return -ENOMEM;
-	}
-	if (copy_from_user(data, setvariable.data, setvariable.data_size)) {
-		rv = -EFAULT;
-		goto out;
+		return PTR_ERR(data);
 	}
 
 	status = efi.set_variable(name, &vendor_guid,

[toc] | [prev] | [next] | [standalone]


#1503062 — [PATCH 8/8] efi: efivar_ssdt_load: Don't return success on allocation failure

FromMatt Fleming <matt@codeblueprint.co.uk>
Date2016-10-18 16:40 +0200
Subject[PATCH 8/8] efi: efivar_ssdt_load: Don't return success on allocation failure
Message-ID<stDIE-2X6-105@gated-at.bofh.it>
In reply to#1503047
From: Dan Carpenter <dan.carpenter@oracle.com>

We should return -ENOMEM here, instead of success.

Fixes: 475fb4e8b2f4 ("efi / ACPI: load SSTDs from EFI variables")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 drivers/firmware/efi/efi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index 1ac199cd75e7..a4944e22f294 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -259,8 +259,10 @@ static __init int efivar_ssdt_load(void)
 		}
 
 		data = kmalloc(size, GFP_KERNEL);
-		if (!data)
+		if (!data) {
+			ret = -ENOMEM;
 			goto free_entry;
+		}
 
 		ret = efivar_entry_get(entry, NULL, &size, data);
 		if (ret) {
-- 
2.10.0

[toc] | [prev] | [next] | [standalone]


#1503116 — [tip:efi/core] efi/efivar_ssdt_load: Don't return success on allocation failure

Fromtip-bot for Dan Carpenter <tipbot@zytor.com>
Date2016-10-18 17:40 +0200
Subject[tip:efi/core] efi/efivar_ssdt_load: Don't return success on allocation failure
Message-ID<stEEF-3BE-19@gated-at.bofh.it>
In reply to#1503062
Commit-ID:  a75dcb5848359f488c32c0aef8711d9bd37a77b8
Gitweb:     http://git.kernel.org/tip/a75dcb5848359f488c32c0aef8711d9bd37a77b8
Author:     Dan Carpenter <dan.carpenter@oracle.com>
AuthorDate: Tue, 18 Oct 2016 15:33:18 +0100
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 18 Oct 2016 17:11:20 +0200

efi/efivar_ssdt_load: Don't return success on allocation failure

We should return -ENOMEM here, instead of success.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Fixes: 475fb4e8b2f4 ("efi / ACPI: load SSTDs from EFI variables")
Link: http://lkml.kernel.org/r/20161018143318.15673-9-matt@codeblueprint.co.uk
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 drivers/firmware/efi/efi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index 1ac199c..a4944e2 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -259,8 +259,10 @@ static __init int efivar_ssdt_load(void)
 		}
 
 		data = kmalloc(size, GFP_KERNEL);
-		if (!data)
+		if (!data) {
+			ret = -ENOMEM;
 			goto free_entry;
+		}
 
 		ret = efivar_entry_get(entry, NULL, &size, data);
 		if (ret) {

[toc] | [prev] | [next] | [standalone]


#1503099

FromArd Biesheuvel <ard.biesheuvel@linaro.org>
Date2016-10-18 17:30 +0200
Message-ID<stEuZ-3xx-3@gated-at.bofh.it>
In reply to#1503047
On 18 October 2016 at 16:25, Ingo Molnar <mingo@kernel.org> wrote:
>
> * Matt Fleming <matt@codeblueprint.co.uk> wrote:
>
>> Folks, please queue up the following small changes for v4.10.
>
> Applied, thanks Matt!
>
>> Note that there is a patch to MAINTAINERS in this pull request that
>> adds Ard as EFI co-maintainer. It'd probably be a good idea to send
>> that to Linus before v4.10.
>
> Ok, queued that for efi/urgent.
>

Thanks. Before you pass that on, though, I have an other patch to go
on top. Will send that out in a minute

Cheers,
Ard.

[toc] | [prev] | [next] | [standalone]


#1503106

FromIngo Molnar <mingo@kernel.org>
Date2016-10-18 17:30 +0200
Message-ID<stEuZ-3xx-5@gated-at.bofh.it>
In reply to#1503047
* Matt Fleming <matt@codeblueprint.co.uk> wrote:

> Folks, please queue up the following small changes for v4.10.

Applied, thanks Matt!

> Note that there is a patch to MAINTAINERS in this pull request that
> adds Ard as EFI co-maintainer. It'd probably be a good idea to send
> that to Linus before v4.10.

Ok, queued that for efi/urgent.

Thanks,

	Ingo

[toc] | [prev] | [next] | [standalone]


#1503113

FromLukas Wunner <lukas@wunner.de>
Date2016-10-18 17:40 +0200
Message-ID<stEEF-3BE-15@gated-at.bofh.it>
In reply to#1503047
On Tue, Oct 18, 2016 at 03:33:10PM +0100, Matt Fleming wrote:
> Folks, please queue up the following small changes for v4.10.

These are all fixes.  Did you mean 4.9?  Ingo only queued up
the MAINTAINERS patch for 4.9 now, the rest for 4.10.

Lukas

[toc] | [prev] | [next] | [standalone]


#1503144

FromMatt Fleming <matt@codeblueprint.co.uk>
Date2016-10-18 17:50 +0200
Message-ID<stEOm-3Fs-23@gated-at.bofh.it>
In reply to#1503113
On Tue, 18 Oct, at 05:34:36PM, Lukas Wunner wrote:
> On Tue, Oct 18, 2016 at 03:33:10PM +0100, Matt Fleming wrote:
> > Folks, please queue up the following small changes for v4.10.
> 
> These are all fixes.  Did you mean 4.9?  Ingo only queued up
> the MAINTAINERS patch for 4.9 now, the rest for 4.10.

No, I meant v4.10. They are not all fixes, some are new features (like
the framebuffer changes from Peter) and none of them are critical
fixes that would warrant being merged into urgent.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web