Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp280706pxu; Thu, 22 Oct 2020 23:53:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzGuMyPWmnX3i66XYh2JSV4wSfsrMryFfUXmXA4t+F0MPOPKCYXHO5B7pYTd+NArrY2KGC X-Received: by 2002:a05:6402:3070:: with SMTP id bs16mr832955edb.371.1603435990279; Thu, 22 Oct 2020 23:53:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603435990; cv=none; d=google.com; s=arc-20160816; b=zu0H5nW7DsNNtJeia0Cbz2Zvc4rLk8JhDjZujYe91x7FgTNwywHtZlodTbmkP99dm8 dH7SNbmNLuhdAgiLTq9cjdTw04yaaFLc5M8IFOQMdFqhtGMD8xhIQWN6Bzp7KS0NnGXg +9NosZAuXcnKGazQchPjwk6SRpkFV2NhCHeXdYr+DqxvzPHG9wx6NV42Hx6wRe2S/F8I dq0xFR2ZkJyu8kPryeHFv7wyCesIuj/oM77ltmUuaVLEFcw/PkyD1Um2ojVGpile8onw DVkGyjOt2FRAQHP3OFeR4OuLnDuEcwAGqkzx38zmJE+jfDw9ijqsza9FaJr0ZqbMg9HV GN5A== 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=rfUKMVhWjeKZKSXLZk5xBVJ8e0dc1yuWDXn4EN8WMMU=; b=RkHFh7Fy4yv6SbshBNRiqdHs0ByitAh7Pj1nhiT47wIFyVD2m7yUlQFcjG6AMULfOf qgklDN3z/w+fgFxTjSrO92SajsYcf3YKfv8EhTaxQr0aGz0/I9IhwqrAcct7cdJcN3dQ D6tt786KSJDgAFNLPzQZU2VGsGzxYz+yCWtdXpng9SbzANK+EtcHpgY/R6SU9HzfAwF/ UaMhHzgq506YCrXvuXeoD/bUv6mwQZqygSOJ9V1dYt7dgA+mlwtzQyi7ThiQu/EKEZle Fvgr4BASylZcjXF18Wb1/995XWXeuyUqtnzdiarfkRsrguCOX5hZ4SvG1SKRfZd3H6Zz 71/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ud7rmALA; 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 r26si343288ejb.125.2020.10.22.23.52.48; Thu, 22 Oct 2020 23:53:10 -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=ud7rmALA; 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 S373444AbgJVXkU (ORCPT + 99 others); Thu, 22 Oct 2020 19:40:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S373402AbgJVXkT (ORCPT ); Thu, 22 Oct 2020 19:40:19 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8C7CC0613CE; Thu, 22 Oct 2020 16:40:19 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id t14so2031134pgg.1; Thu, 22 Oct 2020 16:40:19 -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=rfUKMVhWjeKZKSXLZk5xBVJ8e0dc1yuWDXn4EN8WMMU=; b=ud7rmALAARbu3oqKs/0tzFST86D3Pnf0VohdjqbSUsNO3zlhE5AP/MrJ47b4kSvX2Y xyngFQZLQtUAslg59RtfMY2ljTToPi+/zvwpwNgbZqE4O2YsEghEf/pkMxMevIvn3FLl L4Uh8kmJyAXgM8cgqPGV6hDCgIpv9vqoDWV+7+xXJRSXWABMP2QdX32A+iNGZQtNMBIO Zq/vZhwrllluWPBwA4TvP4dCjf9AShkcwFIEzO91Nm00LTrASqifV1h0VY+ltJOBhpId prFvLAf7kc3bcq/cUG3ObocpG7NyplLaNZi+DrDYv4+lagdRedtMgntT3E6x5C1qGqCV dHtQ== 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=rfUKMVhWjeKZKSXLZk5xBVJ8e0dc1yuWDXn4EN8WMMU=; b=Lhm7C2UGR5rN0/FclKwSyFS6rqoMIdRdkAqQcEqxdFSQL+55m8C3rw5ZSJQ19RYznx M7Bstz050mCO3zX53KcOuuspwmJPJ9VIqC06ZD1CVfGNhGLc9ueSy63uvB/aZd7T44Mg 4jkOOrJXU7J7iFN+JrtdQQLlbdhlYxsiBTgM8cyQdMvFMswMYFWLcvVJ550ny9U/mx6V nhy02sGupva7JMqGqf5FfNmSnxSc8+CvdMx1huXxdpavqeCgB4Ef6OaZBkZDDKNQxlH6 XnForeIlUasxE2hNVHYEj2w6qbe1YmFXI3Bku7oNcbMJeUzT9mhIj6+RbdVWQR88sfvE NTbQ== X-Gm-Message-State: AOAM532pNILSD75qoNV4/QRYwdBxvgPxRvrt0Wxiengx37NXUa884WeJ XI/5qTzYW8W/gVykQO+W7FwqOSgRzGQQOpBKzUY= X-Received: by 2002:a17:90a:4313:: with SMTP id q19mr4588300pjg.184.1603410019174; Thu, 22 Oct 2020 16:40:19 -0700 (PDT) MIME-Version: 1.0 References: <202010091613.B671C86@keescook> <202010121556.1110776B83@keescook> <202010221520.44C5A7833E@keescook> In-Reply-To: <202010221520.44C5A7833E@keescook> From: YiFei Zhu Date: Thu, 22 Oct 2020 18:40:08 -0500 Message-ID: Subject: Re: [PATCH v4 seccomp 5/5] seccomp/cache: Report cache data through /proc/pid/seccomp_cache To: Kees Cook Cc: Linux Containers , YiFei Zhu , bpf , kernel list , Aleksa Sarai , Andrea Arcangeli , Andy Lutomirski , David Laight , Dimitrios Skarlatos , Giuseppe Scrivano , Hubertus Franke , Jack Chen , Jann Horn , Josep Torrellas , Tianyin Xu , Tobin Feldman-Fitzthum , Tycho Andersen , Valentin Rothberg , Will Drewry Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 22, 2020 at 5:32 PM Kees Cook wrote: > I've been going back and forth on this, and I think what I've settled > on is I'd like to avoid new CONFIG dependencies just for this feature. > Instead, how about we just fill in SECCOMP_NATIVE and SECCOMP_COMPAT > for all the HAVE_ARCH_SECCOMP_FILTER architectures, and then the > cache reporting can be cleanly tied to CONFIG_SECCOMP_FILTER? It > should be relatively simple to extract those details and make > SECCOMP_ARCH_{NATIVE,COMPAT}_NAME part of the per-arch enabling patches? Hmm. So I could enable the cache logic to every architecture (one patch per arch) that does not have the sparse syscall numbers, and then have the proc reporting after the arch patches? I could do that. I don't have test machines to run anything other than x86_64 or ia32, so they will need a closer look by people more familiar with those arches. > I'd still like to get more specific workload performance numbers too. > The microbenchmark is nice, but getting things like build times under > docker's default seccomp filter, etc would be lovely. I've almost gotten > there, but my benchmarks are still really noisy and CPU isolation > continues to frustrate me. :) Ok, let me know if I can help. YiFei Zhu