linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Yu Zhao <yuzhao@google.com>
To: Suren Baghdasaryan <surenb@google.com>
Cc: akpm@linux-foundation.org, kent.overstreet@linux.dev,
	 pasha.tatashin@soleen.com, rppt@kernel.org,
	souravpanda@google.com,  00107082@163.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,
	 kernel test robot <oliver.sang@intel.com>
Subject: Re: [PATCH 1/2] alloc_tag: fix module allocation tags populated area calculation
Date: Mon, 2 Dec 2024 15:18:35 -0700	[thread overview]
Message-ID: <CAOUHufZdJEidYts3ZY+=oSReWNVakVovUQsRpuxKH=ogNxqVHw@mail.gmail.com> (raw)
In-Reply-To: <20241130001423.1114965-1-surenb@google.com>

On Fri, Nov 29, 2024 at 5:14 PM Suren Baghdasaryan <surenb@google.com> wrote:
>
> vm_module_tags_populate() calculation of the populated area assumes that
> area starts at a page boundary and therefore when new pages are allocation,
> the end of the area is page-aligned as well. If the start of the area is
> not page-aligned then allocating a page and incrementing the end of the
> area by PAGE_SIZE leads to an area at the end but within the area boundary
> which is not populated. Accessing this are will lead to a kernel panic.
> Fix the calculation by down-aligning the start of the area and using that
> as the location allocated pages are mapped to.
>
> Fixes: 0f9b685626da ("alloc_tag: populate memory for module tags as needed")
> Reported-by: kernel test robot <oliver.sang@intel.com>
> Closes: https://lore.kernel.org/oe-lkp/202411132111.6a221562-lkp@intel.com
> Signed-off-by: Suren Baghdasaryan <surenb@google.com>

Acked-by: Yu Zhao <yuzhao@google.com>


      parent reply	other threads:[~2024-12-02 22:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-30  0:14 Suren Baghdasaryan
2024-11-30  0:14 ` [PATCH 2/2] alloc_tag: fix set_codetag_empty() when !CONFIG_MEM_ALLOC_PROFILING_DEBUG Suren Baghdasaryan
2024-12-02 22:18 ` Yu Zhao [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='CAOUHufZdJEidYts3ZY+=oSReWNVakVovUQsRpuxKH=ogNxqVHw@mail.gmail.com' \
    --to=yuzhao@google.com \
    --cc=00107082@163.com \
    --cc=akpm@linux-foundation.org \
    --cc=kent.overstreet@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=oliver.sang@intel.com \
    --cc=pasha.tatashin@soleen.com \
    --cc=rppt@kernel.org \
    --cc=souravpanda@google.com \
    --cc=surenb@google.com \
    /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