yes, 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() != 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() != 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 = (flags & O_INDIRECT) ? indirect_set_thread_area(&curr->tls): do_set_thread_area(&curr->tls); so replacing the above with ret = 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: > >> for the second problem try the attached patch of a patch. >> > > That's bogus, indirect_set_thread_area() should be moved outside #ifdef. It > has the needed CHOOSE_MODE (or should have it). At least, don't run with it > in TT mode. > > >> Antoine Martin wrote: >> >>> On Fri, 2006-01-06 at 17:41 +0000, Antoine Martin wrote: >>> >>>> 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' >>>> >>> 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 log >>> files for problems? Stop! Download the new AJAX search engine that >>> makes searching your log files as easy as surfing the web. DOWNLOAD >>> SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click >>> _______________________________________________ >>> User-mode-linux-user mailing list >>> User-mode-linux-user@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user >>> > >
signature.asc
Description: OpenPGP digital signature