lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <739ba6e4-d11b-44a0-c5fc-6fb430d10d5a@xen0n.name>
Date:   Thu, 19 May 2022 00:13:27 +0800
From:   WANG Xuerui <kernel@...0n.name>
To:     Huacai Chen <chenhuacai@...ngson.cn>,
        Arnd Bergmann <arnd@...db.de>,
        Andy Lutomirski <luto@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Peter Zijlstra <peterz@...radead.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        David Airlie <airlied@...ux.ie>,
        Jonathan Corbet <corbet@....net>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     linux-arch@...r.kernel.org, linux-doc@...r.kernel.org,
        linux-kernel@...r.kernel.org, Xuefeng Li <lixuefeng@...ngson.cn>,
        Yanteng Si <siyanteng@...ngson.cn>,
        Huacai Chen <chenhuacai@...il.com>,
        Guo Ren <guoren@...nel.org>, Xuerui Wang <kernel@...0n.name>,
        Jiaxun Yang <jiaxun.yang@...goat.com>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        Eric Biederman <ebiederm@...ssion.com>,
        Al Viro <viro@...iv.linux.org.uk>
Subject: Re: [PATCH V11 14/22] LoongArch: Add signal handling support

On 5/18/22 17:26, Huacai Chen wrote:
> Add ucontext/sigcontext definition and signal handling support for
> LoongArch.
>
> Cc: Eric Biederman <ebiederm@...ssion.com>
> Cc: Al Viro <viro@...iv.linux.org.uk>
> Signed-off-by: Huacai Chen <chenhuacai@...ngson.cn>
> ---
>   arch/loongarch/include/uapi/asm/sigcontext.h |  44 ++
>   arch/loongarch/include/uapi/asm/signal.h     |  13 +
>   arch/loongarch/include/uapi/asm/ucontext.h   |  35 ++
>   arch/loongarch/kernel/signal.c               | 566 +++++++++++++++++++
>   4 files changed, 658 insertions(+)
>   create mode 100644 arch/loongarch/include/uapi/asm/sigcontext.h
>   create mode 100644 arch/loongarch/include/uapi/asm/signal.h
>   create mode 100644 arch/loongarch/include/uapi/asm/ucontext.h
>   create mode 100644 arch/loongarch/kernel/signal.c
>
> diff --git a/arch/loongarch/include/uapi/asm/sigcontext.h b/arch/loongarch/include/uapi/asm/sigcontext.h
> new file mode 100644
> index 000000000000..be3d3c6ac83e
> --- /dev/null
> +++ b/arch/loongarch/include/uapi/asm/sigcontext.h
> @@ -0,0 +1,44 @@
> +/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
> +/*
> + * Author: Hanlu Li <lihanlu@...ngson.cn>
> + *         Huacai Chen <chenhuacai@...ngson.cn>
> + *
> + * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
> + */
> +#ifndef _UAPI_ASM_SIGCONTEXT_H
> +#define _UAPI_ASM_SIGCONTEXT_H
> +
> +#include <linux/types.h>
> +#include <linux/posix_types.h>
> +
> +/* FP context was used */
> +#define SC_USED_FP		(1 << 0)
> +/* Address error was due to memory load */
> +#define SC_ADDRERR_RD		(1 << 30)
> +/* Address error was due to memory store */
> +#define SC_ADDRERR_WR		(1 << 31)

Looks nice.

BTW: following some communication it appears that the SC_ADDRERR_* 
constants are not tightly coupled to BUS_ADRERR after all, so the 
spelling is "fixed".

I don't have anything more to comment, because the rest are either 
reviewed or non-userspace-ABI that don't exactly require getting right 
from the beginning. (Not to say they're flawed.)

Reviewed-by: WANG Xuerui <git@...0n.name>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ