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 X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 838D1C433E1 for ; Tue, 16 Jun 2020 16:04:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 65EBF2071A for ; Tue, 16 Jun 2020 16:04:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="OllvnLop" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733055AbgFPQD7 (ORCPT ); Tue, 16 Jun 2020 12:03:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733094AbgFPQDy (ORCPT ); Tue, 16 Jun 2020 12:03:54 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00F90C0613EF for ; Tue, 16 Jun 2020 09:03:53 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id y18so8596586plr.4 for ; Tue, 16 Jun 2020 09:03:53 -0700 (PDT) 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=zKc/JpLrFA5C9B00OW//vjJ8ZMv5QimUc3F5i8rvet4=; b=OllvnLopOjSAVN/rCkHGWJ500Le3/6Ku5c3o8ZlC+gP2RzGDWdyhUX0XwzoK6KZlXi oVUvlUOsEvATG+ldK1KcrhLOS061oY8IpfnuZkqmEEiYnuh+gmbZps73C0AZ9cOBaHq1 exTGM1g9ghl69TYphlzSAJ8R2IcP6MK/Wv63w= 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=zKc/JpLrFA5C9B00OW//vjJ8ZMv5QimUc3F5i8rvet4=; b=k33yNtal7ynHcU3ZxkBLk0d3I0UEuQ+d3fydFbPSL+bWYGP4gnQDput7//HJlOIVHk E/e+Nls0O3VRmE13cuCbh98ElAiTFyZ5/S1TWX3sOGqPKwe3+wZo5AXQD84jT2VoOaiD xEpyRtpEyI0Gq3DV9BLyeubnFj57ugT7W7Lcg31NoniJK8oNaP+yNmRUsvx6JIB+7TN2 qzofE/2s8uBXDTZQf/eBhJZd/pBwnWMKNIvUDRkO7PTP0pikpokzW3S7+/yGYKgMLnTn 8aRlAtWavo+EVLQfA/hmwoMimsLWDBWoXLrBV/TYUX0z/O9pPUrRU45zmoY5fkVTxhl7 xDBg== X-Gm-Message-State: AOAM530NLP2UBdTSPmdVta04vOlMwDQqQ9giIs8x+spZvHIjLbKTFAi4 qtIQXKb/e+tkn2Y+WqZkiKrVdQ== X-Google-Smtp-Source: ABdhPJwVjALfzLCAM/XOMQlngQM0/cTr6VlDaTe0C2TtJc/aiEyzOtzkrH1NE78arH20bNJ9zx2lfA== X-Received: by 2002:a17:902:e901:: with SMTP id k1mr2665677pld.92.1592323433244; Tue, 16 Jun 2020 09:03:53 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id a14sm17059842pfc.133.2020.06.16.09.03.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2020 09:03:52 -0700 (PDT) Date: Tue, 16 Jun 2020 09:03:51 -0700 From: Kees Cook To: Tycho Andersen Cc: linux-kernel@vger.kernel.org, Sargun Dhillon , Christian Brauner , "David S. Miller" , Christoph Hellwig , Jakub Kicinski , Alexander Viro , Aleksa Sarai , Matt Denton , Jann Horn , Chris Palmer , Robert Sesek , Giuseppe Scrivano , Greg Kroah-Hartman , Andy Lutomirski , Will Drewry , Shuah Khan , netdev@vger.kernel.org, containers@lists.linux-foundation.org, linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v4 08/11] selftests/seccomp: Make kcmp() less required Message-ID: <202006160902.E331FF1917@keescook> References: <20200616032524.460144-1-keescook@chromium.org> <20200616032524.460144-9-keescook@chromium.org> <20200616145725.GJ2893648@cisco> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200616145725.GJ2893648@cisco> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Jun 16, 2020 at 08:57:25AM -0600, Tycho Andersen wrote: > On Mon, Jun 15, 2020 at 08:25:21PM -0700, Kees Cook wrote: > > The seccomp tests are a bit noisy without CONFIG_CHECKPOINT_RESTORE (due > > to missing the kcmp() syscall). The seccomp tests are more accurate with > > kcmp(), but it's not strictly required. Refactor the tests to use > > alternatives (comparing fd numbers), and provide a central test for > > kcmp() so there is a single XFAIL instead of many. Continue to produce > > warnings for the other tests, though. > > > > Additionally adds some more bad flag EINVAL tests to the addfd selftest. > > > > Signed-off-by: Kees Cook > > This looks fine, but I wonder if this is enough motivation for taking > kcmp() out of CONFIG_CHECKPOINT_RESTORE guards? Do you mean in the kernel? I'd rather not -- it's a relatively powerful primitive. Maybe if there were other users needing it, but there doesn't seem to have been much demand. -- Kees Cook