Questions tagged [kernel-mode]

Kernel mode, also referred to as system mode, is one of the two distinct modes of operation of the CPU, in which core operating system components, including device drivers, execute.

Kernel mode, also referred to as system mode, is one of the two distinct modes of operation of the CPU, in which core operating system components, including device drivers, execute.

All code that runs in kernel mode shares a single virtual address space. This means that a kernel-mode driver is not isolated from other drivers and the operating system itself. If a kernel-mode driver accidentally writes to the wrong virtual address, data that belongs to the operating system or another driver could be compromised. If a kernel-mode driver crashes, the entire operating system crashes.

http://msdn.microsoft.com/en-us/library/windows/hardware/ff554836(v=vs.85).aspx
http://www.linfo.org/kernel_mode.html

144 questions
0
votes
0 answers

CreateFile() function = INVALID_HANDLE_VALUE

I'm trying connect with my driver where i created the SymbolicLink this way: #include #include #include #include PDEVICE_OBJECT pDeviceObject; UNICODE_STRING dev, dos; void MyUnloadProc(IN…
user13342579
0
votes
0 answers

ZwQueryInformationFile() on Windows 64 bits

I have the following code that works fine on Windows 32, already when tested on Windows 64 the text (the path of file) comes missing somes bytes, example: \Program Files\Folder Software\Subfolder\123456.dll > Windows 32 OK rogram Files\Folder…
user13342579
0
votes
0 answers

Will CPL <= DPL only be checked when loading to segment register?

I'm wondering if we will check CPL <= DPL when we do a mov statement without loading to a segment register. Like: mov %fs:(%eax), %ebx I'm wondering this because I was thinking about what will happen if there is a flaw in operating system: OS sets…
0
votes
2 answers

How to implement SVC handler on ARM926EJ-S?

I'm writing an amateur operating system for ARM-based devices and currently trying to make it working in QEMU's versatilepb (ARM926EJ-S). The problem arrives when I try to implement syscalls to my kernel. The idea is pretty simple: to implement…
Alexander Perechnev
  • 2,797
  • 3
  • 21
  • 35
0
votes
1 answer

Accessing IO ports on embedded machine running Windows

I am having trouble entering the extended function mode of the Nuvoton NCT6793D. The datasheet says to write 87h twice to to the regsiter 2Eh but on trying to do so I get an exception thrown by Visual Studio that the 3rd line is a 'privileged…
Rahul
  • 177
  • 3
  • 9
0
votes
1 answer

how can I make sure my progam is working successfully in kernel mode?

how can I make sure my program is working successfully in kernel mode or level in driver programming? And how I can use this program if there is any program need to use?
user663161
  • 19
  • 1
  • 3
0
votes
1 answer

OSDev: Why my memory allocation function suddenly stops working in the AHCI initialization function?

After my kernel calls the AHCIInit() function inside of the ArchInit() function, I get a page fault in one of the MemAllocate() calls, and this only happens in real machines, as I tried replicating it on VirtualBox, VMWare and QEMU. I tried…
NTRO
  • 11
  • 1
0
votes
0 answers

How to change page protection from kernel mode in a usermode process

I have gotten very interested in windows kernel mode development recently and I am trying to write a jmp instruction inside a program in usermode. It is important to note my driver is manual mapped to kernel space via drvmap. I can read/write easily…
iZeusify
  • 140
  • 1
  • 7
0
votes
1 answer

Can I install a kernel mode driver without user being logged in?

Is there any way that I can install my driver WITHOUT the user being logged in. Details: My driver is signed with a valid Extended Validation Certificate. (it has gone through MS driver signing as well) I have an AdvancedInstaller install project…
MrLister
  • 634
  • 7
  • 32
0
votes
2 answers

Fork() in XV6, does the process child execute in kernel or user mode?

In XV6, when a fork() is called, does the child execute in kernel mode or user mode? This is the fork code in XV6: // Create a new process copying p as the parent. // Sets up stack to return as if from system call. // Caller must set state of…
Nicolò Gasparini
  • 2,228
  • 2
  • 24
  • 53
0
votes
0 answers

Driver Unload Notification

I'm very new to windows development specially in the field of driver creation. I want to create a driver that will be notified whenever another driver(s) (Any type of driver but preferably not device driver) has been unloaded. So far (I maybe…
Brex
  • 3
  • 3
0
votes
1 answer

Calling a java program from a kernel mode driver

I have a command-line java program that I will need to call from a kernel mode driver (a MiniFilter Driver on Windows). Is it possible ? Is there somethings I will have to take care to avoid problems ? How can I do this ?
Krag
  • 79
  • 1
  • 9
0
votes
0 answers

When a C-program with empy main body executes, would it only involves user-mode?

Typically, when a program starts executing, it begins in user-mode and then depending on the body of the code, if required enters kernel/system mode, and eventually exits in the user-mode where it exits legitimately. But consider the following C…
0
votes
1 answer

Is changing the value of any register(DR, IR etc) requires switching from user mode to kernel mode?

1)So in the book that I'm reading it says for example changing IR register does not require switching from user mode to kernel mode, but i don't get it, how can i know if it requires switching or not? 2)also what about other registers, like DR, PSW,…
0
votes
1 answer

linux syscall using spinlock returning value to userspace

I'm, currently struggling with the correct implementation of a kernel-spinlock in combination with a return statement which should return a value to userspace. I implemented a kernel syscall 'sys_kernel_entropy_is_recording' which should return the…
OliverJL
  • 23
  • 5