Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3590031pxk; Mon, 21 Sep 2020 19:02:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJ0j6j8uGb4fvqVRsUTE3ywdplKT1Nqm6hZYsu1umxXFPq5+wvpWeSyHfBkQytObeh4RGx X-Received: by 2002:a50:8881:: with SMTP id d1mr1763378edd.306.1600740154917; Mon, 21 Sep 2020 19:02:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600740154; cv=none; d=google.com; s=arc-20160816; b=WQL5P0SYLB/uW+qPPURHl5/h5Kij/SDtwiI8/vgc6pk/FnLYWEbEj1ZsIsdLAMgmoP GhXrYVlvzJ1e1StTGHNYHN1Upbh1HgPnhWXkzMzhTmrdYxuk5C6zMzT5FYE43h/Kq/vr qxFnO4bfN/C/IVRtjUu2a/6gqUMn9cZcLnk8QbnRtyGzdPmkZ0sle2e1bazUH/aVG47k ztqWLGEvONpute6sD39zNR8Rlio8Sm8fbHnvfrKAPhZ+vm6yBgESAKXx0qAJQNp7uibg 7qwfdlyQzzpkZUCgD5sqj73YcORRIAXFOPSSqXjPI1AMamE52ltb5tKjzWGBr6WKOr73 guug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Dk2JCJ2SZ6GpJYMoGzni/oIIYiDZY1ODRMoXVmzNZcQ=; b=i/aTTJ1EcQN/dokwdu3kEvi+1ghvPY/ySZqfgfoSzM+Xa/D7KpF6jj27skIJ8eyyHo nE1Sw2O9MTvhpLZWDN4MJwGe4YxfRnB694pfHhM0BQTO78x8xc1/Nf1hEsRqGLYa4ryK ujqgepURmDYNIKsUjm9+w1D4ZQn1UWkmkEe0aduadO0YCqY7rf1hNjmYwEypv3WNnkQQ u/wots2/ngBJcRRNMATtXG+ixZRcAYz4E8KQkfM8zDSRij/xamChFdAKo6KB6ArjMuac dA8Vmtul/EJ9VYYydL9feCqoAItLoqrEhWkTVzB/O3twLO96XZEbuLPyhtUCaO+T05ul MVCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="QoYPjLe/"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l13si9554119ejc.723.2020.09.21.19.02.09; Mon, 21 Sep 2020 19:02:34 -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=@gmail.com header.s=20161025 header.b="QoYPjLe/"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729051AbgIVArw (ORCPT + 99 others); Mon, 21 Sep 2020 20:47:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726702AbgIVArw (ORCPT ); Mon, 21 Sep 2020 20:47:52 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8293FC061755; Mon, 21 Sep 2020 17:47:52 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id bw23so657226pjb.2; Mon, 21 Sep 2020 17:47:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Dk2JCJ2SZ6GpJYMoGzni/oIIYiDZY1ODRMoXVmzNZcQ=; b=QoYPjLe/QzifVjP9iVSdsQqMOwCPQDJnLzm84s1PK7djJkuJAlInR+whcSRHmf8dtl 9u3rTD9YqtwOjBYxtogsR84NYmTolHxp6V0DXGlbx4YVs6YeAxLgL8pYjJXjgJT6WbYP wi7jruk4eCPvjBvyClbVUiA/k14PGgvpgzqzlfmEiGLKukwWeIWs6f+tDOYGD95ep2bn gK6I/+JnpJ17J+YNgIEcUvg97LbTqa1ab0d2l7WXSM4IGbtbchGeVg6l/RaO2HBD7NCn vbZ8CUXi81QTMQ190hHaShg3CCkcpRFaUoVlKxbDK9n4FL9pKT4fwqLJTtOeE8l9cfRP uvWw== 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=Dk2JCJ2SZ6GpJYMoGzni/oIIYiDZY1ODRMoXVmzNZcQ=; b=n19XVuJizgoGnPOqGmvro1FFn6AyUaQnniBNYfjp9h6VkYwFOpmws7dh8Fc0JjSelI IcaH8t4/kUBAQsLhU91NEYcEVYlsdzC3kVUsHd7247OzLjEMnIeXWMnnDDQdkkUl8V4p NCNjXSzPYGQNv2/8sH7pVV9bPHlMU5gGMyhQx6MIPHpiqPtyIbJmsZ9e8RIVw6dgPgnL waFzW37DNImwgCHGHb8cG9IToml3CCSmmk27yvGy5CWgbtUbk5dilCUchkxf+ne6slfJ TJ+uNyDIhcYbcCh44wHTqUsoBxSbBmWqG8OLf0tjo6qq7VS8Xv8uxhxBCk/8FVedlzle mTdw== X-Gm-Message-State: AOAM530yByyZXgoTpsCwuiyfsKXsKnjnvou7Dxp+3SpwX/MauPdmIDpu MlGD33Ck9UUPW/BNw69EnWPKsM/3vw/Foo5uJo3BdbA+51OaWg== X-Received: by 2002:a17:90b:3252:: with SMTP id jy18mr1563061pjb.1.1600735671956; Mon, 21 Sep 2020 17:47:51 -0700 (PDT) MIME-Version: 1.0 References: <6af89348c08a4820039e614a090d35aa1583acff.1600661419.git.yifeifz2@illinois.edu> In-Reply-To: From: YiFei Zhu Date: Mon, 21 Sep 2020 19:47:40 -0500 Message-ID: Subject: Re: [RFC PATCH seccomp 1/2] seccomp/cache: Add "emulator" to check if filter is arg-dependent To: Jann Horn Cc: Kees Cook , Linux Containers , YiFei Zhu , bpf , Andrea Arcangeli , Dimitrios Skarlatos , Giuseppe Scrivano , Hubertus Franke , Jack Chen , Josep Torrellas , Tianyin Xu , Tobin Feldman-Fitzthum , Valentin Rothberg , Andy Lutomirski , Will Drewry , Aleksa Sarai , kernel list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 21, 2020 at 7:26 PM Jann Horn wrote: > > In the initial RFC patch I only added to x86. I could add it to any > > arch that has seccomp filters. Though, I'm wondering, why is SECCOMP > > in the arch-specific Kconfigs? > > Ugh, yeah, the existing code is already bad... as far as I can tell, > SECCOMP shouldn't be there, and instead the arch-specific Kconfig > should define something like HAVE_ARCH_SECCOMP and then arch/Kconfig > would define SECCOMP and let it depend on HAVE_ARCH_SECCOMP. It's > really gross how the SECCOMP config description has been copypasted > into a dozen different Kconfig files; and looking around a bit, you > can actually see that e.g. s390 has an utterly outdated help text > which still claims that seccomp is controlled via the ancient > "/proc//seccomp". I guess this very nicely illustrates why > putting such options into arch-specific Kconfig is a bad idea. :P Ah, time to fix this then. YiFei Zhu