[2/3] LoongArch: Add RSEQ_SIG break code definition

Message ID 20231026114446.5932-2-huangpei@loongson.cn
State New
Headers
Series [1/3] selftests/rseq: Add 64bit LoongArch support |

Commit Message

Huang Pei Oct. 26, 2023, 11:44 a.m. UTC
  Signed-off-by: Huang Pei <huangpei@loongson.cn>
---
 arch/loongarch/include/uapi/asm/break.h | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Mathieu Desnoyers Oct. 26, 2023, 6:07 p.m. UTC | #1
On 2023-10-26 07:44, Huang Pei wrote:
> Signed-off-by: Huang Pei <huangpei@loongson.cn>
> ---
>   arch/loongarch/include/uapi/asm/break.h | 2 ++

Why is this part of the uapi ? None of the other architecture has this 
as part of uapi. It's only defined in the rseq selftest arch-specific 
header file.

Thanks,

Mathieu

>   1 file changed, 2 insertions(+)
> 
> diff --git a/arch/loongarch/include/uapi/asm/break.h b/arch/loongarch/include/uapi/asm/break.h
> index bb9b82ba59f2..e0fcfc304834 100644
> --- a/arch/loongarch/include/uapi/asm/break.h
> +++ b/arch/loongarch/include/uapi/asm/break.h
> @@ -20,4 +20,6 @@
>   #define BRK_UPROBE_BP		12	/* See <asm/uprobes.h> */
>   #define BRK_UPROBE_XOLBP	13	/* See <asm/uprobes.h> */
>   
> +#define BRK_RSEQ_SIG		16	/* See rseq */
> +
>   #endif /* __UAPI_ASM_BREAK_H */
  
Huacai Chen Oct. 27, 2023, 1:40 a.m. UTC | #2
Hi, Mathieu,

On Fri, Oct 27, 2023 at 2:16 AM Mathieu Desnoyers
<mathieu.desnoyers@efficios.com> wrote:
>
> On 2023-10-26 07:44, Huang Pei wrote:
> > Signed-off-by: Huang Pei <huangpei@loongson.cn>
> > ---
> >   arch/loongarch/include/uapi/asm/break.h | 2 ++
>
> Why is this part of the uapi ? None of the other architecture has this
> as part of uapi. It's only defined in the rseq selftest arch-specific
> header file.
From my point of view, it makes sense to list the dedicated break code
in UAPI. It is harmless and can avoid potential conflict in future.

Huacai

>
> Thanks,
>
> Mathieu
>
> >   1 file changed, 2 insertions(+)
> >
> > diff --git a/arch/loongarch/include/uapi/asm/break.h b/arch/loongarch/include/uapi/asm/break.h
> > index bb9b82ba59f2..e0fcfc304834 100644
> > --- a/arch/loongarch/include/uapi/asm/break.h
> > +++ b/arch/loongarch/include/uapi/asm/break.h
> > @@ -20,4 +20,6 @@
> >   #define BRK_UPROBE_BP               12      /* See <asm/uprobes.h> */
> >   #define BRK_UPROBE_XOLBP    13      /* See <asm/uprobes.h> */
> >
> > +#define BRK_RSEQ_SIG         16      /* See rseq */
> > +
> >   #endif /* __UAPI_ASM_BREAK_H */
>
> --
> Mathieu Desnoyers
> EfficiOS Inc.
> https://www.efficios.com
>
>
  

Patch

diff --git a/arch/loongarch/include/uapi/asm/break.h b/arch/loongarch/include/uapi/asm/break.h
index bb9b82ba59f2..e0fcfc304834 100644
--- a/arch/loongarch/include/uapi/asm/break.h
+++ b/arch/loongarch/include/uapi/asm/break.h
@@ -20,4 +20,6 @@ 
 #define BRK_UPROBE_BP		12	/* See <asm/uprobes.h> */
 #define BRK_UPROBE_XOLBP	13	/* See <asm/uprobes.h> */
 
+#define BRK_RSEQ_SIG		16	/* See rseq */
+
 #endif /* __UAPI_ASM_BREAK_H */