Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp433949pxk; Thu, 24 Sep 2020 09:04:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQPAeGGJemdIxMbJw+m+0x8e6aTUWvX/EOWmGwzcKlPEc/gRHOZg/RQT98bwBIQB2Yr0mA X-Received: by 2002:a17:906:2458:: with SMTP id a24mr590087ejb.353.1600963490205; Thu, 24 Sep 2020 09:04:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600963490; cv=none; d=google.com; s=arc-20160816; b=PiuA60PxbEGyV3FMpKgn1p4T2NgLcwRvpmhaQwT+uHdVrv77xDPyNAMuuMOcaXRg4+ g0E6hkvzkk8h7LVIoLUvAdMgqJzg96aj3Ev7ZreTciH7qx4JqN8Fa2CCfd3PScAE13R/ 2Lvqc8viXYSGeeuz+5UX8ExArAlmpKIFaSFiQLRFQxQgguiWdy3gIztIqbrcemEQySQ8 f31f42qOfQNxFO2XdrzPONYacJNlFK3O28m1s8NsTBH7u9zjdjufpTgqnTgjffnlEr7C m11cd/W8XKos0tv9HVrN/k1XGQoWSJXk4h5Jc3alTxH1DavYGSFv0udGhBGB0Hkk3q1Y R3TA== 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=NRCLmg4VDNmw7XaOEseuJn4hXfsbbPGMKJw0MmQ0DNw=; b=xbR8Mtq1NdbpSZk16mdIJ5wuh95Ozdy3ZIc40mqZES2LLUcM4cpmRCk83jMTMrWwqM AWoNtmAR0728NpZ8pgsMcZ5dV26U4kTlr7aNvOGA72fZZHQG4PYTkueLtVjXZjCdGSsZ /mr3uHdIijgS6fC/hnIxyl/k6MRWDkWmatKjqDuyJeMUR+NAUUoNveC8FSCtNaFWDd+X I4TU4DJMHVfzuvgJcKM8xxGi5lH1zCq2MEP+JlvUeVGvYjglJ9Wg2jlIKrdwMTVLG8rr Zsq7ysfspdT54cPO+yuvExqM3W7K90MNAXp9T+7DCqU/MDXzerUk11fr4QfHtsn81Ru6 uv8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pb0eJj9r; 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 s24si2630289edr.379.2020.09.24.09.04.19; Thu, 24 Sep 2020 09:04:50 -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=pb0eJj9r; 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 S1728581AbgIXQCX (ORCPT + 99 others); Thu, 24 Sep 2020 12:02:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728381AbgIXQCX (ORCPT ); Thu, 24 Sep 2020 12:02:23 -0400 Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54E77C0613CE; Thu, 24 Sep 2020 09:02:23 -0700 (PDT) Received: by mail-pl1-x641.google.com with SMTP id f1so1877198plo.13; Thu, 24 Sep 2020 09:02:23 -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=NRCLmg4VDNmw7XaOEseuJn4hXfsbbPGMKJw0MmQ0DNw=; b=pb0eJj9rc50bEDW7RBoGUAvuENUYLTp6H/MsgH6/3hVf+AvE3Iqpy6vw6fTVnTtUc0 XaprcJ4xCk0WB8pggZarMBsPFF7/4tHj4rRihbeagR33gvtgOohtANOS3YoGU5ymVdnp f0aZz6Vq6a1X98YS68yqX3h4R67eRfLA1M83OXQhCSDEej6qDOfQc8iK3hnrWOfmM0ze aVvSo4vuvZA3cePODNWKCA3lq4fAnJlyXV8QR6lRnhrbP/E8kfLctMlF0+i3Ag7CqtIX nu0J3RkD81Q3EDukQrd958DdXBfz/WuJK+qZU8q5yNnpsLTGY4t5YlONIVKSfepnOJl6 38tQ== 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=NRCLmg4VDNmw7XaOEseuJn4hXfsbbPGMKJw0MmQ0DNw=; b=ivWu94WtphA8FAf4CgC9nGKo1FkMM9Dr7gFXiBvz+uavw+C8ojFHPwNyWhL+9309uR C4ABjdd1hIsS4mNaRfc8YhAg1DhIC2jA11331U3tSe2pP15+BUUWzXgqRIcTD+vo2RrE mfE0s62O9rYutIYTL4Nm8Zbv9iLuEYNspYVbz358PeZULN9OrEOi+Umwr8FTF8/kSg9l kF7BW/VgHZgkUrDVNjcEjCukaF34bjHPBBNvtRxVU2ECCKBtQR/EPZhRB4R0nQfRUjr1 0amXdw/J1O03NyWHXQUEA+45zJH94TBjNOzWPxU7gM7gU4ASE+8TE02KgLwYm7LE9hYa pNEw== X-Gm-Message-State: AOAM532G+g47xBCTp709LZh2xsCmgP/P9jkGNOugjZloUNLagvMqiOqR t37S+McCuIQv8ze+nhFDKhOMB+LC+t5Y+8+YIFI= X-Received: by 2002:a17:90b:4b82:: with SMTP id lr2mr52199pjb.184.1600963341422; Thu, 24 Sep 2020 09:02:21 -0700 (PDT) MIME-Version: 1.0 References: <20bbc8ed4b9f2c83d0f67f37955eb2d789268525.1600951211.git.yifeifz2@illinois.edu> <7042ba3307b34ce3b95e5fede823514e@AcuMS.aculab.com> <665ea57e360a421c958fffa08da77920@AcuMS.aculab.com> In-Reply-To: From: YiFei Zhu Date: Thu, 24 Sep 2020 11:02:10 -0500 Message-ID: Subject: Re: [PATCH v2 seccomp 2/6] asm/syscall.h: Add syscall_arches[] array To: David Laight Cc: "containers@lists.linux-foundation.org" , YiFei Zhu , "bpf@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Aleksa Sarai , Andrea Arcangeli , Andy Lutomirski , 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 Thu, Sep 24, 2020 at 9:37 AM YiFei Zhu wrote: > > Try with a slghtly older gcc. > > I think that entire optimisation (discarding const arrays) > > is very recent. > > Will try, will take a while to get an old GCC to run, however :/ Possibly one of the oldest I can easily get to work is GCC 6.5.0, and unrolling seems is still the case: 0000000000001560 <__seccomp_filter>: [...] 15d4: 41 8b 74 24 04 mov 0x4(%r12),%esi 15d9: bf 08 01 00 00 mov $0x108,%edi 15de: 81 fe 3e 00 00 c0 cmp $0xc000003e,%esi 15e4: 75 30 jne 1616 <__seccomp_filter+0xb6> [...] 1616: 81 fe 03 00 00 40 cmp $0x40000003,%esi 161c: bf 40 01 00 00 mov $0x140,%edi 1621: 74 c3 je 15e6 <__seccomp_filter+0x86> 1623: 0f 0b ud2 Am I overlooking something or should I go further back in the compiler version? YiFei Zhu