Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp3722282ybn; Fri, 27 Sep 2019 10:20:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqzpSFsNs2cWdIZx2OkjhxDaONdvt63yYDZdbGBOvBTM4M2RpxxcNY64wW7vYBJGxec672ns X-Received: by 2002:a50:e613:: with SMTP id y19mr5873545edm.290.1569604858315; Fri, 27 Sep 2019 10:20:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569604858; cv=none; d=google.com; s=arc-20160816; b=OSHua9iyQCLId3nx2qW8dmyYCCdl5o4TQGjUgrDc4YLGYm5QT2KS0LuyQ+IWp4TrC+ ROmz1cwHd+gezJqsDHYuTCX6kuhwN3nNphUBMCnfMybx/AtNN9u9MhAnmx4npvksauXS M4MYz85Wk9K39XOPwjn9jD0OcRSRL+RANrzAq6ZiL4j0KxM+sBMrl3sn1rhuV2LofuWA x0h0EueRZ3h0NaJwX9+dxkCLwovJwClWSYW/bPBMWy0HquX1BHfx+phqEXieweh5ByaP cbGi8kGAspVQa4aGs/UGKJsvmZ+rV3mkzNK64rDqjI+GwoOt7stosOE9clYlxCNvE3YE vacA== 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=O/eekwhhc/lEaErl1cWQvuZyKqEyMda5rbusW6YMK7I=; b=pKO+g84/8KNfQ2mRAPJF4j6bB1C7q7D53Ruw/sxe3GJxAkroT4JMONAF/ViA9LRP+5 c9KfucHBF6fGfz7jvQgsK36c5aTwA0UnBfL4uuv34hOKnyT/XPCVO5ime1NrGiw0U+Vn ZONGOFrccf4jKB6VfOolsbTkm0UiXABFz52v01XdF1T9IOtfbjhpA45lkzwYDhCqjFoz DBR50B5n71zqM4GPtTDLns5vrU8FLg6KE29LhHZlFxx9xTMqow0qMr32WFC5GJ6nHw3p RZEkOm2FZ2B1VlTJMtnWo73wixx2eNHEjnksrtal9mKsNVMo5VMxhw2V4t/H2dsyZkX+ eGAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LkvK4hE6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y1si2999956ejr.272.2019.09.27.10.20.33; Fri, 27 Sep 2019 10:20:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LkvK4hE6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728064AbfI0RUR (ORCPT + 99 others); Fri, 27 Sep 2019 13:20:17 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:40985 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728027AbfI0RUQ (ORCPT ); Fri, 27 Sep 2019 13:20:16 -0400 Received: by mail-lj1-f196.google.com with SMTP id f5so3240802ljg.8 for ; Fri, 27 Sep 2019 10:20:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=O/eekwhhc/lEaErl1cWQvuZyKqEyMda5rbusW6YMK7I=; b=LkvK4hE626X9t4s92tPCDu4GVP+JW+rdiOHfvNh9N4jF4NJ9fWlvc7td1nIDU+CA3n PEztECpiktmStFqQ0huvXxeFoYFnurGmt4lmEj4thS8is9bkVhtTwcYhaFJXZOE0CtAy FW3A90ZFOAblRyxevEgwyKNwOoEO9RZOQsrxo= 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=O/eekwhhc/lEaErl1cWQvuZyKqEyMda5rbusW6YMK7I=; b=awrjseIMJnG7j7NofpADBXLAFEh+3DVFPWEkvp2AQRjUwWiZrvCSq4tpZDBFH+5ZlJ U5lcu/C/ev2yIaMTA058VmNciILRo8NwGCACh8FOXrJEbww03eQNRtCJtBK4ccsAGxB3 RpwGj3xlIgia02KmIapaY5ESHl9URpw7VigaCX7YICaQKCeoT+zf6jGyzeal8JT6SNst EaB92tX5QpReyvX5/Nj2DxZQexhLUTNXVUmtuTHWbIHj9jA+e2AnARBAdHgxzmSKlnqW 1wwtq6BkiXkw9VN0toVkg+kPrhnAPfOHEqQP4ALZzhzMJzOnPIZ8vqoHcCwFyqQgBGn8 SEDQ== X-Gm-Message-State: APjAAAUOUqkRQWZ4VYf0U/tl66hVeQS+hDbJzVmIDlX/ifGbSPkVlgRF SL2w4p+xThugSJ0LpbXGQdpfxTbx42y9/T9YoK0cUQ== X-Received: by 2002:a2e:5d17:: with SMTP id r23mr3716224ljb.229.1569604813845; Fri, 27 Sep 2019 10:20:13 -0700 (PDT) MIME-Version: 1.0 References: <20190822205533.4877-1-david.abdurachmanov@sifive.com> <20190826145756.GB4664@cisco> <201908261043.08510F5E66@keescook> In-Reply-To: From: Kees Cook Date: Fri, 27 Sep 2019 10:20:02 -0700 Message-ID: Subject: Re: [PATCH v2] riscv: add support for SECCOMP and SECCOMP_FILTER To: Paul Walmsley Cc: Tycho Andersen , David Abdurachmanov , 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, LKML , "open list:KERNEL SELFTEST FRAMEWORK" , Network Development , bpf , me@carlosedp.com 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 Wed, Aug 28, 2019 at 6:30 PM Paul Walmsley wrote: > On Mon, 26 Aug 2019, Kees Cook wrote: > > > On Mon, Aug 26, 2019 at 09:39:50AM -0700, David Abdurachmanov wrote: > > > I don't have the a build with SECCOMP for the board right now, so it > > > will have to wait. I just finished a new kernel (almost rc6) for Fedora, > > > > FWIW, I don't think this should block landing the code: all the tests > > fail without seccomp support. ;) So this patch is an improvement! > > Am sympathetic to this -- we did it with the hugetlb patches for RISC-V -- > but it would be good to understand a little bit more about why the test > fails before we merge it. The test is almost certainly failing due to the environmental requirements (i.e. namespaces, user ids, etc). There are some corner cases in there that we've had to fix in the past. If the other tests are passing, then I would expect all the seccomp internals are fine -- it's just the case being weird. It's just a matter of figuring out what state the test environment is in so we can cover that corner case too. > Once we merge the patch, it will probably reduce the motivation for others > to either understand and fix the underlying problem with the RISC-V code > -- or, if it truly is a flaky test, to drop (or fix) the test in the > seccomp_bpf kselftests. Sure, I get that point -- but I don't want to block seccomp landing for riscv for that. I suggested to David offlist that the test could just be marked with a FIXME XFAIL on riscv and once someone's in a better position to reproduce it we can fix it. (I think the test bug is almost certainly not riscv specific, but just some missing requirement that we aren't handling correctly.) How does that sound? -Kees