public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Waiman Long <longman@redhat.com>
Cc: Ard Biesheuvel <ardb@kernel.org>, Will Deacon <will@kernel.org>,
	linux-efi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64/efi: Fix kmemleak false positive in arm64_efi_rt_init()
Date: Thu, 13 Jun 2024 18:19:07 +0100	[thread overview]
Message-ID: <ZmsqC_q1jyMGzvUF@arm.com> (raw)
In-Reply-To: <20240613162031.142224-1-longman@redhat.com>

On Thu, Jun 13, 2024 at 12:20:31PM -0400, Waiman Long wrote:
> diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c
> index 4a92096db34e..712718aed5dd 100644
> --- a/arch/arm64/kernel/efi.c
> +++ b/arch/arm64/kernel/efi.c
> @@ -9,6 +9,7 @@
>  
>  #include <linux/efi.h>
>  #include <linux/init.h>
> +#include <linux/kmemleak.h>
>  #include <linux/screen_info.h>
>  #include <linux/vmalloc.h>
>  
> @@ -213,6 +214,7 @@ l:	if (!p) {
>  		return -ENOMEM;
>  	}
>  
> +	kmemleak_not_leak(p);
>  	efi_rt_stack_top = p + THREAD_SIZE;

It looks like a false positive and the reason is that we only store
p + THREAD_SIZE in efi_rt_stack_top, not the actual allocated pointer.

-- 
Catalin


      parent reply	other threads:[~2024-06-13 17:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-13 16:20 [PATCH] arm64/efi: Fix kmemleak false positive in arm64_efi_rt_init() Waiman Long
2024-06-13 16:25 ` Ard Biesheuvel
2024-06-13 17:19 ` Catalin Marinas [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=ZmsqC_q1jyMGzvUF@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=ardb@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=will@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