, blaise,
i read your comment from the november posting to the list in response to
this problem reported then and tried it...
#ifdef CONFIG_MODE_TT
/* This is for use by the tracing thread in special situations (see
below). */
static int indirect_set_thread_area_tt(struct user_desc *info) {
BUG_ON(os_getpid() !=3D tracing_pid);
return os_set_thread_area(info, current->thread.mode.tt.extern_pid);
}
#endif
static inline int indirect_set_thread_area(struct user_desc *info) {
if (mode_tt)
return indirect_set_thread_area_tt(info);
else
return 0;
}
moving the #endif doesn't work because then we have the unresolved
reference to the indirect_set_thread_area_tt() -- you have to have the
CHOOSE_MODE or CHOOSE_MODE_PROC somewhere in there to macro the
unused/undefined mode_tt away.
so as to why my patch is bogus ... in load_TLS() you have this check
early on
if (flags & O_INDIRECT)
BUG_ON(CHOOSE_MODE(os_getpid() !=3D tracing_pid, 1));
looks like you blow up if this flag is set and we're not TT so
i figured the check here could be removed - ah - but it could be
not set it TT mode and you still want to do_set_thread_area....
ret =3D (flags & O_INDIRECT) ?
indirect_set_thread_area(&curr->tls): do_set_thread_area(&curr->tls);
so replacing the above with
ret =3D CHOOSE_MODE_PROC( indirect_set_thread_area,
do_set_thread_area, &curr->tls );
would always call indirect_set_thread_area for TT mode and you only want
that if it is the tracing_pid
else you want do_set_thread_area... oops... my bad.
so you'd move the #endif and do/did this instead?
static inline int indirect_set_thread_area(struct user_desc *info) {
CHOOSE_MODE( return indirect_set_thread_area_tt(info), 0);
}
right?
thanks for the eyes and the time.
db
Blaisorblade wrote:
> On Monday 16 January 2006 18:10, D. Bahi wrote:
> =20
>> for the second problem try the attached patch of a patch.
>> =20
>
> That's bogus, indirect_set_thread_area() should be moved outside #ifdef=
=2E It=20
> has the needed CHOOSE_MODE (or should have it). At least, don't run wit=
h it=20
> in TT mode.
>
> =20
>> Antoine Martin wrote:
>> =20
>>> On Fri, 2006-01-06 at 17:41 +0000, Antoine Martin wrote:
>>> =20
>>>> Failed right at the end... (TT disabled)
>>>>
>>>> LD .tmp_vmlinux1
>>>>
>>>> arch/um/sys-i386/built-in.o(.text+0x2f8e): In function `load_TLS':
>>>> : undefined reference to `indirect_set_thread_area'
>>>> =20
>>> Tried again today, problems:
>>> * static build fails during linking stage
>>> * skas build fails as above (the indirect_set_thread_area is only
>>> defined if TT mode is on but it is used even if TT mode is off)
>>>
>>> Antoine
>>>
>>>
>>>
>>> -------------------------------------------------------
>>> This SF.net email is sponsored by: Splunk Inc. Do you grep through lo=
g
>>> files for problems? Stop! Download the new AJAX search engine that
>>> makes searching your log files as easy as surfing the web. DOWNLOAD=
>>> SPLUNK!
>>> _______________________________________________
>>> User-mode-linux-user mailing list
>>> User-mode-linux-user@...
>>>
>>> =20
>
> =20
View entire thread
I agree to receive quotes, newsletters and other information from sourceforge.net and its partners regarding IT services and products. I understand that I can withdraw my consent at any time. Please refer to our Privacy Policy or Contact Us for more details