Sponsored Content
Operating Systems Linux Howto compile my own module into the kernel Post 302504978 by fpmurphy on Tuesday 15th of March 2011 10:06:47 PM
Old 03-15-2011
Quote:
The bad thing about it is: The function to set the hook to the LSM is not exported.
What distribution and version are you on? Which specific function is not exported?

LSM has a pretty complete abstraction layer to allow different security modules to be safely loaded and unloaded without messing with the kernel directly. Look at struct security_operations in /include/linux/security.h to see the huge number of function pointers available to you.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Howto locate locally installed Perl module for a CGI script in APACHE .htaccess

Hi, I have the following simple CGI script, just containg header: #!/usr/bin/perl -w use CGI ':standard'; use lib "/home/myname/lib/perl5/site_perl/5.8.5/"; use Mail::Sendmail; I also have included this directive in ~/public_html/.htaccess : SetEnv PERL5LIB... (0 Replies)
Discussion started by: monkfan
0 Replies

2. SuSE

max number of slabs per kernel module (kernel 2.6.17, suse)

Hi All, Is there a max number of slabs that can be used per kernel module? I'm having a tough time finding out that kind of information, but the array 'node_zonelists' (mmzone.h) has a size of 5. I just want to avoid buffer overruns and other bad stuff. Cheers, Brendan (4 Replies)
Discussion started by: Brendan Kennedy
4 Replies

3. Linux

How to convert Linux Kernel built-in module into a loadable module

Hi all, I am working on USB data monitoring on Fedora Core 9. Kernel 2.6.25 has a built-in module (the one that isn't loadable, but compiles and links statically with the kernel during compilation) to snoop USB data. It is in <kernel_source_code>/drivers/usb/mon/. I need to know if I can... (0 Replies)
Discussion started by: anitemp
0 Replies

4. Linux

Compile new kernel in Fedora 5

Hi All, I try to compile new kernel in FC5. New kernel version - 2.6.20.21 Operating System - Fedora 5 I have followed these steps, make menuconfig make make modules make modules_install make install Then i have changed the grub.cong and reboot the system with new kernel. The... (0 Replies)
Discussion started by: viveksnv
0 Replies

5. Debian

compile kernel with OFED

Hello Friends, I know how to compile the kernel . But I don't know how to compile the kernel with OFED. Can any one assist me on that. Or can anyone send me the link. Thank you. (0 Replies)
Discussion started by: pradeepreddy
0 Replies

6. Linux

kernel compile

Dear experts, How can compile the kernel as application mode? Thanks in advance. (2 Replies)
Discussion started by: Zaxon
2 Replies

7. Ubuntu

Kernel compile error

Hi I'm compiling a real-time kernel in linux, but after I type make bzImage things end with this: (Things going well doing CC and things).... CC arch/x86/kernel/kgdb.o CC arch/x86/kernel/vm86_32.o CC arch/x86/kernel/early_printk.o CC arch/x86/kernel/ipipe.o... (2 Replies)
Discussion started by: mdop
2 Replies

8. Ubuntu

Compile smbfs module in kernel version 3.10 running Ubuntu 12.04 LTS

Is there any way to compile smbfs module in kernel 3.10 running Ubuntu 12.04 LTS. I did a 'make menuconfig' and it shows cifs. I found out online that smbfs is deprecated and replaced by cifs. I have an old system with kernel version 2.4 which only has smbfs (no cifs). Is it possible to compile... (1 Reply)
Discussion started by: Monil
1 Replies

9. Linux

Unload kernel module at boot time (Debian Wheezy 7.2, 3.2.0-4-686-pae kernel)

Hi everyone, I am trying to prevent the ehci_hcd kernel module to load at boot time. Here's what I've tried so far: 1) Add the following line to /etc/modprobe.d/blacklist.conf (as suggested here): 2) Blacklisted the module by adding the following string to 3) Tried to blacklist the module... (0 Replies)
Discussion started by: gacanepa
0 Replies

10. Solaris

Compile PHP as an Apache module on Solaris

Hi, I need to install php 5.5.30 as an apache (2.4.17) module on Solaris 10. Please any help is wellcome. Some aditional info: /usr/sfw/bin/gcc -v Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs bash-3.2# g++ -v Reading specs from... (0 Replies)
Discussion started by: lbslbs
0 Replies
SHUTDOWNHOOK_ESTABLISH(9)				   BSD Kernel Developer's Manual				 SHUTDOWNHOOK_ESTABLISH(9)

NAME
shutdownhook_establish, shutdownhook_disestablish -- add or remove a shutdown hook SYNOPSIS
void * shutdownhook_establish(void (*fn)(void *), void *arg); void shutdownhook_disestablish(void *cookie); DESCRIPTION
The shutdownhook_establish API is deprecated. The shutdownhook_establish() function adds fn to the list of hooks invoked by doshutdownhooks(9) at shutdown. When invoked, the hook func- tion fn will be passed arg as its only argument. The shutdownhook_disestablish() function removes the hook described by the opaque pointer cookie from the list of hooks to be invoked at shutdown. If cookie is invalid, the result of shutdownhook_disestablish() is undefined. Shutdown hooks should be used to perform one-time activities that must happen immediately before the kernel exits. Because of the environ- ment in which they are run, shutdown hooks cannot rely on many system services (including file systems, and timeouts and other interrupt- driven services), or even basic system integrity (because the system could be rebooting after a crash). RETURN VALUES
If successful, shutdownhook_establish() returns an opaque pointer describing the newly-established shutdown hook. Otherwise, it returns NULL. EXAMPLES
It may be appropriate to use a shutdown hook to disable a device that does direct memory access, so that the device will not try to access memory while the system is rebooting. It may be appropriate to use a shutdown hook to inform watchdog timer hardware that the operating system is no longer running. SEE ALSO
doshutdownhooks(9) BUGS
The names are clumsy, at best. BSD
May 14, 2009 BSD
All times are GMT -4. The time now is 01:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy