From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13D83C433EF for ; Wed, 9 Mar 2022 16:32:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A404F8D0006; Wed, 9 Mar 2022 11:32:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9EF918D0001; Wed, 9 Mar 2022 11:32:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8B8A98D0006; Wed, 9 Mar 2022 11:32:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0202.hostedemail.com [216.40.44.202]) by kanga.kvack.org (Postfix) with ESMTP id 7C4578D0001 for ; Wed, 9 Mar 2022 11:32:18 -0500 (EST) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 3E77C181D6CDB for ; Wed, 9 Mar 2022 16:32:18 +0000 (UTC) X-FDA: 79225390356.29.9565D82 Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) by imf20.hostedemail.com (Postfix) with ESMTP id A729C1C0023 for ; Wed, 9 Mar 2022 16:32:17 +0000 (UTC) Received: by mail-pg1-f180.google.com with SMTP id 27so2388307pgk.10 for ; Wed, 09 Mar 2022 08:32:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=gY50ygEuixJOL5+CoXoow1CeKmNwyNyKxbVe9LukYfQ=; b=PWj3A38TItrhsUjIRjWiaSik+i8qjhK1vVSzvImJ/IP/sBZ1SK16gd+4vLXNQJIbfz fq1MW9biuBNne5pe3fHiUnjTtyl3ymQBVPVACAAd0YvUvvBY80zbJXDXhDENAQEcfLCy w3cs3JW4i8Wm/1fIlJ8U/oZ/PDcWTWgkItkFw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=gY50ygEuixJOL5+CoXoow1CeKmNwyNyKxbVe9LukYfQ=; b=1aM9+OKnR0LaE2z8UQThCXZw6JbkKGkSiflSFqAhMIeoNGNSJstfX+ue9n15Bbddk5 Z2/dSSx593b3kbB75fywQnUJUcnsaBCPE1jVw8MhpgfD1Rf8yMwA7sTdwH+82NJDndVQ foR8UqTZPS43ou/s9j6Nvn5aJXTFeJ8gDcfnHVgzVUi0tUZ9Ffool/yOC+WZQMc/1Uni AHLK3iQRVIu31NN/bcGQ/qws9GsQT4/CYnnOpcUqmsQU8wARp8k6+QHFJlKxYeQ9nv7E fszCdjqq+TgWN5yODfrvmqEYYY28iaHnjgLx2NGVjfWrekp1aOP+7uvSzpj9mc8G6cAJ odxw== X-Gm-Message-State: AOAM530a3COt30m1hZ+pD5NtBAy8WBqVICIrUHVG4JDnSwintB8J0AmC MZ5FHLLtk6WpMs5coZ5MTfAhaA== X-Google-Smtp-Source: ABdhPJwXXZ86osX5c0II41H74ZTE2EneiajZEn1zrtqB/xvvBuaNxf78dej0GeYsUMxEOmzs8vYjZA== X-Received: by 2002:a05:6a00:ad0:b0:4e1:2d96:2ab0 with SMTP id c16-20020a056a000ad000b004e12d962ab0mr549019pfl.3.1646843535989; Wed, 09 Mar 2022 08:32:15 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id q24-20020aa79618000000b004e0e89985eesm3588763pfg.156.2022.03.09.08.32.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Mar 2022 08:32:15 -0800 (PST) Date: Wed, 9 Mar 2022 08:32:14 -0800 From: Kees Cook To: "Eric W. Biederman" Cc: Matthew Wilcox , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Alexander Viro , Denys Vlasenko , Vlastimil Babka , "Liam R . Howlett" , Jann Horn , linux-mm@kvack.org Subject: Re: [GIT PULL] Fix fill_files_note Message-ID: <202203090830.7E971BD6C@keescook> References: <20220131153740.2396974-1-willy@infradead.org> <871r0nriy4.fsf@email.froward.int.ebiederm.org> <877dafq3bw.fsf@email.froward.int.ebiederm.org> <87bkzroica.fsf_-_@email.froward.int.ebiederm.org> <87h788fdaw.fsf_-_@email.froward.int.ebiederm.org> <202203081342.1924AD9@keescook> <877d93dr8p.fsf@email.froward.int.ebiederm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <877d93dr8p.fsf@email.froward.int.ebiederm.org> X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: A729C1C0023 X-Stat-Signature: pwwojnphpjg4df16uq3n6im933gnq71d Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=PWj3A38T; dmarc=pass (policy=none) header.from=chromium.org; spf=pass (imf20.hostedemail.com: domain of keescook@chromium.org designates 209.85.215.180 as permitted sender) smtp.mailfrom=keescook@chromium.org X-HE-Tag: 1646843537-7524 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Mar 09, 2022 at 10:29:10AM -0600, Eric W. Biederman wrote: > Kees Cook writes: > > > On Tue, Mar 08, 2022 at 01:35:03PM -0600, Eric W. Biederman wrote: > >> > >> Kees, > >> > >> Please pull the coredump-vma-snapshot-fix branch from the git tree: > >> > >> git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git coredump-vma-snapshot-fix > >> > >> HEAD: 390031c942116d4733310f0684beb8db19885fe6 coredump: Use the vma snapshot in fill_files_note > >> > >> Matthew Wilcox has reported that a missing mmap_lock in file_files_note, > >> which could cause trouble. > >> > >> Refactor the code and clean it up so that the vma snapshot makes > >> it to fill_files_note, and then use the vma snapshot in fill_files_note. > >> > >> Eric W. Biederman (5): > >> coredump: Move definition of struct coredump_params into coredump.h > >> coredump: Snapshot the vmas in do_coredump > >> coredump: Remove the WARN_ON in dump_vma_snapshot > >> coredump/elf: Pass coredump_params into fill_note_info > >> coredump: Use the vma snapshot in fill_files_note > >> > >> fs/binfmt_elf.c | 66 ++++++++++++++++++++++-------------------------- > >> fs/binfmt_elf_fdpic.c | 18 +++++-------- > >> fs/binfmt_flat.c | 1 + > >> fs/coredump.c | 59 ++++++++++++++++++++++++++++--------------- > >> include/linux/binfmts.h | 13 +--------- > >> include/linux/coredump.h | 20 ++++++++++++--- > >> 6 files changed, 93 insertions(+), 84 deletions(-) > >> > >> --- > >> > >> Kees I realized I needed to rebase this on Jann Horn's commit > >> 84158b7f6a06 ("coredump: Also dump first pages of non-executable ELF > >> libraries"). Unfortunately before I got that done I got distracted and > >> these changes have been sitting in limbo for most of the development > >> cycle. Since you are running a tree that is including changes like this > >> including Jann's can you please pull these changes into your tree. > > > > Sure! Can you make a signed tag for this pull? > > Not yet. > > Hopefully I will get the time to set that up soon, but I am not at all > setup to do signed tags at this point. Okay, cool. Since I'd already review these before, I've pulled and it should be in -next now. > [...] > Thanks. That looks like a good place to start. I will try to clean up that work-flow and stuff it into my kernel-tools repo. -- Kees Cook