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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 AB229C3A5A7 for ; Wed, 28 Aug 2019 17:37:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 83D122339E for ; Wed, 28 Aug 2019 17:37:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="LS7sDUBj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727318AbfH1RhF (ORCPT ); Wed, 28 Aug 2019 13:37:05 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:35015 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727207AbfH1Rgx (ORCPT ); Wed, 28 Aug 2019 13:36:53 -0400 Received: by mail-pg1-f193.google.com with SMTP id n4so114785pgv.2 for ; Wed, 28 Aug 2019 10:36:52 -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=M47pTZiAE3Wr8BbtgIHsQv1k4WtO4wX2CZjP2HeXAjI=; b=LS7sDUBjIS1Uff386cu0zqhDdYqMUwYYKZKmEjwIsi9QTzN89/DsKYkhHeAzX+HiWz XUGR2aF5xzEjpRru0i1N004SQj75D1ew2JaMZGVGSMb1w0/XqTl0B3R7YnrgYSZbcJln 64EK3Y0c7M9n+gQt3BqNXH4dE9RFbDkXKcD/Y= 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=M47pTZiAE3Wr8BbtgIHsQv1k4WtO4wX2CZjP2HeXAjI=; b=FQZub3go8+9QZpWi5QQ/+zNE0WXlUN+734/xGW0+ea+8uJUEGv+bttoiY7PKaBRRFL gQdF0ZXp3zTscn2OELZruj3JOLnZZkOGzB8i7ogwRgE+DVTt2fTn70bUQO2tCwqj4JWq xeHSg75up7WFZ6UMQK9KCCBzjXTlYuf+nQyr9PMUsSHL6dbdtrXqoudTAPNc8ysPuvci jzw95IhUjKkjxj9aLobKIkY/9mNlftoA5jCQiJuTbXK+++JOSKkDtFWvzzii6GcSXMkn QbJl3TsRVlnc+vTmvlTkZkH0nhCtv/qkJglbBBcoQyzkUVjRIHZdWgNzuJmmfeTg19PB PTdQ== X-Gm-Message-State: APjAAAVQIQdWj5RA0hQGGC2FRNsaRm04+5Mf6bz96lGNJd4NFNpAAcMR 6LsrP/Ze1Vfl0lHoQQyfPGw/yg== X-Google-Smtp-Source: APXvYqw01wf5KpqvU0SBLWBJjcZSJTFTWWCu5dmEtVFN/KxdMMnVgA4WZSzYIDlb53k7Xqylep0gCg== X-Received: by 2002:a63:6fc9:: with SMTP id k192mr4431758pgc.20.1567013812543; Wed, 28 Aug 2019 10:36:52 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id w207sm3832866pff.93.2019.08.28.10.36.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Aug 2019 10:36:51 -0700 (PDT) Date: Sun, 25 Aug 2019 14:51:42 -0700 From: Kees Cook To: Paul Walmsley Cc: David Abdurachmanov , Tycho Andersen , Palmer Dabbelt , Albert Ou , Oleg Nesterov , Andy Lutomirski , Will Drewry , Shuah Khan , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , David Abdurachmanov , Thomas Gleixner , Allison Randal , Alexios Zavras , Anup Patel , Vincent Chen , Alan Kao , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, me@carlosedp.com Subject: Re: [PATCH v2] riscv: add support for SECCOMP and SECCOMP_FILTER Message-ID: <201908251446.04BCB8C@keescook> References: <20190822205533.4877-1-david.abdurachmanov@sifive.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On Fri, Aug 23, 2019 at 05:30:53PM -0700, Paul Walmsley wrote: > On Thu, 22 Aug 2019, David Abdurachmanov wrote: > > > There is one failing kernel selftest: global.user_notification_signal > > Is this the only failing test? Or are the rest of the selftests skipped > when this test fails, and no further tests are run, as seems to be shown > here: > > https://lore.kernel.org/linux-riscv/CADnnUqcmDMRe1f+3jG8SPR6jRrnBsY8VVD70VbKEm0NqYeoicA@mail.gmail.com/ > > For example, looking at the source, I'd naively expect to see the > user_notification_closed_listener test result -- which follows right > after the failing test in the selftest source. But there aren't any > results? > > Also - could you follow up with the author of this failing test to see if > we can get some more clarity about what might be going wrong here? It > appears that the failing test was added in commit 6a21cc50f0c7f ("seccomp: > add a return code to trap to userspace") by Tycho Andersen > . So, the original email says the riscv series is tested on top of 5.2-rc7, but just for fun, can you confirm that you're building a tree that includes 9dd3fcb0ab73 ("selftests/seccomp: Handle namespace failures gracefully")? I assume it does, but I suspect something similar is happening, where the environment is slightly different than expected and the test stalls. Does it behave the same way under emulation (i.e. can I hope to reproduce this myself?) -- Kees Cook 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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 1839DC3A5A1 for ; Wed, 28 Aug 2019 17:36:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E0C822339E for ; Wed, 28 Aug 2019 17:36:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="P6mOLoTG"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="LS7sDUBj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E0C822339E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=i0rpUJirHNlDyG2G07VM15bbaLwFZyDhbhk1WoRtEK0=; b=P6mOLoTGw/ZXWy VyW2cRYHPWwUmes3vcd29UQhnZw+98i5GLkcgkXcs7bk+zlCKYUz+aXHtes2MAY4Jjy1OAbi0LULA 5adVakp6f9bBfsrZ1PygBTgNydKIllkVmT58oqrQaGM62U7ryF5LfVqb08BDR0e0is7WXtS4e5PZF y+8EZ2VqN6s2rOXM/pTk4cermE+RY8oIBW3hAgZywYwNufeu+KRgt8Q67FL89GyJ1Fih3Ksk9R1tX 80gE21rBG9DP7NY0iWik13XniHCCSkCUriw+FmGpZ4RlhDcyA5ANm5JDvcBi+ZGv2oW23HCkk177X U5ThYog8jeDCz2kE8+YQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i31sO-0001iD-Ve; Wed, 28 Aug 2019 17:36:56 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i31sL-0001ew-1z for linux-riscv@lists.infradead.org; Wed, 28 Aug 2019 17:36:54 +0000 Received: by mail-pf1-x443.google.com with SMTP id y9so254610pfl.4 for ; Wed, 28 Aug 2019 10:36:52 -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=M47pTZiAE3Wr8BbtgIHsQv1k4WtO4wX2CZjP2HeXAjI=; b=LS7sDUBjIS1Uff386cu0zqhDdYqMUwYYKZKmEjwIsi9QTzN89/DsKYkhHeAzX+HiWz XUGR2aF5xzEjpRru0i1N004SQj75D1ew2JaMZGVGSMb1w0/XqTl0B3R7YnrgYSZbcJln 64EK3Y0c7M9n+gQt3BqNXH4dE9RFbDkXKcD/Y= 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=M47pTZiAE3Wr8BbtgIHsQv1k4WtO4wX2CZjP2HeXAjI=; b=MtA7OhZB4mWmHl08WKtKKZFV+ezYannFtQgDYKljCIdEIJAGcDMI/FA//O8uEvCe7X lLQYi/cQlFrboUB+UyJWFVH2xUqKJddDlHtG0ofMR6o7ETjOkturkIhapGlYD496EHZj ROzCu0Q/qBtNmf0wB46QjGkrwlNgkyVdz9hKUUNh8Rl8CI5z8ixyFP2e+qOqwN18rd/y Vqc0X/9LWrf9Ub3LnnpP6O/ms0u+55/yhhNvF+1VJGDHe5QX2HDHZE0+r6CIhiAahdF3 F9AOcZ4lZkKYSah+otpEHPZCbLkE/VlsBSoi33sc+lVcXr4rW1zN6f8ddqdCA8Upcqds Qn5Q== X-Gm-Message-State: APjAAAWYwQAv8y5EHAPkw/atj0m4n37y/GK/SXBD4fMWJYDS6IfGiap+ 6jTsZm4d8yBNdqmz9jEmop9VKQ== X-Google-Smtp-Source: APXvYqw01wf5KpqvU0SBLWBJjcZSJTFTWWCu5dmEtVFN/KxdMMnVgA4WZSzYIDlb53k7Xqylep0gCg== X-Received: by 2002:a63:6fc9:: with SMTP id k192mr4431758pgc.20.1567013812543; Wed, 28 Aug 2019 10:36:52 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id w207sm3832866pff.93.2019.08.28.10.36.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Aug 2019 10:36:51 -0700 (PDT) Date: Sun, 25 Aug 2019 14:51:42 -0700 From: Kees Cook To: Paul Walmsley Subject: Re: [PATCH v2] riscv: add support for SECCOMP and SECCOMP_FILTER Message-ID: <201908251446.04BCB8C@keescook> References: <20190822205533.4877-1-david.abdurachmanov@sifive.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190828_103653_117683_A7A3F950 X-CRM114-Status: GOOD ( 15.99 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Song Liu , Alan Kao , Palmer Dabbelt , Alexei Starovoitov , Oleg Nesterov , linux-kselftest@vger.kernel.org, linux-riscv@lists.infradead.org, Shuah Khan , Tycho Andersen , Daniel Borkmann , Yonghong Song , me@carlosedp.com, Albert Ou , Alexios Zavras , Thomas Gleixner , Allison Randal , Will Drewry , David Abdurachmanov , David Abdurachmanov , netdev@vger.kernel.org, Anup Patel , linux-kernel@vger.kernel.org, Andy Lutomirski , Vincent Chen , bpf@vger.kernel.org, Martin KaFai Lau Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org On Fri, Aug 23, 2019 at 05:30:53PM -0700, Paul Walmsley wrote: > On Thu, 22 Aug 2019, David Abdurachmanov wrote: > > > There is one failing kernel selftest: global.user_notification_signal > > Is this the only failing test? Or are the rest of the selftests skipped > when this test fails, and no further tests are run, as seems to be shown > here: > > https://lore.kernel.org/linux-riscv/CADnnUqcmDMRe1f+3jG8SPR6jRrnBsY8VVD70VbKEm0NqYeoicA@mail.gmail.com/ > > For example, looking at the source, I'd naively expect to see the > user_notification_closed_listener test result -- which follows right > after the failing test in the selftest source. But there aren't any > results? > > Also - could you follow up with the author of this failing test to see if > we can get some more clarity about what might be going wrong here? It > appears that the failing test was added in commit 6a21cc50f0c7f ("seccomp: > add a return code to trap to userspace") by Tycho Andersen > . So, the original email says the riscv series is tested on top of 5.2-rc7, but just for fun, can you confirm that you're building a tree that includes 9dd3fcb0ab73 ("selftests/seccomp: Handle namespace failures gracefully")? I assume it does, but I suspect something similar is happening, where the environment is slightly different than expected and the test stalls. Does it behave the same way under emulation (i.e. can I hope to reproduce this myself?) -- Kees Cook _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv