linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: YiFei Zhu <zhuyifei1999@gmail.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: linux-sh@vger.kernel.org, Tobin Feldman-Fitzthum <tobin@ibm.com>,
	Hubertus Franke <frankeh@us.ibm.com>,
	Jack Chen <jianyan2@illinois.edu>,
	linux-riscv@lists.infradead.org,
	Andrea Arcangeli <aarcange@redhat.com>,
	linux-s390@vger.kernel.org, YiFei Zhu <yifeifz2@illinois.edu>,
	linux-csky@vger.kernel.org, Tianyin Xu <tyxu@illinois.edu>,
	linux-xtensa@linux-xtensa.org, Kees Cook <keescook@chromium.org>,
	Jann Horn <jannh@google.com>,
	Valentin Rothberg <vrothber@redhat.com>,
	Josep Torrellas <torrella@illinois.edu>,
	Will Drewry <wad@chromium.org>,
	linux-parisc@vger.kernel.org,
	Linux Containers <containers@lists.linux-foundation.org>,
	kernel list <linux-kernel@vger.kernel.org>,
	Andy Lutomirski <luto@amacapital.net>,
	Dimitrios Skarlatos <dskarlat@cs.cmu.edu>,
	David Laight <David.Laight@aculab.com>,
	Giuseppe Scrivano <gscrivan@redhat.com>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH seccomp 3/8] powerpc: Enable seccomp architecture tracking
Date: Wed, 04 Nov 2020 11:48:21 +0000	[thread overview]
Message-ID: <CABqSeAQ+3sjLXH7GVt_tZrFT_e0nNMm8QgT+FBNQYSOc8viM=A@mail.gmail.com> (raw)
In-Reply-To: <87wnz1to9n.fsf@mpe.ellerman.id.au>

On Wed, Nov 4, 2020 at 4:22 AM Michael Ellerman <mpe@ellerman.id.au> 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

  reply	other threads:[~2020-11-04 11:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03 13:42 [PATCH seccomp 0/8] seccomp: add bitmap cache support on remaining arches and report cache in procfs YiFei Zhu
2020-11-03 13:42 ` [PATCH seccomp 1/8] csky: Enable seccomp architecture tracking YiFei Zhu
2020-11-03 13:42 ` [PATCH seccomp 2/8] parisc: " YiFei Zhu
2020-11-05 13:14   ` Helge Deller
2020-11-03 13:42 ` [PATCH seccomp 3/8] powerpc: " YiFei Zhu
2020-11-04 10:22   ` Michael Ellerman
2020-11-04 11:48     ` YiFei Zhu [this message]
2020-11-05 11:26       ` Michael Ellerman
2020-11-03 13:43 ` [PATCH seccomp 4/8] riscv: " YiFei Zhu
2020-11-03 13:43 ` [PATCH seccomp 5/8] s390: " YiFei Zhu
2020-11-09 15:03   ` Heiko Carstens
2020-11-03 13:43 ` [PATCH seccomp 6/8] sh: " YiFei Zhu
2020-11-03 13:43 ` [PATCH seccomp 7/8] xtensa: " YiFei Zhu
2020-11-03 13:43 ` [PATCH seccomp 8/8] seccomp/cache: Report cache data through /proc/pid/seccomp_cache YiFei Zhu
2020-11-04  0:11 ` [PATCH seccomp 0/8] seccomp: add bitmap cache support on remaining arches and report cache in pr Kees Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABqSeAQ+3sjLXH7GVt_tZrFT_e0nNMm8QgT+FBNQYSOc8viM=A@mail.gmail.com' \
    --to=zhuyifei1999@gmail.com \
    --cc=David.Laight@aculab.com \
    --cc=aarcange@redhat.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=dskarlat@cs.cmu.edu \
    --cc=frankeh@us.ibm.com \
    --cc=gscrivan@redhat.com \
    --cc=jannh@google.com \
    --cc=jianyan2@illinois.edu \
    --cc=keescook@chromium.org \
    --cc=linux-csky@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=linux-xtensa@linux-xtensa.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=luto@amacapital.net \
    --cc=mpe@ellerman.id.au \
    --cc=tobin@ibm.com \
    --cc=torrella@illinois.edu \
    --cc=tyxu@illinois.edu \
    --cc=vrothber@redhat.com \
    --cc=wad@chromium.org \
    --cc=yifeifz2@illinois.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).