Questions tagged [assembly-trap]
12 questions
4
votes
1 answer
HYPERVISORS: Peculiar lack of functionality across different virtualization technologies
Working with Intel's VMX and ARM's virt-extensions, I have noticed the lack of a functionality that would be very useful when implementing hypervisors.
Within the workings of a hypervisor, it is often necessary to trap a guest behavior, but only for…

Zuzu Corneliu
- 1,594
- 2
- 15
- 27
2
votes
0 answers
ARM HYPERVISOR: Execute single instruction and trap (equivalent of Intel's MTF)
I'm implementing a hypervisor on ARM and I need to know if there's a way to resume (ERET) the guest and trap after a single instruction execution, without depending on the debug architecture (v7.1). I could use a software approach by modifying the…

Zuzu Corneliu
- 1,594
- 2
- 15
- 27
2
votes
1 answer
kernel software trap handling
I'm reading a book on Windows Internals and there's something I don't understand:
"The kernel handles software interrupts either as part of hardware interrupt handling or synchronously when a thread invokes kernel functions related to the software…

Tony The Lion
- 61,704
- 67
- 242
- 415
2
votes
1 answer
Hardware or software interrupt or exception by trap instruction?
The manual says
Trap Instruction
When a program issues the trap instruction, the
processor generates a software trap exception. A program typically
issues a software trap when the program requires servicing by the
operating system. The general…

Niklas Rosencrantz
- 25,640
- 75
- 229
- 424
2
votes
2 answers
Why is issuing a trap not a priviledged task?
In solutions to a question on the book "Operating Systems Concepts" it indicates that issuing a trap not a privileged task. Why is that so?

Alexander Suraphel
- 10,103
- 10
- 55
- 90
1
vote
1 answer
How to debug SIGTRAP using gdb?
My own program uses SIGTRAP signal. I want to use gdb to debug my program.
However, when the SIGTRAP is raised in my program, gdb cannot go into my trap handler.
How to single step into my trap handler?

flyingbin
- 1,097
- 2
- 11
- 28
1
vote
0 answers
Can gdb fix an ARM alignment trap and continue to the next trap?
We are tracking down some alignment traps on our ARM project - gdb is very helpful at catching the first trap - is there a way to continue past an alignment trap (letting the kernel fix it) so we could collect info on more of traps? Right now we are…

Jeff
- 1,969
- 3
- 21
- 35
1
vote
1 answer
Does running an interrupt handler create a new process, or is it part of an existing process?
From the beginning of https://en.wikipedia.org/wiki/Interrupt, there are three different kinds of interrupts:
a hardware interrupt,
A software interrupt caused by an exceptional condition in the processor itself (often called a trap or…

Tim
- 1
- 141
- 372
- 590
1
vote
2 answers
Determine CPU trap that caused SIGSEGV under GDB?
I've got a program that's SIGSEGV'ing in library code. Nothing is jumping out at me when looking at the statement that's causing the SIGSEGV (see below). But the code uses Intel's AES-NI, and I'm not that familiar with it.
I issued handle all in…

jww
- 97,681
- 90
- 411
- 885
0
votes
1 answer
Masking interrupts when going back to kernel mode
I'm working on MIT's JOS (lab for 6.828 operating system class).
In this simple OS, interrupts are disabled in kernel mode (cli is the first instruction run by the kernel). Interrupts are re-enabled once we launch a user process by setting up the…

Nemo
- 461
- 4
- 15
0
votes
1 answer
Why page fault is considered as trap
Why page fault is considered as trap instead of interrupt?
And what exactly is the stages take place when you try access null pointer until you get segmentation fault? and the signal which is sent in this situations I SIGILL, right?
Thanks!

Yuval Simon
- 335
- 1
- 10
-1
votes
1 answer
How does an instruction know if it's running in privilleged or user mode?
In a class the prof said "an [assembly] instruction knows if it's running in privileged or user mode because if a trap is produced then it's user mode".
First off I assume it can't be any trap but a specific trap saying that the command cannot be…

Celeritas
- 14,489
- 36
- 113
- 194