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] [day] [month] [year] [list]
Message-ID: <853d7e18-f264-7b1d-b5f5-1b11c2eba8a2@huaweicloud.com>
Date:   Mon, 11 Sep 2023 10:04:43 +0800
From:   Xiu Jianfeng <xiujianfeng@...weicloud.com>
To:     Andrew Morton <akpm@...ux-foundation.org>,
        Xiu Jianfeng <xiujianfeng@...weicloud.com>
Cc:     Liam.Howlett@...cle.com, willy@...radead.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: remove duplicated vma->vm_flags check when expanding
 stack

Hi,

On 2023/9/11 5:26, Andrew Morton wrote:
> On Wed,  6 Sep 2023 10:33:12 +0000 Xiu Jianfeng <xiujianfeng@...weicloud.com> wrote:
> 
>> expand_upwards() and expand_downwards() will return -EFAULT if VM_GROWSUP
>> or VM_GROWSDOWN is not correctly set in vma->vm_flags, however in
>> !CONFIG_STACK_GROWSUP case, expand_stack_locked() returns -EINVAL first
>> if !(vma->vm_flags & VM_GROWSDOWN) before calling expand_downwards(), to
>> keep the consistency with CONFIG_STACK_GROWSUP case, remove this check.
> 
> What are the user-visible effects of this change?
> 
> Do you believe this fix should be backported into earlier kernel versions?

The usages of this function are as bellow:

A:fs/exec.c
ret = expand_stack_locked(vma, stack_base);
if (ret)
	ret = -EFAULT;

or

B:mm/memory.c mm/mmap.c
if (expand_stack_locked(vma, addr))
	return NULL;

which means the return value will not propagate to other places, so I
believe there is no user-visible effects of this change, and it's
unnecessary to backport to earlier versions.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ