Re: [PATCH -mmotm] efi: drop kmemleak_ignore() for page allocator

2018-12-29 Thread Qian Cai
On 12/29/18 4:17 AM, Ard Biesheuvel wrote: > On Fri, 28 Dec 2018 at 04:04, Andrew Morton wrote: >> >> On Wed, 26 Dec 2018 16:31:59 +0100 Ard Biesheuvel >> wrote: >> >>> Please stop sending EFI patches if you can't be bothered to >>> test/reproduce against the EFI tree. >> >> um, sorry, but

Re: [PATCH -mmotm] efi: drop kmemleak_ignore() for page allocator

2018-12-26 Thread Qian Cai
On 12/26/18 7:02 AM, Ard Biesheuvel wrote: > On Wed, 26 Dec 2018 at 03:35, Qian Cai wrote: >> >> a0fc5578f1d (efi: Let kmemleak ignore false positives) is no longer >> needed due to efi_mem_reserve_persistent() uses __get_free_page() >> instead where kmemelak is n

[PATCH -mmotm] efi: drop kmemleak_ignore() for page allocator

2018-12-25 Thread Qian Cai
t; Signed-off-by: Qian Cai --- drivers/firmware/efi/efi.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c index 7ac09dd8f268..4c46ff6f2242 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c @@ -31,7 +31,6 @@

Re: BUG: sleeping function called from invalid context at mm/slab.h:421

2018-11-08 Thread Qian Cai
Looks like more of an EFI issue where it called efi_mem_reserve_persistent(). > Sent: Thursday, November 08, 2018 at 11:23 AM > From: "Qian Cai" > To: linux-ker...@vger.kernel.org > Cc: linux...@kvack.org > Subject: BUG: sleeping function called from invalid context

Re: [PATCH] efi: permit calling efi_mem_reserve_persistent from atomic context

2018-11-08 Thread Qian Cai
needs to be moved into an init hook since we cannot control the > memory allocation behavior of memremap() at the call site. > > Signed-off-by: Ard Biesheuvel Tested-by: Qian Cai

Re: [PATCH] efi: permit calling efi_mem_reserve_persistent from atomic context

2018-11-09 Thread Qian Cai
On 11/8/18 at 1:05 PM, Ard Biesheuvel wrote: > Currently, efi_mem_reserve_persistent() may not be called from atomic > context, since both the kmalloc() call and the memremap() call may > sleep. > > The kmalloc() call is easy enough to fix, but the memremap() call > needs to be moved into an

Re: Object debugging warning from efivar

2018-11-10 Thread Qian Cai
> On Nov 10, 2018, at 6:48 AM, Ard Biesheuvel wrote: > > On 9 November 2018 at 23:19, Qian Cai wrote: >> Booting this aarch64 server with the latest mainline (3541833fd1f2) get this >> warning >> using object debugging. Any idea? >> > &g

Re: [PATCH] efi: permit calling efi_mem_reserve_persistent from atomic context

2018-11-11 Thread Qian Cai
> On Nov 9, 2018, at 9:45 PM, Qian Cai wrote: > > > On 11/8/18 at 1:05 PM, Ard Biesheuvel wrote: > >> Currently, efi_mem_reserve_persistent() may not be called from atomic >> context, since both the kmalloc() call and the memremap() call may >> sleep.

Re: [PATCH] efi: permit calling efi_mem_reserve_persistent from atomic context

2018-11-12 Thread Qian Cai
On 11/12/18 at 3:32 AM, Marc Zyngier wrote: > On Mon, 12 Nov 2018 02:45:48 +, > Qian Cai wrote: > > > > > > > > > On Nov 9, 2018, at 9:45 PM, Qian Cai wrote: > > > > > > > > > On 11/8/18 at 1:05 PM, Ard Biesheuvel wrot

kmemleak reports leaking in efi_mem_reserve_persistent()

2018-11-28 Thread Qian Cai
unreferenced object 0x8096c1acf580 (size 128): comm "swapper/63", pid 0, jiffies 4294937418 (age 1201.230s) hex dump (first 32 bytes): 80 87 b5 c1 96 00 00 00 00 00 cc c2 16 00 00 00 00 00 01 00 00 00 00 00 6b 6b 6b 6b 6b 6b 6b 6b backtrace:

[PATCH] efi: let kmemleak ignore false positives

2018-11-29 Thread Qian Cai
e to "rsv" will only reference to other physical addresses, rsv->next = efi_memreserve_root->next; efi_memreserve_root->next = __pa(rsv); Signed-off-by: Qian Cai --- drivers/firmware/efi/efi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/firmware/efi/efi.c b/

[RESEND PATCH] efi: let kmemleak ignore false positives

2018-12-06 Thread Qian Cai
e to "rsv" will only reference to other physical addresses, rsv->next = efi_memreserve_root->next; efi_memreserve_root->next = __pa(rsv); Signed-off-by: Qian Cai --- drivers/firmware/efi/efi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/firmware/efi/efi.c

Re: [RESEND PATCH] efi: let kmemleak ignore false positives

2018-12-06 Thread Qian Cai
On Thu, 2018-12-06 at 19:01 +0100, Ard Biesheuvel wrote: > On Thu, 6 Dec 2018 at 19:00, Catalin Marinas wrote: > > > > On Thu, Dec 06, 2018 at 11:16:33AM -0500, Qian Cai wrote: > > > unreferenced object 0x8096c1acf580 (size 128): > > >   comm "swapp

Re: [RESEND PATCH] efi: let kmemleak ignore false positives

2018-12-07 Thread Qian Cai
On 12/7/18 at 6:28 AM, Ard Biesheuvel wrote: > On Thu, 6 Dec 2018 at 19:05, Qian Cai wrote: > > > > On Thu, 2018-12-06 at 19:01 +0100, Ard Biesheuvel wrote: > > > On Thu, 6 Dec 2018 at 19:00, Catalin Marinas > > > wrote: > > > > > > >

[PATCH -next] efi/arm64: return zero from ptdump_init()

2019-02-04 Thread Qian Cai
f non-void function [-Wreturn-type] Fixes: e2a2e56e4082 ("arm64: dump: no need to check return value of debugfs_create functions") Signed-off-by: Qian Cai --- drivers/firmware/efi/arm-runtime.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/firmwar

[PATCH] x86/efi: fix a -Wtype-limits compilation warning

2019-05-31 Thread Qian Cai
Compiling a kernel with W=1 generates this warning, arch/x86/platform/efi/quirks.c:731:16: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] Signed-off-by: Qian Cai --- arch/x86/platform/efi/quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

"arm64: Silence gcc warnings about arch ABI drift" breaks clang

2019-06-07 Thread Qian Cai
The linux-next commit "arm64: Silence gcc warnings about arch ABI drift" [1] breaks clang build where it screams that unknown option "-Wno-psabi" and generates errors below, [1] https://lore.kernel.org/linux-arm-kernel/1559817223-32585-1-git-send-email-D ave.mar...@arm.com/

Re: "arm64: Silence gcc warnings about arch ABI drift" breaks clang

2019-06-07 Thread Qian Cai
On Fri, 2019-06-07 at 16:25 +0100, Will Deacon wrote: > On Fri, Jun 07, 2019 at 11:22:45AM -0400, Qian Cai wrote: > > The linux-next commit "arm64: Silence gcc warnings about arch ABI drift" [1] > > breaks clang build where it screams that unknown option "-Wno-psabi&q

[RESEND PATCH] x86/efi: fix a -Wtype-limits compilation warning

2019-06-07 Thread Qian Cai
Compiling a kernel with W=1 generates this warning, arch/x86/platform/efi/quirks.c:731:16: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] Signed-off-by: Qian Cai --- arch/x86/platform/efi/quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[PATCH -next] efi/tpm: fix a compilation warning

2019-06-11 Thread Qian Cai
/linux-efi/20190520205501.177637-3-matthewgarr...@google.com/ Signed-off-by: Qian Cai --- drivers/firmware/efi/tpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/efi/tpm.c b/drivers/firmware/efi/tpm.c index 74d0cd1647b8..1d3f5ca3eaaf 100644 --- a/drivers/fi

[PATCH v2] x86/efi: fix a -Wtype-limits compilation warning

2019-06-19 Thread Qian Cai
Compiling a kernel with W=1 generates this warning, arch/x86/platform/efi/quirks.c:731:16: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] Fixes: 3425d934fc03 ("efi/x86: Handle page faults occurring while running EFI runtime services") Signed-off

[PATCH] arm64/efi: fix variable 'si' set but not used

2019-07-30 Thread Qian Cai
-by: Qian Cai --- arch/arm64/include/asm/efi.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/efi.h b/arch/arm64/include/asm/efi.h index 8e79ce9c3f5c..76a144702586 100644 --- a/arch/arm64/include/asm/efi.h +++ b/arch/arm64/include/asm/efi.h @@ -105,7