Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 6 Aug 2019 12:31:00 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: [PATCH 1/2] fix risc64 conflict with kernel headers

On Tue, Aug 06, 2019 at 08:51:13AM +0300, Baruch Siach wrote:
> Rename user registers struct definitions to avoid conflict with the
> asm/ptrace.h kernel header that defines the same structs. Use the
> __riscv_mc prefix as glibc does.
> ---
>  arch/riscv64/bits/signal.h | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/riscv64/bits/signal.h b/arch/riscv64/bits/signal.h
> index 4c94a8f02edc..76d7ad80c8cd 100644
> --- a/arch/riscv64/bits/signal.h
> +++ b/arch/riscv64/bits/signal.h
> @@ -12,29 +12,29 @@
>  typedef unsigned long greg_t;
>  typedef unsigned long gregset_t[32];
>  
> -struct __riscv_f_ext_state {
> +struct __riscv_mc_f_ext_state {
>  	unsigned int f[32];
>  	unsigned int fcsr;
>  };
>  
> -struct __riscv_d_ext_state {
> +struct __riscv_mc_d_ext_state {
>  	unsigned long long f[32];
>  	unsigned int fcsr;
>  };
>  
> -struct __riscv_q_ext_state {
> +struct __riscv_mc_q_ext_state {
>  	unsigned long long f[64] __attribute__((aligned(16)));
>  	unsigned int fcsr;
>  	unsigned int reserved[3];
>  };
>  
> -union __riscv_fp_state {
> -	struct __riscv_f_ext_state f;
> -	struct __riscv_d_ext_state d;
> -	struct __riscv_q_ext_state q;
> +union __riscv_mc_fp_state {
> +	struct __riscv_mc_f_ext_state f;
> +	struct __riscv_mc_d_ext_state d;
> +	struct __riscv_mc_q_ext_state q;
>  };
>  
> -typedef union __riscv_fp_state fpregset_t;
> +typedef union __riscv_mc_fp_state fpregset_t;
>  
>  typedef struct sigcontext {
>  	gregset_t gregs;
> -- 
> 2.20.1

I confirmed this matches glibc. Applying.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.