printk inside system_call handler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I'm trying to use printk inside the i386's system_call handler.
I just added a printk if the system call is exit...
this is the code:

msg:
.asciz "exit system call\n"

ENTRY(system_call)
	cmp $1, %eax
	jne go_ahead
	pusha
	pushl msg
	call printk
	popl %eax
	popa
go_ahead:
	#original of system_call code comes here

I get some nasty OOPS when an application calls int 0x80 with eax=$1
(i.e. calls the exit system call).
the message is BUG: unable to handle kernel paging request at virtual
address 6c6c696b...

anyone has a clue ?

thanks a lot,
Clay.


(btw, this is just me experimenting for educational purposes, it's not
something i would ever use in real code, so i'm just trying to understand
the bug, i know this is a big no-no code...:)

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux