[LTP] clone10.c failed on 32bit compilation

Wei Gao wegao@suse.com
Wed Jan 21 05:14:34 CET 2026


On Tue, Jan 20, 2026 at 09:13:25PM +0800, Li Wang wrote:
> Petr Vorel <pvorel@suse.cz> wrote:
> 
> > FYI the patch is invalid. It should have been:
> >
> > diff --git include/lapi/tls.h include/lapi/tls.h
> > index a067872e0f..eee77899e8 100644
> > --- include/lapi/tls.h
> > +++ include/lapi/tls.h
> > @@ -64,7 +64,7 @@ static inline void init_tls(void)
> >         tls_ptr = allocate_tls_area();
> >         tls_desc = SAFE_MALLOC(sizeof(*tls_desc));
> >         memset(tls_desc, 0, sizeof(*tls_desc));
> > -       tls_desc->entry_number = -1;
> > +       tls_desc->entry_number = 13;
> >         tls_desc->base_addr = (unsigned long)tls_ptr;
> >         tls_desc->limit = TLS_SIZE;
> >         tls_desc->seg_32bit = 1;
> > @@ -72,7 +72,7 @@ static inline void init_tls(void)
> >         tls_desc->read_exec_only = 0;
> >         tls_desc->limit_in_pages = 0;
> >         tls_desc->seg_not_present = 0;
> > -       tls_desc->useable = 1;
> > +       tls_ptr = tls_desc;
> 
> @Wei, @Petr, did you get it to work after trying the above diff?
> Which kernel did you use?
6.19.0-rc5-gb71e635feefc , above diff can not work, just some try.

> 
> Unfortunately, neither of these methods (including Wei's method) works
> properly on my kernel-6.19.0-rc2 platform.
> 
> And no matter what method I try, the child process still cannot switch
> to the new TLS. More details see I posted in the pre-thread.
Yes, i guess we are still blocking on i386 scenario. But we can rewrite
parent TLS's base_addr instead of switch new TLS, this way is correct
base current kernel's logic but still need further implementation.
> 
> 
> -- 
> Regards,
> Li Wang
> 


More information about the ltp mailing list