All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] Manual interrupt handling by cli/sti instructions
@ 2006-04-04 19:23 Rodrigo Rosenfeld Rosas
  2006-04-05 21:58 ` [Xenomai-core] " Philippe Gerum
  0 siblings, 1 reply; 2+ messages in thread
From: Rodrigo Rosenfeld Rosas @ 2006-04-04 19:23 UTC (permalink / raw)
  To: Philippe Gerum, xenomai-core

Hi Philippe,

Actually I think it is an Adeos issue, but it is also relevant for Xenomai.

Does Adeos have any protection (I do not know if it is even possible to) 
against a Linux module issuing a cli/sti code directly through arch specific 
code instead of through some Linux API. Putting it in other way, is it 
possible that a third-party module breaks out the determinism in the Xenomai 
domain?

Thanks in advance,

Rodrigo.

		
_______________________________________________________ 
Novo Yahoo! Messenger com voz: Instale agora e faça ligações de graça. 
http://br.messenger.yahoo.com/



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Xenomai-core] Re: Manual interrupt handling by cli/sti instructions
  2006-04-04 19:23 [Xenomai-core] Manual interrupt handling by cli/sti instructions Rodrigo Rosenfeld Rosas
@ 2006-04-05 21:58 ` Philippe Gerum
  0 siblings, 0 replies; 2+ messages in thread
From: Philippe Gerum @ 2006-04-05 21:58 UTC (permalink / raw)
  To: Rodrigo Rosenfeld Rosas; +Cc: xenomai-core

Rodrigo Rosenfeld Rosas wrote:
> Hi Philippe,
> 
> Actually I think it is an Adeos issue, but it is also relevant for Xenomai.
> 
> Does Adeos have any protection (I do not know if it is even possible to) 
> against a Linux module issuing a cli/sti code directly through arch specific 
> code instead of through some Linux API. Putting it in other way, is it 
> possible that a third-party module breaks out the determinism in the Xenomai 
> domain?

Yes, we cannot do much about misbehaving binary-only module or code 
which does not use the kernel API to control the interrupt mask at CPU 
level.

A way to deal with this on x86 would be to move the kernel code to a 
different protection ring than #0, so that using protected insns like 
cli/sti would beget an exception (provided no one fiddles with the iopl 
though), and route the hw masking/unmasking requests to the virtualized 
Adeos pipeline stall/unstall ops instead. Obviously, an awful lot of 
other issues would be raised by such move, such as dealing with other 
protected insns/accesses, and beyond that, all the mess people doing 
full O/S virtualization have to deal with on a daily basis.

Another way would be to play the "afterburing" game I guess, searching 
for cli/sti opcodes in the kernel/driver image and poking replacement 
code to do the same virtualization stuff, but the original opcodes are 
only 1-byte long, so some additional trickery would likely be needed, 
along with other issues the afterburning technique raises (e.g. you 
don't want to replace _all_ hw interrupt masking/unmasking in the image 
blindly).

> 
> Thanks in advance,
> 
> Rodrigo.
> 
> 		
> _______________________________________________________ 
> Novo Yahoo! Messenger com voz: Instale agora e faça ligações de graça. 
> http://br.messenger.yahoo.com/
> 


-- 

Philippe.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-04-05 21:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-04 19:23 [Xenomai-core] Manual interrupt handling by cli/sti instructions Rodrigo Rosenfeld Rosas
2006-04-05 21:58 ` [Xenomai-core] " Philippe Gerum

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.