lkml.org 
[lkml]   [2023]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] selftests: secretmem: Floor the memory size to the multiple of page_size
From
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

\
 
 \ /
  Last update: 2023-12-15 08:57    [W:0.059 / U:2.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site