Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp781475ybt; Fri, 10 Jul 2020 12:13:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+O4PHx3Q3j99qzB5b5jH1G2LCT+xPw7fhWmSvv2vi+XxCxTOnnojOp4rejbFlu6mQuk7H X-Received: by 2002:a17:906:f117:: with SMTP id gv23mr34565339ejb.528.1594408385119; Fri, 10 Jul 2020 12:13:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594408385; cv=none; d=google.com; s=arc-20160816; b=lxqs2NLQ7Nt2bgUW7yEyy00dnKy81m37ltRYtDPuLkIp+imVEnILe7sF9+TYdhz+yH x3Eb77gNblKS7pEsQpcWE96fDHWDOqB1DulB2LmIK8j+dFXLDL0SQpNWjjgs6+xcdSMa gOjVFQphVa5xuM6AzrNuEAU5anipSrTMHmNWxxjqdG6HWR4rZg+viX23KVP10Xr8CDiZ XwcqrAJjIPsD4Im+yc0uHTHvAS/taEnICCPrdZeWoiAsf9QW/ThGz1iK7aUakGwwrnqz d3R3gHGrrviHRZNHxxYq87ChdsC4Tt3g8auzVKmkvHzan8LTTn0JJxP8T3Ik3a22/Vvp TADQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=582VRj/VJwwb7prbjaxkyll1K6MbDwCmO8P8dCgcGHc=; b=XipOz4hpGLebO/z0U5sYbIIJmzjWNWdaomvwyQyBM3dWFJncue75Pwbo256Pv+Wn1K ZBVoIuVQNPUN5pTfXKCvqCexm+Lz3+3D1PTjCBHHqjY4biHXq5HdQEIvah3UiaV6+Z38 GAdPM4q0begpel6YSY0qsn+FJfRb26HQzynHPF6A/gF8k7xJ+C3OcY8C3UgV+RevaC25 mx4Se3CUonqF6cDqCJ1oAwxujp68M/U/8PXh8kB4K0QjiBphlXTEs6jEamD6e4NQn5rh eSYKAO56yASqVCoxtelbQA3APqfNjmRQX6OBXOjMMOHJ0EQx0ld0G9rvZ+REOC7vsqSl lRAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tycho-ws.20150623.gappssmtp.com header.s=20150623 header.b=bQJO4WQE; 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 j18si4835943edp.389.2020.07.10.12.12.42; Fri, 10 Jul 2020 12:13:05 -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=@tycho-ws.20150623.gappssmtp.com header.s=20150623 header.b=bQJO4WQE; 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 S1728031AbgGJTK1 (ORCPT + 99 others); Fri, 10 Jul 2020 15:10:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726725AbgGJTK1 (ORCPT ); Fri, 10 Jul 2020 15:10:27 -0400 Received: from mail-ot1-x341.google.com (mail-ot1-x341.google.com [IPv6:2607:f8b0:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 212EBC08C5DC for ; Fri, 10 Jul 2020 12:10:26 -0700 (PDT) Received: by mail-ot1-x341.google.com with SMTP id t18so4955261otq.5 for ; Fri, 10 Jul 2020 12:10:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tycho-ws.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=582VRj/VJwwb7prbjaxkyll1K6MbDwCmO8P8dCgcGHc=; b=bQJO4WQEKPqHrwFpYLeO5L7XONJQ3KUqs0G4Ot2TTtpdaEsCc4wVPrntpu7OuemSk0 eDeaWvMLEAk2tUVuyf3Rz3BZpl8lAbohLHulkSzwRNdyLU9FIUOkBsOI9laZFBV4QGJg FydYJdwXx5lPNUTI8BIqUAF69MGUX1Kh9/Y1QedNWc+T20JRkwRRBgtCiELvllbU+1pV HR9K9myJtZFfLWOjikHe/xbXSKT7O7JaEDV+II3YBC8jvC0D4Xe1Wn3c9+ZkKK9LdScq lpbGdcl46l06TkTCOnWbJ2MwHW93Lsh9Lq7rFs0OFCsFM2nx6ez7JGfmr5cYASOJIHFp alsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=582VRj/VJwwb7prbjaxkyll1K6MbDwCmO8P8dCgcGHc=; b=EWNKmIGXKVDt4XJ1MzqWdOVZc3XrZ2vnLniWD6mHIx0eCsvPok7hZMkz09Y4BlNRuW ruTfw10osd6yKBJO95sVDTenioncnIKP1uRkj+/G/4gahHOhcQ8mG/UINrUCzb+5YLdY qUF+rSC6ebuf6OZB5N3CQZelaHNuy8Cs7ALazh4DbbdTIzPFRka2/RQDLJae6/yxproy lkhSykJfxsYtK3N9Vy/iv4//Ony6SAO9eW3UGWLcHwZgbU9fpAwp5BTkafZJ1ydkUYmg 4d2UJu88tSle9dLfm/PCbXTkFR1DM9lYbbNTFrVa0ulXkiql0rtndfwSEW4VnQwbv7I/ 4oqA== X-Gm-Message-State: AOAM531wQiS1CUKjZwufVP1Z3ARGedgT4RuQBElWbHrSnCGWRBmI+5au q8p/0xcBew+otaIjEz4rM5YhmzI4hto= X-Received: by 2002:a05:6830:1acb:: with SMTP id r11mr17224349otc.311.1594408225394; Fri, 10 Jul 2020 12:10:25 -0700 (PDT) Received: from cisco ([2601:282:902:b340:dd70:9e19:5b5e:7f32]) by smtp.gmail.com with ESMTPSA id t10sm1234852otd.78.2020.07.10.12.10.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2020 12:10:24 -0700 (PDT) Date: Fri, 10 Jul 2020 13:10:23 -0600 From: Tycho Andersen To: Kees Cook Cc: Will Deacon , linux-kernel@vger.kernel.org Subject: Re: [PATCH for-next/seccomp 1/2] selftests/seccomp: Add SKIPs for failed unshare() Message-ID: <20200710191023.GA2700617@cisco> References: <20200710185156.2437687-1-keescook@chromium.org> <20200710185156.2437687-2-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200710185156.2437687-2-keescook@chromium.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 10, 2020 at 11:51:55AM -0700, Kees Cook wrote: > Running the seccomp tests as a regular user shouldn't just fail tests > that require CAP_SYS_ADMIN (for getting a PID namespace). Instead, > detect those cases and SKIP them. But if we unshare NEWUSER at the same time as NEWPID, shouldn't we always be ns_capable(CAP_SYS_ADMIN)? Tycho