Skip to content

Commit cd57e44

Browse files
committed
exec: Remove FOLL_FORCE for stack setup
It does not appear that FOLL_FORCE should be needed for setting up the stack pages. They are allocated using the nascent brpm->vma, which was newly created with VM_STACK_FLAGS, which an arch can override, but they all appear to include VM_WRITE | VM_MAYWRITE. Remove FOLL_FORCE. Cc: Eric Biederman <ebiederm@xmission.com> Cc: David Hildenbrand <david@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: linux-fsdevel@vger.kernel.org Cc: linux-mm@kvack.org Link: https://lore.kernel.org/lkml/202211171439.CDE720EAD@keescook/ Signed-off-by: Kees Cook <keescook@chromium.org>
1 parent dc64cc1 commit cd57e44

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/exec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos,
200200
{
201201
struct page *page;
202202
int ret;
203-
unsigned int gup_flags = FOLL_FORCE;
203+
unsigned int gup_flags = 0;
204204

205205
#ifdef CONFIG_STACK_GROWSUP
206206
if (write) {

0 commit comments

Comments
 (0)