Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1492836pxb; Wed, 30 Mar 2022 05:00:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJE7Wf01uwaZHOndxfejsMtn3QJi7H2Ta3xDe8Ds0Ry+wAHSdKZvtqsKXO8ECU5lzSIbRm X-Received: by 2002:aa7:d58e:0:b0:419:c121:ea33 with SMTP id r14-20020aa7d58e000000b00419c121ea33mr9972076edq.256.1648641600319; Wed, 30 Mar 2022 05:00:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648641600; cv=none; d=google.com; s=arc-20160816; b=xk3n3O08ZLphILt2cUIP/pDpvhg0MPMLwYCjG3DNxmRJmIUhviyVfCgiUw3hbRy01v FYRDc2MF+ZjNuceI0mUe7gtt+arsdJNPFCpjfBo7dF+N0OkSgwV7dgRVZXNTgifNqKmj DSerRHc4xmbDOskvPo6cH3zK3P0nVKdJXnfwvDpf9UvTDYqSuQooJzRa03CDOchUcQ1i Fq3RswcgtEave301a4saW4epRCmwe9ebFAYuPLb7UEGEXoLTM+Zpd706etqJTMAJxuBl kaljuToWT24myNAsQtE/kFtu01VDLEcUstFcV4h6CqGGKPs3O6C7vG8l3s8GIxolBYVM vz7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=rbCfapO4NIDG1N5wWCt2gtNC01xY1MmMW/+32By2iZU=; b=ED9qS+Gw46Rmutbb40qkV+RXMSbjEGKx9ppPTquFMaJA8Bcjfm+M9fwiaUkEAN6qSU Jr8SDxp2RxUPqwVhz4OMW5jd0rI7GeaaKOfs2KGSEfQIG3oIk0wa9x3ZZGK/FDMBxCU+ RtA4BC9qlLUp6Adgg8bnNPvH6K2/3hn8ngySTAR1026qUsrVxsXz9aAyZYPB//B4rCMx uYH9qAWwVrAy6XTWdaiWcUgmO6/wbDd8ho/4ezPEgVW/VdJYJ7IyiCwAuNpVtWXBQ1bo SgsFmBVqnKWEFiPL6yB+BtNzittYEfA066eBUfrE9zkjbF+fnMZsn6zg+DK6ebDqtYB1 QVqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=DNeuoXSe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g22-20020a1709064e5600b006df76385ebdsi19835276ejw.861.2022.03.30.04.59.34; Wed, 30 Mar 2022 05:00:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=DNeuoXSe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238559AbiC2PaD (ORCPT + 99 others); Tue, 29 Mar 2022 11:30:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238566AbiC2PaB (ORCPT ); Tue, 29 Mar 2022 11:30:01 -0400 Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8469C10B5 for ; Tue, 29 Mar 2022 08:28:16 -0700 (PDT) Received: by mail-io1-xd2b.google.com with SMTP id 125so21389036iov.10 for ; Tue, 29 Mar 2022 08:28:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=rbCfapO4NIDG1N5wWCt2gtNC01xY1MmMW/+32By2iZU=; b=DNeuoXSedKF6JFW4fZEpRDlhg3gtceUEhH8ds5WqdEbOGjU6iS92QdpByiCno6IM9W dLOVRK4SZKLZ2iFy9YJ2C+XrHT3OlyJ0plYeknoDqP/ts6HLxeqGSNxeNveokN07FQ8a A9M6kXDDGxDyriNL7ESSXXB7GR95ePKFf8lwI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=rbCfapO4NIDG1N5wWCt2gtNC01xY1MmMW/+32By2iZU=; b=XpRaFMxjmApc7hA3aNBDXVl5s53+AQaJiSlOH/P9vmKXmGwaBhF9u2FaOsG24HDQZl P9h+d1xd+W8L562pwWrKa+dKhxxqKmIIwSd+KkvyfrPNo5jAMNpwU73s3jXvVJlbtOCk bboJHSkL+N70jXLrptjbxHAXkWg1mofo4NGAturRR4MCH8TH8DlF5QyQF1jxnYEn+1Km MXEl/9cqJ0QQe0wU3Zl9TVMArU75tZq1w3FxiUDXe8YPnGBDAohqz6YMKH5dvPKQ+A/3 Zh9m9BBzUsa5Wrtr3ataRopWqKmrYVi26hce6FDPPw7ZcKmZMQKV+rGqigtstyvam7r8 27vw== X-Gm-Message-State: AOAM533c9kDzWRiCMR8DM//kqHfNoQrjVxubIdlMi4sEI8tbeo50qYD2 zMpKNGF7yorzpzr1M+BrtxRFLA== X-Received: by 2002:a6b:d003:0:b0:646:4652:bd57 with SMTP id x3-20020a6bd003000000b006464652bd57mr9186492ioa.51.1648567695820; Tue, 29 Mar 2022 08:28:15 -0700 (PDT) Received: from [192.168.1.128] ([71.205.29.0]) by smtp.gmail.com with ESMTPSA id e18-20020a5d85d2000000b00649254a855fsm9095105ios.26.2022.03.29.08.28.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Mar 2022 08:28:15 -0700 (PDT) Subject: Re: [PATCH] selftests/seccomp: Add SKIP for failed unshare() To: davidcomponentone@gmail.com, keescook@chromium.org Cc: luto@amacapital.net, wad@chromium.org, shuah@kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, linux-kselftest@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Guang , Shuah Khan References: From: Shuah Khan Message-ID: <133fac97-f24e-ea4d-6ffb-279581550c51@linuxfoundation.org> Date: Tue, 29 Mar 2022 09:28:14 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 3/29/22 12:03 AM, davidcomponentone@gmail.com wrote: > From: Yang Guang > > Running the seccomp tests under the kernel with "defconfig" > shouldn't fail. Because the CONFIG_USER_NS is not support Nit - supported > in "defconfig". So skip this test case is better. Nit: "skipping this case instead if failing it." > > Signed-off-by: Yang Guang > Signed-off-by: David Yang > --- > tools/testing/selftests/seccomp/seccomp_bpf.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/seccomp/seccomp_bpf.c b/tools/testing/selftests/seccomp/seccomp_bpf.c > index 313bb0cbfb1e..e9a61cb2eb88 100644 > --- a/tools/testing/selftests/seccomp/seccomp_bpf.c > +++ b/tools/testing/selftests/seccomp/seccomp_bpf.c > @@ -3742,7 +3742,10 @@ TEST(user_notification_fault_recv) > struct seccomp_notif req = {}; > struct seccomp_notif_resp resp = {}; > > - ASSERT_EQ(unshare(CLONE_NEWUSER), 0); > + ASSERT_EQ(unshare(CLONE_NEWUSER), 0) { > + if (errno == EINVAL) > + SKIP(return, "kernel missing CLONE_NEWUSER support");> + } > > listener = user_notif_syscall(__NR_getppid, > SECCOMP_FILTER_FLAG_NEW_LISTENER); > Looks good to me. Looks like this patch is for Linux 5.18 repo. With the requested changes to commit log Reviewed-by: Shuah Khan thanks, -- Shuah