Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp632065ybk; Sat, 9 May 2020 13:21:36 -0700 (PDT) X-Google-Smtp-Source: APiQypKvWNcCDd5QDyNIfdrx+5/8AgR69enjcZJjJplZHjlp5iXGwvIzgSI3Tx1g+JY244SItkVI X-Received: by 2002:a17:907:396:: with SMTP id ss22mr6706534ejb.226.1589055696624; Sat, 09 May 2020 13:21:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589055696; cv=none; d=google.com; s=arc-20160816; b=JGnxT7nKThyPdjLoVo6S2E+3RWEPI4uk0FGDanUi7CRp3B7QunZXthhAS1VKWac2ZQ zN5ij2olVL0+9+7vSHp9AZ5D2/vGv+sjde7FGGKrjguPIh2w3V9h5W2oyVgc5GbG5QrX unMguSdbI796rbNUJZvzmjGirRWavuITA3N7GEpUqRBt9xTLcUbmMDwvNhzvuBfsJC5p as0oWsnrZ2pu13lu+JgwEpc8ARWtuiI0YJdwwb9chmZMveBwbBCEpEWGrNX2EtkZhfZo t2zXXmqNeLonL6iVCOIFYADr2QekQqXpqtz/FPIQf/7V1YnMcl9E/uavuy6zzcb8vvIw /Hqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=DL22TlRhfdhfFFfvaipbz/lSHTNFSjOxjeAvslhNQxU=; b=xbgQL17X84sY9w6jcOuZZyhORZyWHuyzqhxtM2YFhqMVVtoqYtBDusSDyCUvtoH5JR 8mPaLbIMVteOZc8z5BfFGnnc3pNG9EqHKkrWbNg/YNp6fKdCvRW/iC97jSKvtWUo5eaV TrrFV2Qdx70DTyY/1KOULx0z2bHfVb3jWsQuD9vwaCbG2A+KNy+TZip/TzsRJytmfWH0 RIo1Bhmn1HxL5cXsxEfauKf8Z7V3xOlqawJ17t3rP33KtWsQhTwIxtVXuZXrIv1ia+7K G4/4cY8dACydQqoQd1NDxjBqCeEl/FiCxacJGQKm2UEsUkfjCjg0BbEpw1wjElnGne6J f1AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=J2julx2h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d11si3074335edy.477.2020.05.09.13.21.13; Sat, 09 May 2020 13:21:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=J2julx2h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726908AbgEIUT6 (ORCPT + 99 others); Sat, 9 May 2020 16:19:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725960AbgEIUT6 (ORCPT ); Sat, 9 May 2020 16:19:58 -0400 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF5D5C061A0C for ; Sat, 9 May 2020 13:19:57 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id g4so5306910ljl.2 for ; Sat, 09 May 2020 13:19:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DL22TlRhfdhfFFfvaipbz/lSHTNFSjOxjeAvslhNQxU=; b=J2julx2hs6owd62n+pd2JYhe6q2QsRo1OXAtwsVsruYMJBpnQ8uiFOlguFDfLik7YZ rMAAv0+dFxD8QskYZi9nLX3zKberv3nFnMQyidnzE4Vpn2PvYCSA06ICHQfTj4koWuUf oYf9h4WDijg//VNKhtCcE35X/HOZG3u0J2S3k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DL22TlRhfdhfFFfvaipbz/lSHTNFSjOxjeAvslhNQxU=; b=ITR8u0hhnk4iNt9WoJ8QNcJOiTMqNSKHxSUxqngkuFxLVwXweLcWhVyFNLqyO0doO2 kiXcON0USLvXk54BiRy69uxJc9X0t1DsySw2LkXsKpoWbjynTHfx7jA++nPjauO67cAl TtatCFNuzbj7zW3pmkPCJ2Fjmtfcp0LOtRwhFDI5hPdF8wGi3OqmDYOI6cGCGVNK4I9x /o9zJVpGyoJojkhlMJLr/Mse5yNDQ9cjb1p0GyluKRhtmmLIxFcs5pRrxc+Aks5rali0 pEI+Lpn+eW6n0UuzeIuv8NT7WGhWAJvFssogHWgjSXoZPVdsb77JwQ7CKoLStrtbtT// Hftw== X-Gm-Message-State: AOAM532OwoG6MnCZixVrdc5RGL1uPXOWYFf6UjAWDoxl0ppcyf3XGyg6 mUAysQpDI/9xd06rqiOHwCvTlPBWyFY= X-Received: by 2002:a2e:8813:: with SMTP id x19mr5648830ljh.83.1589055595988; Sat, 09 May 2020 13:19:55 -0700 (PDT) Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com. [209.85.208.173]) by smtp.gmail.com with ESMTPSA id x83sm4995304lfa.65.2020.05.09.13.19.54 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 09 May 2020 13:19:55 -0700 (PDT) Received: by mail-lj1-f173.google.com with SMTP id y4so5294101ljn.7 for ; Sat, 09 May 2020 13:19:54 -0700 (PDT) X-Received: by 2002:a2e:8512:: with SMTP id j18mr5609189lji.201.1589055594669; Sat, 09 May 2020 13:19:54 -0700 (PDT) MIME-Version: 1.0 References: <87h7wujhmz.fsf@x220.int.ebiederm.org> <87sgga6ze4.fsf@x220.int.ebiederm.org> <87v9l4zyla.fsf_-_@x220.int.ebiederm.org> <87k11kzyjm.fsf_-_@x220.int.ebiederm.org> <878si0yijd.fsf@x220.int.ebiederm.org> In-Reply-To: <878si0yijd.fsf@x220.int.ebiederm.org> From: Linus Torvalds Date: Sat, 9 May 2020 13:19:38 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/5] exec: Directly call security_bprm_set_creds from __do_execve_file To: "Eric W. Biederman" Cc: Linux Kernel Mailing List , Oleg Nesterov , Jann Horn , Kees Cook , Greg Ungerer , Rob Landley , Bernd Edlinger , linux-fsdevel , Al Viro , Alexey Dobriyan , Andrew Morton , Casey Schaufler , LSM List , James Morris , "Serge E. Hallyn" , Andy Lutomirski Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 9, 2020 at 1:15 PM Eric W. Biederman wrote: > > I agree something needs to be renamed, to remove confusion. Yeah, the alternative is to rename the capability version. I don't care much which way it goes, although I do think it's best to call out explicitly that the security hook functions get only the "primary" executable brpm info. Which is why I'd prefer to just rename all those low-level security cases. It makes for a slightly bigger patch, but I think it makes for better readability, and makes it explicit that that hook is literally just for the primary executable, not for the interpreter or whatever. Linus