lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEemH2dtDCe1SPRTfHAmh8s75mek1jh7MwTiiTfWMq1N2AA89Q@mail.gmail.com>
Date:   Thu, 26 Oct 2017 17:47:39 +0800
From:   Li Wang <liwang@...hat.com>
To:     Martin Schwidefsky <schwidefsky@...ibm.com>
Cc:     linux-kernel@...r.kernel.org, linux-s390@...r.kernel.org,
        heiko.carstens@...ibm.com, mingo@...nel.org, hughd@...gle.com,
        paul.gortmaker@...driver.com, mhocko@...e.com,
        Shu Wang <shuwang@...hat.com>
Subject: Re: [PATCH] s390/mm: return -ENOMEM in arch_get_unmapped_area[_topdown]

On Thu, Oct 26, 2017 at 5:26 PM, Martin Schwidefsky
<schwidefsky@...ibm.com> wrote:
> On Thu, 26 Oct 2017 15:36:10 +0800
> Li Wang <liwang@...hat.com> wrote:
>
>> That would be very hard to get -ENOMEM returned in crst_table_upgrade()
>> because the condition(addr + len <= TASK_SIZE) makes all 'end' value
>> is smaller/equal than 'TASK_SIZE_TASK'. So let's move it to the upper
>> layer.
>
> I have a hard time understanding what scenario you describe. There is no
> 'TASK_SIZE_TASK', only TASK_SIZE, TASK_SIZE_OF and TASK_SIZE_MAX.

Sorry for the typo, I was thinking about to write TASK_SIZE_MAX.

>
> The code in mmap.c checks for the per-task limit, 31-bit vs 64-bit.
> pgalloc.c checks for the maximum allowed address and does not care
> about the task.
>
>> Fixes: 8ab867cb0806 (s390/mm: fix BUG_ON in crst_table_upgrade)
>> Signed-off-by: Li Wang <liwang@...hat.com>
>
> I don't think this patch fixes anything.

At least there is a logic error i think, after apply the patch
"s390/mm: fix BUG_ON in crst_table_upgrade",
it makes no sense to compare "if (end >= TASK_SIZE_MAX) return
-ENOMEM" in crst_table_upgrade() function.

isn't it?


Thanks for reviewing quick.


-- 
Li Wang
liwang@...hat.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ