Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp2296186pxu; Fri, 9 Oct 2020 12:57:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmaT2mE7XCuBEKXjmU35pVtR8F40ZvD3HW9stSFUQHjURJyI1GVRCB4a8oa4EYQEtWukk3 X-Received: by 2002:a17:907:4301:: with SMTP id nh1mr15001280ejb.397.1602273472092; Fri, 09 Oct 2020 12:57:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602273472; cv=none; d=google.com; s=arc-20160816; b=twGktasC3Iy0Ss/NST0uI7Ypmxh11lHjEKF+SOoB0Riy1pZdgTYs511+KrAmMh8X7Q ZVX3RKmnM2XrMBfqE7DY3NYSKZwxnOYwBM8nyMf6q3seSrDbXZVk1VnApZFbmCHTbfMv SLPsvOTs7VQeJQZvXGWOSWGsY64CUNQtZvQV2sv4OJFMfvBsINkAUMAOUmE0Zd7GE1uM i1ffxYrOMMB1r65lyAnABXv7byxPI+tLpUkrpAq8NN39sBVUua6IsgzUKG2BIPqyFZQN fNH6atABXcWHU1504f3agz7SFnVfMEZ1jgHmEXaudigSMVmxVbdmUmc6I1fZkuDcZ3oO wpgw== 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=yXMI+PJKiZyAcZLy7HAh04DXC9PBpofk3SlWAnaKUzo=; b=CGKrAYOzjt3K30QEODZHhY4BDeBMCKft+OCv9cmMO4Ns+y5J+MKp7uspofh5o/9N3+ QwxMmcsDm7dcVDJOOx7SB+mDzu/u/d3mPwqGihKvnEj1+rKWPqk6NpaICI2EkyjwxI+c j/rkfR8/2f5Ct3el1rfc+UCNCHiTxoltcu9UXo1w+HDkVqmNW8QwR9fcbT4hz4EsXEvu Ja4dRD2qHTaFd46KBslIz/jlCdm38urUZW3KFGt6Jbs9QMxw6zfU3SpxMNtRzwhMFgc+ FH8o2YPc/wkS931Abx2RnJI6eDPbGc7QLGnhoqs2avZnmeQAKQM48v4YLN6NGm8g0tLs oy+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sNrNF6ck; 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 f16si6376810ejt.311.2020.10.09.12.57.29; Fri, 09 Oct 2020 12:57:52 -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=sNrNF6ck; 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 S2390439AbgJISci (ORCPT + 99 others); Fri, 9 Oct 2020 14:32:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388240AbgJISci (ORCPT ); Fri, 9 Oct 2020 14:32:38 -0400 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1146AC0613D2; Fri, 9 Oct 2020 11:32:38 -0700 (PDT) Received: by mail-pf1-x443.google.com with SMTP id g10so7574476pfc.8; Fri, 09 Oct 2020 11:32:38 -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=yXMI+PJKiZyAcZLy7HAh04DXC9PBpofk3SlWAnaKUzo=; b=sNrNF6ck7NJ2QfAd6RQi7Knon7r6ENYFOWVpv5tnOeOKqRvn+KzubtO6ebUIwOxTSL 6LTsxmt+BXSNfjUdNzXi6nRS4tbViLgm9hgfrV5A9UTQKwpZ8HXPYF2ACfo8LlS77JmR yxQtnaW69CrshyvExgocB1z248AiO6z4ZwAvJaIhMpjmcoyeSBfso7HVf8hqHpCSMFda 6o325i7ZzqR7iJ3Txs8/IBVF/pmXdK89XXURcwAQb2bj6sI/hdLn+E3p7fKMELUR1Lcj nOAll45kTvT8d0EdT3JuFtc8ICxZEY8yBMtiHqY1wNEX/2hHp/P615vKRkGhxZ0A4NQp Rlpw== 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=yXMI+PJKiZyAcZLy7HAh04DXC9PBpofk3SlWAnaKUzo=; b=GatrHpyiYMtMVjJ6agVLevnsBN8FxwheUcXv82C3riMO06JbNPtsdz5Paoeymytwg2 gRJiCgVWlgyCnmXWEJmZsSqdJwvkKwRf7yj/1N2GLsDssyq4fxyxc7GkQfnqAgQVo672 Aj5c0m2LDq9p+MRCCf1oG299DiVlcK/G3GuVg6zGpyG3dG+I9X8VcdHKo9azkLD0Ec+o LikqXXUOjTeYjZ2ghBADFEwcI8XPyE5WHGn7m8paZSZMpOfnOTeqn7+2z7c6RCqElLQe OnZ0hb/allnXOrYNnbYe8ul2tgPsMN6X8sfJ17Lb8aU6W3RnfKuinGFF0WgV7v2iOOKC 3zhA== X-Gm-Message-State: AOAM532fKjeSlp7I8Mcprf/wJWDqY0xc8/4u3Zd6LfB17G6EgaW4qFUQ +JbRV4gsB/oGqIvmNKmdRRUBuKc3GMNP9WVBL2g= X-Received: by 2002:a63:1c19:: with SMTP id c25mr4487332pgc.66.1602268357586; Fri, 09 Oct 2020 11:32:37 -0700 (PDT) MIME-Version: 1.0 References: <122e3e70cf775e461ebdfadb5fbb4b6813cca3dd.1602263422.git.yifeifz2@illinois.edu> In-Reply-To: From: YiFei Zhu Date: Fri, 9 Oct 2020 13:32:26 -0500 Message-ID: Subject: Re: [PATCH v4 seccomp 3/5] x86: Enable seccomp architecture tracking To: Andy Lutomirski Cc: Linux Containers , YiFei Zhu , bpf , LKML , Aleksa Sarai , Andrea Arcangeli , David Laight , Dimitrios Skarlatos , Giuseppe Scrivano , Hubertus Franke , Jack Chen , Jann Horn , Josep Torrellas , Kees Cook , 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 Fri, Oct 9, 2020 at 12:25 PM Andy Lutomirski wrote: > Is the idea that any syscall that's out of range for this (e.g. all of > the x32 syscalls) is unoptimized? I'm okay with this, but I think it > could use a comment. Yes, any syscall number that is out of range is unoptimized. Where do you think I should put a comment? seccomp_cache_check_allow_bitmap above `if (unlikely(syscall_nr < 0 || syscall_nr >= bitmap_size))`, with something like "any syscall number out of range is unoptimized"? YiFei Zhu