Re: [PATCH 10/19] LoongArch: Add signal handling support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, Ruoyao,

On Fri, Aug 27, 2021 at 12:44 AM Xi Ruoyao <xry111@xxxxxxxxxxxxxxxx> wrote:
>
> On Tue, 2021-07-06 at 12:18 +0800, Huacai Chen wrote:
>
> > +/**
> > + * struct ucontext - user context structure
> > + * @uc_flags:
> > + * @uc_link:
> > + * @uc_stack:
> > + * @uc_mcontext:       holds basic processor state
> > + * @uc_sigmask:
> > + * @uc_extcontext:     holds extended processor state
> > + */
> > +struct ucontext {
> > +       /* Historic fields matching asm-generic */
> > +       unsigned long           uc_flags;
> > +       struct ucontext         *uc_link;
> > +       stack_t                 uc_stack;
> > +       struct sigcontext       uc_mcontext;
> > +       sigset_t                uc_sigmask;
> > +
> > +       /* Extended context structures may follow ucontext */
> > +       unsigned long long      uc_extcontext[0];
> > +};
> > +
> > +#endif /* __LOONGARCH_UAPI_ASM_UCONTEXT_H */
>
> Hi Huacai,
>
> Maybe this is off topic, but I just seen something damn particular in
> your workmates' glibc repo:
>
> https://github.com/loongson/glibc/commit/86d7512949640642cdf767fb6beb077d446b2857
> "Modify struct mcontext_t and ucontext_t layout":
The V1 of kernel patchset "match" the old, un-pulblic toolchain, and
the new public toolchain (which you have seen) adjust ucontext, and
the V2 of kernel patchset will be also update ucontext. But anyway,
thank you very much!

Huacai

>
> > @@ -75,8 +73,8 @@ typedef struct ucontext_t
> >    unsigned long int __uc_flags;
> >    struct ucontext_t *uc_link;
> >    stack_t uc_stack;
> > -  mcontext_t uc_mcontext;
> >    sigset_t uc_sigmask;
> > +  mcontext_t uc_mcontext;
> >  } ucontext_t;
>
> AFAIK if this doesn't match the struct ucontext definition above, the
> system will just blow up?  Have you coordinated with the change?
>



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux