Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3530151pxp; Tue, 8 Mar 2022 16:44:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJwc1615u+Adx2N9zbWEJJFRMfm81i+FZBZ1P/1Yo4gjsGlLIGH2KLGnFMfeoa09qoxi33Xb X-Received: by 2002:a17:90a:65c9:b0:1bd:5b80:5c39 with SMTP id i9-20020a17090a65c900b001bd5b805c39mr7512177pjs.185.1646786669685; Tue, 08 Mar 2022 16:44:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646786669; cv=none; d=google.com; s=arc-20160816; b=Jv8ngSA/IG3U1Mpse2BGMJbna4PMWGIoRRu9yhbhkdEccsluSfeHTSoMy69eiEOkc6 VZrkW4PPShSpmtYPdiSh1WrkZJATn/RM2DJIS+lCRPhrZvFaRiptFeCgNRyeAhc0/l54 b9GCqbAKJOoyajS+7GhnK0hDaGGER2wUaixf+bsfoPYY+vBfnvSIpvzCvRZ7GowReYZ8 QsAqJlgUUMNiGNK9UtI87XlJTYVtV3SBMTa+UMwgBM9B87KNDW/C7BbXqap+NfhoEZbO 5EJri+Lf8A8c8KmBvBJH8q5VDZAAMFwdvnmkPXlo9WcAxhM/J/IJugo7IrglngFpYj6j v7Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=UvxhNuo1pWdGPwLc6pa1lU2igYRccw9Zy2lYHKm+tqE=; b=MphhIS3D9ohB1I1o9EK5SjCAqdsC/iNjxePnf8zAVqRd57q9hLEECqb4YW3hH+wP50 Aaz9kq5qkR9CK9SwB5Ehs9PNDJSuLe6OyegVRoCOEj1h0FiogDkd4cGbRcjLkqPpo1Wq sdNEZTdc9LzAJoZB85DBWDl0JTSjT322ySEFBvDpIQkpkCF/Q1X/QjzcWalKHWD8M5jL jDdWioX22ZPQZQflAQ3wwZZJYVCCDetx9KqX0HnoARXOpt+I5dv1fnTvzJ9X8Ph2Cin0 d2AIi/J22i1XfzkJQbMfkxtsd/BoeVpgBKqL/p7pikHCy1DEfJuIVXrinfejwyWI1c/B Aj+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=j3BGSMMz; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id m26-20020a638c1a000000b0037ffa7f78e0si463649pgd.352.2022.03.08.16.44.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 16:44:29 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=j3BGSMMz; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DABB7D5556; Tue, 8 Mar 2022 16:00:03 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231258AbiCHVue (ORCPT + 99 others); Tue, 8 Mar 2022 16:50:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230304AbiCHVud (ORCPT ); Tue, 8 Mar 2022 16:50:33 -0500 Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F837F69 for ; Tue, 8 Mar 2022 13:49:34 -0800 (PST) Received: by mail-pg1-x52f.google.com with SMTP id o23so253880pgk.13 for ; Tue, 08 Mar 2022 13:49:34 -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=UvxhNuo1pWdGPwLc6pa1lU2igYRccw9Zy2lYHKm+tqE=; b=j3BGSMMz077x39VXI5WDuz3dGrSNFzeWRbnGPrs2GZisCmwxX9g0KzulKe1XNjsdch DNc1a0DMv+yuJBSmE/+3xjeVF6tB1II9fDiI2//2HE2XHm686I1b0MtOirbUcqSfj0wL xhGHDCHOBY5aSxDB2n47oB9IvUh1AhDK91068= 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=UvxhNuo1pWdGPwLc6pa1lU2igYRccw9Zy2lYHKm+tqE=; b=SR+tFp+2hwAEGhjvyW5prXJyHLrAden5E07YbWlTsOUPHTTGHLntfTvbu4W+c4IGuR +9pKj3dWEujKiUETK9F5Qy5ZzL93YqzPpFlYEOvLIsHr/DObJCDkcItvDp0q6i6pVDCl NstI8MiOIoo+rf94i/vDIKqn7/etwwWrfVfAhN+Vz/aQgFQAECter0Xzlh8Q73rRUYhX J8iyv7QBgwHAT44r/lsJ/Azl87xE1Tb+1eGpBm9eVQ1rH1Grh/Q9BwzXakugV9MO1aUC wRxPl0/luIFS22gL1G8I5mt8JlHGH5KcrfVrP7pWMSuXgDKwFQucoa6Gtgjj2vQfrBCM ICug== X-Gm-Message-State: AOAM5324nRhmPu8U5Jtdnwyhp+MnSayUNaXzXrwC+j6L15MsR3WVUoWx YeZudMILgLof7kUKMDH3hAKAgQ== X-Received: by 2002:a63:8bc4:0:b0:380:af7d:4c7a with SMTP id j187-20020a638bc4000000b00380af7d4c7amr1155825pge.162.1646776173626; Tue, 08 Mar 2022 13:49:33 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id d10-20020a056a00198a00b004f72d2c024asm18620pfl.185.2022.03.08.13.49.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 13:49:33 -0800 (PST) Date: Tue, 8 Mar 2022 13:49:32 -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: <202203081342.1924AD9@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87h788fdaw.fsf_-_@email.froward.int.ebiederm.org> X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? If it helps, my workflow look like this, though I assume there might be better ways. (tl;dr: "git tag -s TAG BRANCH") PULL_BRANCH=name-of-branch BASE=sha-of-base FOR=someone TOPIC=topic-name TAG="for-$FOR/$TOPIC" SIGNED=~/.pull-request-signed-"$TAG" echo "$TOPIC update" > "$SIGNED" git request-pull "$BASE" git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git "$PULL_BRANCH" | awk '{print "# " $0}' >> "$SIGNED" vi "$SIGNED" git tag -sF "$SIGNED" "$TAG" "$PULL_BRANCH" git push origin "$PULL_BRANCH" git push origin +"$TAG" -- Kees Cook