Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1242047pxb; Wed, 4 Nov 2020 03:57:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJxt4fa72HYV4ukZ2YXS1/c37OPq2VX6PMLTriPV7TDjDQO8mrTDIpPx+nwLZs2A/oBa5md+ X-Received: by 2002:a05:6402:17b4:: with SMTP id j20mr14962003edy.24.1604491027319; Wed, 04 Nov 2020 03:57:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604491027; cv=none; d=google.com; s=arc-20160816; b=JSZfIIV2Mt2T0ErijASt6jP0XfSig9fTGR+Bos2DONw+JRD5WgU3guT8JL+TSz2Y48 P4xig+BaZuFTqpPdkVKJ9S3RsF3o8vIT65+qy0jwpZ2to1AZcM4WtlZNDYVhvhJf/ov5 FeYhDaofS81AGhSutfv/A6caEqJauw6Ofgs4RclRbX4cV7dg2WpI0Hmy6TY4BiWFFJsJ EEEY6+hDGLGkw13Zs2N7hvw8hT7LpXujR9O0e67/u2/g/pHI6dFC3uxFMvlBS3ONTuQB 9u/NrD6snwTYQ59XfeZaCJxHX+UJfbMllNE1nD2iLL8z2p/WnbcQsv2yrL/Xr29ynEeK eU9Q== 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=7IzbM9m4aaHXdrXJm05MLSazuYENXBo0KE7aGRSwMEM=; b=vJVoEUaqgzfW0F5KvkCpyP/2zqaLZfgjLPYWDH3Sd6DB0gozJr21ifCLd/FIa1bL81 fp6WR1G9KxqSBoGDvBJ64Z/X8rVHZlIR4AMN3Avb/+HgZrWG0O95cDvOO22w3tfqeCNB eiuMdOnv+sdLnYraMXTmSX95p8C7qtul3AOb2s4gBmf5kIGLw4NOdNo0cxIW1nmyzbSS HPf5L7pBxzdhf9dY+TO3sGsXLK5WAsNrRMRXLZkX0mXFZCEXVxoYrc/dtUfZPmnBx3Qr S+ghWGbduaOP3pHyzVtt+6L2m8PYl9atnGlf/DqRm2YvRlY18UVjqs/VJUzLe4GE60hd zjeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZdFcNNsE; 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 f4si1296469eja.252.2020.11.04.03.56.44; Wed, 04 Nov 2020 03:57:07 -0800 (PST) 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=ZdFcNNsE; 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 S1729599AbgKDLsg (ORCPT + 99 others); Wed, 4 Nov 2020 06:48:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726344AbgKDLsf (ORCPT ); Wed, 4 Nov 2020 06:48:35 -0500 Received: from mail-pl1-x643.google.com (mail-pl1-x643.google.com [IPv6:2607:f8b0:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31047C0613D3; Wed, 4 Nov 2020 03:48:35 -0800 (PST) Received: by mail-pl1-x643.google.com with SMTP id b12so10186701plr.4; Wed, 04 Nov 2020 03:48:35 -0800 (PST) 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=7IzbM9m4aaHXdrXJm05MLSazuYENXBo0KE7aGRSwMEM=; b=ZdFcNNsEPd+MrYWXHoLvBaTyKHUZhwFwZu3J/PQqzp5Y/s91VRqgtwgRqnPdnsJFzV u8ndi/4ac74yeUDpbQr7HXPlEJnbasb7cO8o7gJ5QfnXfnqvT0IrHsEaICKEwxEa70A2 YXFhqPLDhnbJkNUfiRkcSqJ8rcr7T7iBd7vGmo4WjMykCP58kLBQOzps+/fitCtmG7lx rqQXdb82DTVqzyozftIz+18xHfX9wm2lvzWUKmKLYyJ3imRpyuFKCfkdabT8dbUsAWYG nv0yauU0g8FHPsO317oAA4Yrr0jRGmrdqn85extqA7+6MeHG+mc31wlEfpFhQQxxW9Z6 hBNQ== 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=7IzbM9m4aaHXdrXJm05MLSazuYENXBo0KE7aGRSwMEM=; b=hg+Ri/MEBJrLVyt6nwfiPJxjwP5O4yU43nlDmotGDwZG0RNu/Fl7bH1fC4btlWn8GJ F2C7zQC2/K5LP7czbHlu7dJMcytb/YiSGxyVI7XwJcBVs6P5s8OZQnMTWyGYD1V058yi c8sxNuLdKO8IALrugfv1vPSwJVUGDNam8g/Rnd1ndAejpTPXIM2SZ/DfRYr9m8gm6Uox JkOMw/WfEhmhYOfUiqh9CmHULoUxkU4YBQ8S+RzLVupWt/asmgMPmbtXIvzPZ04rCfQ9 GcciqVfL9Yqj8EKoRcHHxzT/t8HFi8GiR3JGKzAXMct1s5pEAjA5zBSpoIq71v27SN7d LGEA== X-Gm-Message-State: AOAM532R3iW2Z3OOrPTUMe49g7oTa3qVLQ5V86qGG8M3TloOUEsajTIO dGDUFUTt3ad70ONP+fRyAnNuw6diopW70iJdUEk= X-Received: by 2002:a17:902:d30c:b029:d6:8208:bb1 with SMTP id b12-20020a170902d30cb02900d682080bb1mr29348288plc.44.1604490514732; Wed, 04 Nov 2020 03:48:34 -0800 (PST) MIME-Version: 1.0 References: <4ec2970fcc819eb4d5dac2bd35233ccdadfda845.1604410035.git.yifeifz2@illinois.edu> <87wnz1to9n.fsf@mpe.ellerman.id.au> In-Reply-To: <87wnz1to9n.fsf@mpe.ellerman.id.au> From: YiFei Zhu Date: Wed, 4 Nov 2020 05:48:21 -0600 Message-ID: Subject: Re: [PATCH seccomp 3/8] powerpc: Enable seccomp architecture tracking To: Michael Ellerman Cc: Linux Containers , linux-sh@vger.kernel.org, Tobin Feldman-Fitzthum , Hubertus Franke , Jack Chen , linux-riscv@lists.infradead.org, Andrea Arcangeli , linux-s390@vger.kernel.org, YiFei Zhu , linux-csky@vger.kernel.org, Tianyin Xu , linux-xtensa@linux-xtensa.org, Kees Cook , Jann Horn , Valentin Rothberg , Aleksa Sarai , Josep Torrellas , Will Drewry , linux-parisc@vger.kernel.org, kernel list , Andy Lutomirski , Dimitrios Skarlatos , David Laight , Giuseppe Scrivano , linuxppc-dev@lists.ozlabs.org, Tycho Andersen Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 4, 2020 at 4:22 AM Michael Ellerman wrote: > > +#ifdef __LITTLE_ENDIAN__ > > As Kees mentioned this should (must?!) match the configured endian. > > But I think it would still be better to use the CONFIG symbol, which is > CONFIG_CPU_LITTLE_ENDIAN. My attempt here is to be consistent with asm/syscall.h syscall_get_arch [1]. Would it make sense to change that to CONFIG_CPU_LITTLE_ENDIAN then? [1] https://elixir.bootlin.com/linux/latest/source/arch/powerpc/include/asm/syscall.h#L116 > > +# define SECCOMP_ARCH_NATIVE (AUDIT_ARCH_PPC64 | __SECCOMP_ARCH_LE) > > You use __SECCOMP_ARCH_LE there, but previously you only defined > __SECCOMP_ARCH_LE_BIT. > > Is there some magic somewhere that defines __SECCOMP_ARCH_LE based on > __SECCOMP_ARCH_LE_BIT ? Oops, my bad here. > > +# define SECCOMP_ARCH_NATIVE_NR NR_syscalls > > +# define SECCOMP_ARCH_NATIVE_NAME "ppc64" > > What's the name used for? This is used in the last patch in this series to report in procfs the name of each architecture tracked by the bitmap cache. > Usually we use "ppc64" for 64-bit big endian and "ppc64le" for 64-bit > little endian. > > And usually we use "ppc" for 32-bit. Ok. YiFei Zhu