linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Muhammad Usama Anjum <usama.anjum@collabora.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Muhammad Usama Anjum <usama.anjum@collabora.com>,
	Shuah Khan <shuah@kernel.org>, Mike Rapoport <rppt@kernel.org>,
	James Bottomley <James.Bottomley@HansenPartnership.com>,
	kernel@collabora.com, "kernelci.org bot" <bot@kernelci.org>,
	linux-mm@kvack.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests: secretmem: Floor the memory size to the multiple of page_size
Date: Fri, 15 Dec 2023 12:56:08 +0500	[thread overview]
Message-ID: <90939a1f-8519-4645-b869-5c1f8e701a3c@collabora.com> (raw)
In-Reply-To: <20231214114056.ec687939a411961db10e73df@linux-foundation.org>

Hi Andrew,

On 12/15/23 12:40 AM, Andrew Morton wrote:
> On Thu, 14 Dec 2023 15:19:30 +0500 Muhammad Usama Anjum <usama.anjum@collabora.com> wrote:
> 
>> The "locked-in-memory size" limit per process can be non-multiple of
>> page_size. The mmap() fails if we try to allocate locked-in-memory
>> with same size as the allowed limit if it isn't multiple of the
>> page_size because mmap() rounds off the memory size to be allocated
>> to next multiple of page_size.
>>
>> Fix this by flooring the length to be allocated with mmap() to the
>> previous multiple of the page_size.
> 
> I'd like to understand how this was noticed, what the ongoing effect
> might be, etc.  To help decide which kernel version(s) need the patch.
This was getting triggered on KernelCI regularly because of different
ulimit settings which wasn't multiple of the page_size. Find logs here:
https://linux.kernelci.org/test/plan/id/657654bd8e81e654fae13532/ The bug
in was present from the time test was first added.
> 
>> Fixes: 76fe17ef588a ("secretmem: test: add basic selftest for memfd_secret(2)")
>> Reported-by: "kernelci.org bot" <bot@kernelci.org>
> 
> Which is one of the reasons we're now placing a Closes: tag after a
> Reported-by:.
I was looking for email report from KernelCI. But I didn't find it. Not
sure if we can do something like following:
Closes: https://linux.kernelci.org/test/plan/id/657654bd8e81e654fae13532/

> 
> 

-- 
BR,
Muhammad Usama Anjum


  reply	other threads:[~2023-12-15  7:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-14 10:19 Muhammad Usama Anjum
2023-12-14 19:40 ` Andrew Morton
2023-12-15  7:56   ` Muhammad Usama Anjum [this message]
2023-12-15 10:59 ` Mike Rapoport
2023-12-15 13:26   ` Muhammad Usama Anjum

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=90939a1f-8519-4645-b869-5c1f8e701a3c@collabora.com \
    --to=usama.anjum@collabora.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=bot@kernelci.org \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rppt@kernel.org \
    --cc=shuah@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