* Undefined Instruction
@ 2011-11-02 21:03 Xin Tong
2011-11-02 21:07 ` Jiri Kosina
0 siblings, 1 reply; 6+ messages in thread
From: Xin Tong @ 2011-11-02 21:03 UTC (permalink / raw)
To: linux-kernel
If an application contains an undefined instruction to the processor (
x86 in particular ) how does the operating system handle it. does the
operating system just kill the process, or it will throw signals,
trying to recover from it ?
Thanks
Xin
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Undefined Instruction
2011-11-02 21:03 Undefined Instruction Xin Tong
@ 2011-11-02 21:07 ` Jiri Kosina
2011-11-02 21:08 ` Xin Tong
0 siblings, 1 reply; 6+ messages in thread
From: Jiri Kosina @ 2011-11-02 21:07 UTC (permalink / raw)
To: Xin Tong; +Cc: linux-kernel
On Wed, 2 Nov 2011, Xin Tong wrote:
> If an application contains an undefined instruction to the processor (
> x86 in particular ) how does the operating system handle it. does the
> operating system just kill the process, or it will throw signals,
> trying to recover from it ?
CPU will trap and kernel will send SIGILL to the process.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Undefined Instruction
2011-11-02 21:07 ` Jiri Kosina
@ 2011-11-02 21:08 ` Xin Tong
2011-11-02 21:10 ` Jiri Kosina
0 siblings, 1 reply; 6+ messages in thread
From: Xin Tong @ 2011-11-02 21:08 UTC (permalink / raw)
To: Jiri Kosina; +Cc: linux-kernel
If i change the kernel, i could have the application stary alive right ?
Thanks
Xin
On Wed, Nov 2, 2011 at 5:07 PM, Jiri Kosina <jkosina@suse.cz> wrote:
> On Wed, 2 Nov 2011, Xin Tong wrote:
>
>> If an application contains an undefined instruction to the processor (
>> x86 in particular ) how does the operating system handle it. does the
>> operating system just kill the process, or it will throw signals,
>> trying to recover from it ?
>
> CPU will trap and kernel will send SIGILL to the process.
>
> --
> Jiri Kosina
> SUSE Labs
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Undefined Instruction
2011-11-02 21:08 ` Xin Tong
@ 2011-11-02 21:10 ` Jiri Kosina
2011-11-02 21:14 ` Xin Tong
0 siblings, 1 reply; 6+ messages in thread
From: Jiri Kosina @ 2011-11-02 21:10 UTC (permalink / raw)
To: Xin Tong; +Cc: linux-kernel
On Wed, 2 Nov 2011, Xin Tong wrote:
> If i change the kernel, i could have the application stary alive right ?
No need for any kernel changes. You can set your own signal handler for
SIGILL (but iirc that will make any further behavior of your application
undefined as long as POSIX is involved).
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Undefined Instruction
2011-11-02 21:10 ` Jiri Kosina
@ 2011-11-02 21:14 ` Xin Tong
2011-11-03 19:15 ` Giel van Schijndel
0 siblings, 1 reply; 6+ messages in thread
From: Xin Tong @ 2011-11-02 21:14 UTC (permalink / raw)
To: Jiri Kosina; +Cc: linux-kernel
There must be a default handler install for every application on linux
, right ? Is there any signal that the operating system simply kills
the programs without sending a signal to the user level ?
Thanks
Xin
On Wed, Nov 2, 2011 at 5:10 PM, Jiri Kosina <jkosina@suse.cz> wrote:
> On Wed, 2 Nov 2011, Xin Tong wrote:
>
>> If i change the kernel, i could have the application stary alive right ?
>
> No need for any kernel changes. You can set your own signal handler for
> SIGILL (but iirc that will make any further behavior of your application
> undefined as long as POSIX is involved).
>
> --
> Jiri Kosina
> SUSE Labs
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Undefined Instruction
2011-11-02 21:14 ` Xin Tong
@ 2011-11-03 19:15 ` Giel van Schijndel
0 siblings, 0 replies; 6+ messages in thread
From: Giel van Schijndel @ 2011-11-03 19:15 UTC (permalink / raw)
To: Xin Tong; +Cc: Jiri Kosina, linux-kernel
On Wed, Nov 02, 2011 at 05:14:17PM -0400, Xin Tong wrote:
> On Wed, Nov 2, 2011 at 5:10 PM, Jiri Kosina <jkosina@suse.cz> wrote:
>> On Wed, 2 Nov 2011, Xin Tong wrote:
>>
>>> If i change the kernel, i could have the application stary alive
>>> right?
>>
>> No need for any kernel changes. You can set your own signal handler
>> for SIGILL (but iirc that will make any further behavior of your
>> application undefined as long as POSIX is involved).
>
> There must be a default handler install for every application on
> linux, right ? Is there any signal that the operating system simply
> kills the programs without sending a signal to the user level ?
It's known by the rather straightforward name of SIGKILL. I.e. userland
cannot install a signal handler for that signal, the process just gets
killed.
--
Met vriendelijke groet,
With kind regards,
Giel van Schijndel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-11-03 19:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-02 21:03 Undefined Instruction Xin Tong
2011-11-02 21:07 ` Jiri Kosina
2011-11-02 21:08 ` Xin Tong
2011-11-02 21:10 ` Jiri Kosina
2011-11-02 21:14 ` Xin Tong
2011-11-03 19:15 ` Giel van Schijndel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®