Re: module to detect sigsegv

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

 



* Donald Zoch (donald.zoch@amd.com) wrote:
> I'm new to kernel programming and have set the goal of writing
> a kernel module to detect signal 11 errors and log them.  
> My question is what is the best way to attack this in a module? 
> I've figured out how to write a basic module, but I'm having a
> hard time figuring out how to do the checking.
> How can I look at every signal that the kernel sends to processes
> and pick out those that I want to report on?  Or how can I have
> something executed on every context switch so I can perhaps check
> to see if SIGSEGV is a pending signal for current?  

I guees the logger11 wasn't what you were looking for ;-) Two choices.
1) Place a hook in a core signal sending code (e.g. send_signal), and
implement the hook in your module.  2) use LSM hook in signal permission
check, but his will miss the page fault generated SEGVs which are
probably the one's you care about.

cheers,
-chris
-- 
Linux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net
--
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