From: Michael Ellerman <mpe@ellerman.id.au>
To: "Dmitry V. Levin" <ldv@altlinux.org>,
Andy Lutomirski <luto@kernel.org>, Eric Paris <eparis@redhat.com>,
Paul Moore <paul@paul-moore.com>
Cc: linux-mips@linux-mips.org, linux-ia64@vger.kernel.org,
linux-sh@vger.kernel.org, sparclinux@vger.kernel.org,
linux-riscv@lists.infradead.org, linux-arch@vger.kernel.org,
linux-s390@vger.kernel.org, linux-c6x-dev@linux-c6x.org,
linux-hexagon@vger.kernel.org, x86@kernel.org,
Eugene Syromyatnikov <esyr@redhat.com>,
Elvira Khabirova <lineprinter@altlinux.org>,
linux-snps-arc@lists.infradead.org,
uclinux-h8-devel@lists.sourceforge.jp,
linux-xtensa@linux-xtensa.org, linux-um@lists.infradead.org,
linux-m68k@lists.linux-m68k.org, openrisc@lists.librecores.org,
linux-arm-kernel@lists.infradead.org,
linux-parisc@vger.kernel.org, Oleg Nesterov <oleg@redhat.com>,
linux-audit@redhat.com, linux-alpha@vger.kernel.org,
nios2-dev@lists.rocketboards.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v2 16/15] syscall_get_arch: add "struct task_struct *" argument
Date: Tue, 27 Nov 2018 10:34:29 +0000 [thread overview]
Message-ID: <87in0ihkqy.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <20181121004422.GA29053@altlinux.org>
"Dmitry V. Levin" <ldv@altlinux.org> writes:
> diff --git a/arch/powerpc/include/asm/syscall.h b/arch/powerpc/include/asm/syscall.h
> index ab9f3f0a8637..d88b34179118 100644
> --- a/arch/powerpc/include/asm/syscall.h
> +++ b/arch/powerpc/include/asm/syscall.h
> @@ -100,9 +100,15 @@ static inline void syscall_set_arguments(struct task_struct *task,
> regs->orig_gpr3 = args[0];
> }
>
> -static inline int syscall_get_arch(void)
> +static inline int syscall_get_arch(struct task_struct *task)
> {
> - int arch = is_32bit_task() ? AUDIT_ARCH_PPC : AUDIT_ARCH_PPC64;
> + int arch;
> +
> + if (IS_ENABLED(CONFIG_PPC64) && !test_tsk_thread_flag(task, TIF_32BIT))
> + arch = AUDIT_ARCH_PPC64;
> + else
> + arch = AUDIT_ARCH_PPC;
> +
> #ifdef __LITTLE_ENDIAN__
> arch |= __AUDIT_ARCH_LE;
> #endif
LGTM.
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
cheers
prev parent reply other threads:[~2018-11-27 10:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20181107042751.3b519062@akathisia>
[not found] ` <CALCETrV1v-DPRfDRwiH=xn29bxWxiHdZtAH1nw=dsmDtnT0YGQ@mail.gmail.com>
[not found] ` <20181120001128.GA11300@altlinux.org>
2018-11-21 0:44 ` [PATCH v2 16/15] syscall_get_arch: add "struct task_struct *" argument Dmitry V. Levin
2018-11-21 15:15 ` Andy Lutomirski
2018-11-21 15:47 ` Palmer Dabbelt
2018-11-21 18:40 ` Paul Burton
2018-11-21 19:00 ` Dmitry V. Levin
2018-11-21 19:35 ` [PATCH v2 16/15 v2] " Dmitry V. Levin
2018-11-21 19:45 ` Paul Burton
2018-11-27 10:34 ` Michael Ellerman [this message]
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=87in0ihkqy.fsf@concordia.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=eparis@redhat.com \
--cc=esyr@redhat.com \
--cc=ldv@altlinux.org \
--cc=lineprinter@altlinux.org \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-audit@redhat.com \
--cc=linux-c6x-dev@linux-c6x.org \
--cc=linux-hexagon@vger.kernel.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-mips@linux-mips.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-snps-arc@lists.infradead.org \
--cc=linux-um@lists.infradead.org \
--cc=linux-xtensa@linux-xtensa.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=luto@kernel.org \
--cc=nios2-dev@lists.rocketboards.org \
--cc=oleg@redhat.com \
--cc=openrisc@lists.librecores.org \
--cc=paul@paul-moore.com \
--cc=sparclinux@vger.kernel.org \
--cc=uclinux-h8-devel@lists.sourceforge.jp \
--cc=x86@kernel.org \
/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