* [uml-devel] question about UML sigcontext in tt mode
@ 2005-03-31 10:03 Alex LIU
2005-04-01 18:51 ` Blaisorblade
2005-04-04 14:00 ` Jeff Dike
0 siblings, 2 replies; 5+ messages in thread
From: Alex LIU @ 2005-03-31 10:03 UTC (permalink / raw)
To: UML-dev
Hi,all:
I have a question about the sigcontext in tt mode.The union uml_pt_regs is defined as below(in uml-2.6.7):
--------------------------------
union uml_pt_regs {
#ifdef UML_CONFIG_MODE_TT
struct tt_regs {
long syscall;
void *sc;
} tt;
#endif
#ifdef UML_CONFIG_MODE_SKAS
struct skas_regs {
unsigned long regs[HOST_FRAME_SIZE];
unsigned long fp[HOST_FP_SIZE];
unsigned long xfp[HOST_XFP_SIZE];
unsigned long fault_addr;
unsigned long fault_type;
unsigned long trap_type;
long syscall;
int is_user;
} skas;
#endif
};
-------------------------------------
Then why the tt.sc is defined as void while not as struct sigcontext? Thanks!
Alex
-------------------------------------------------------
This SF.net email is sponsored by Demarc:
A global provider of Threat Management Solutions.
Download our HomeAdmin security software for free today!
http://www.demarc.com/info/Sentarus/hamr30
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [uml-devel] question about UML sigcontext in tt mode 2005-03-31 10:03 [uml-devel] question about UML sigcontext in tt mode Alex LIU @ 2005-04-01 18:51 ` Blaisorblade 2005-04-04 14:00 ` Jeff Dike 1 sibling, 0 replies; 5+ messages in thread From: Blaisorblade @ 2005-04-01 18:51 UTC (permalink / raw) To: user-mode-linux-devel; +Cc: Alex LIU On Thursday 31 March 2005 12:03, Alex LIU wrote: > Hi,all: > > I have a question about the sigcontext in tt mode.The union uml_pt_regs is > defined as below(in uml-2.6.7): > > -------------------------------- > union uml_pt_regs { > #ifdef UML_CONFIG_MODE_TT > struct tt_regs { > long syscall; > void *sc; > } tt; > #endif > #ifdef UML_CONFIG_MODE_SKAS > struct skas_regs { > unsigned long regs[HOST_FRAME_SIZE]; > unsigned long fp[HOST_FP_SIZE]; > unsigned long xfp[HOST_XFP_SIZE]; > unsigned long fault_addr; > unsigned long fault_type; > unsigned long trap_type; > long syscall; > int is_user; > } skas; > #endif > }; > ------------------------------------- > > Then why the tt.sc is defined as void while not as struct sigcontext? > Thanks! I think because of header inclusion problems... you can't include userspace header in kernelspace files and so on. And the above can be included by both kind of files, being in arch/um/include. This could be solved however with a: struct sigcontext; ... struct sigcontext * sc; instead of void* sc; I've not checked however if sc is actually a sigcontext - I rely on what you say. -- Paolo Giarrusso, aka Blaisorblade Linux registered user n. 292729 http://www.user-mode-linux.org/~blaisorblade ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [uml-devel] question about UML sigcontext in tt mode 2005-03-31 10:03 [uml-devel] question about UML sigcontext in tt mode Alex LIU 2005-04-01 18:51 ` Blaisorblade @ 2005-04-04 14:00 ` Jeff Dike 2005-04-05 17:20 ` Rob Landley 1 sibling, 1 reply; 5+ messages in thread From: Jeff Dike @ 2005-04-04 14:00 UTC (permalink / raw) To: Alex LIU; +Cc: UML-dev On Thu, Mar 31, 2005 at 06:03:34PM +0800, Alex LIU wrote: > union uml_pt_regs { > #ifdef UML_CONFIG_MODE_TT > struct tt_regs { > long syscall; > void *sc; > } tt; > #endif > }; > ------------------------------------- > > Then why the tt.sc is defined as void while not as struct sigcontext? Thanks! Probably because you can't get a definition of struct sigcontext into processor.h and have it still compile. Try #including sigcontext.h there and you'll see what I mean. Jeff ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [uml-devel] question about UML sigcontext in tt mode 2005-04-04 14:00 ` Jeff Dike @ 2005-04-05 17:20 ` Rob Landley 2005-04-05 20:59 ` Blaisorblade 0 siblings, 1 reply; 5+ messages in thread From: Rob Landley @ 2005-04-05 17:20 UTC (permalink / raw) To: user-mode-linux-devel; +Cc: Jeff Dike, Alex LIU On Monday 04 April 2005 10:00 am, Jeff Dike wrote: > On Thu, Mar 31, 2005 at 06:03:34PM +0800, Alex LIU wrote: > > union uml_pt_regs { > > #ifdef UML_CONFIG_MODE_TT > > struct tt_regs { > > long syscall; > > void *sc; > > } tt; > > #endif > > }; > > ------------------------------------- > > > > Then why the tt.sc is defined as void while not as struct sigcontext? > > Thanks! > > Probably because you can't get a definition of struct sigcontext into > processor.h and have it still compile. > > Try #including sigcontext.h there and you'll see what I mean. I don't know about can't. #define sigcontext WALRUS #include <processor.h> thingy #undef WALRUS Adviseable is another matter entirely. (Did I mention I have a knack for coming up with disgusting solutions to impossible problems?) Rob ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [uml-devel] question about UML sigcontext in tt mode 2005-04-05 17:20 ` Rob Landley @ 2005-04-05 20:59 ` Blaisorblade 0 siblings, 0 replies; 5+ messages in thread From: Blaisorblade @ 2005-04-05 20:59 UTC (permalink / raw) To: user-mode-linux-devel; +Cc: Rob Landley, Jeff Dike, Alex LIU On Tuesday 05 April 2005 19:20, Rob Landley wrote: > On Monday 04 April 2005 10:00 am, Jeff Dike wrote: > > On Thu, Mar 31, 2005 at 06:03:34PM +0800, Alex LIU wrote: > > > union uml_pt_regs { > > > #ifdef UML_CONFIG_MODE_TT > > > struct tt_regs { > > > long syscall; > > > void *sc; > > > } tt; > > > #endif > > > }; > > > ------------------------------------- > > > > > > Then why the tt.sc is defined as void while not as struct sigcontext? > > > Thanks! > > > > Probably because you can't get a definition of struct sigcontext into > > processor.h and have it still compile. > > > > Try #including sigcontext.h there and you'll see what I mean. > > I don't know about can't. > > #define sigcontext WALRUS > #include <processor.h> > thingy > #undef WALRUS > > Adviseable is another matter entirely. (Did I mention I have a knack for > coming up with disgusting solutions to impossible problems?) I've not tested if it's impossible in this very case, however: if any host header includes kernel headers on the host, and we include it from a kernelspace file, we run into trouble. So, defining away like you do above every and each identifier present in every possible versions of glibc / kernel headers would indeed work. Is this still a solution? So, we cut the problem by excluding the unusable headers from the compiler search path. arch/um/include are includable everywhere, /usr/include from userspace files, <currentTreeRoot>/include/{asm,linux,*}/ from kernelspace only. If you really come up with a general solution, let us know. Please. Thanks for you effort anyway. -- Paolo Giarrusso, aka Blaisorblade Linux registered user n. 292729 http://www.user-mode-linux.org/~blaisorblade ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-04-05 20:55 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-03-31 10:03 [uml-devel] question about UML sigcontext in tt mode Alex LIU 2005-04-01 18:51 ` Blaisorblade 2005-04-04 14:00 ` Jeff Dike 2005-04-05 17:20 ` Rob Landley 2005-04-05 20:59 ` Blaisorblade
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.