From: Huacai Chen <chenhuacai@kernel.org>
To: Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: loongarch@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] LoongArch: Handle CONFIG_32BIT in syscall_get_arch()
Date: Thu, 9 Apr 2026 20:33:43 +0800 [thread overview]
Message-ID: <CAAhV-H5GkEgec+aO84x+juh149sy2f-=8SA6cTrTwUtpsgP8qA@mail.gmail.com> (raw)
In-Reply-To: <20260407063350.12479-1-yangtiezhu@loongson.cn>
Applied, thanks.
Huacai
On Tue, Apr 7, 2026 at 2:33 PM Tiezhu Yang <yangtiezhu@loongson.cn> wrote:
>
> If CONFIG_32BIT is set, it should return AUDIT_ARCH_LOONGARCH32 instead of
> AUDIT_ARCH_LOONGARCH64 in syscall_get_arch().
>
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> ---
> arch/loongarch/include/asm/syscall.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/loongarch/include/asm/syscall.h b/arch/loongarch/include/asm/syscall.h
> index 81d2733f7b94..8b5f3a1598af 100644
> --- a/arch/loongarch/include/asm/syscall.h
> +++ b/arch/loongarch/include/asm/syscall.h
> @@ -78,7 +78,11 @@ static inline void syscall_set_arguments(struct task_struct *task,
>
> static inline int syscall_get_arch(struct task_struct *task)
> {
> +#ifdef CONFIG_64BIT
> return AUDIT_ARCH_LOONGARCH64;
> +#else
> + return AUDIT_ARCH_LOONGARCH32;
> +#endif
> }
>
> static inline bool arch_syscall_is_vdso_sigreturn(struct pt_regs *regs)
> --
> 2.42.0
>
>
prev parent reply other threads:[~2026-04-09 12:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-07 6:33 [PATCH v1] LoongArch: Handle CONFIG_32BIT in syscall_get_arch() Tiezhu Yang
2026-04-09 12:33 ` Huacai Chen [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='CAAhV-H5GkEgec+aO84x+juh149sy2f-=8SA6cTrTwUtpsgP8qA@mail.gmail.com' \
--to=chenhuacai@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=yangtiezhu@loongson.cn \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).