How to hook the system call?

2011-11-23 Thread Geraint Yang
Hello everyone, I am going to hook a system call like 'read' or 'send' by modifying the sys_call_table, but it seems that the sys_call_table is in read only page, how can I set modify the sys_call_table ? Or if there any method that I can use to hook a system call in module without modify the

Re: how set_user_nice() function is called

2011-11-23 Thread rohan puri
On Tue, Nov 22, 2011 at 3:53 PM, Enes Albay - انس الباى albaye...@gmail.com wrote: Thanks for reply. I also asked that set_user_nice where and when is called(file and line). I think it is not called after each forking operation, isn't it? Could you give calling order between functions from

Re: How to hook the system call?

2011-11-23 Thread Alexandru Juncu
On Wed, Nov 23, 2011 at 10:40 AM, Geraint Yang geraint0...@gmail.com wrote: Hello everyone, I am going to hook a system call like 'read' or 'send' by modifying the sys_call_table, but it seems that the sys_call_table is in read only page, how can I set modify the sys_call_table ? Or if there

Re: How to hook the system call?

2011-11-23 Thread Daniel Baluta
On Wed, Nov 23, 2011 at 11:22 AM, Alexandru Juncu alex.ju...@rosedu.org wrote: On Wed, Nov 23, 2011 at 10:40 AM, Geraint Yang geraint0...@gmail.com wrote: Hello everyone, I am going to hook a system call like 'read' or 'send' by modifying the sys_call_table, but it seems that the

Re: How to hook the system call?

2011-11-23 Thread Alexandru Juncu
On Wed, Nov 23, 2011 at 12:10 PM, Daniel Baluta daniel.bal...@gmail.com wrote: On Wed, Nov 23, 2011 at 11:22 AM, Alexandru Juncu alex.ju...@rosedu.org wrote: On Wed, Nov 23, 2011 at 10:40 AM, Geraint Yang geraint0...@gmail.com wrote: Hello everyone, I am going to hook a system call like

Re: busybox utility

2011-11-23 Thread naveen yadav
Hi All, Thanks for your answer. I want to know is there any similar package like busybox we can use in embedded product. I found few of them but could not found as good as busybox. so this is reason i ask. 1. http://www.fefe.de/embutils/ 2. https://github.com/asdf-systems/gobox 3.

Re: How to hook the system call?

2011-11-23 Thread rohan puri
On Wed, Nov 23, 2011 at 3:57 PM, Alexandru Juncu alex.ju...@rosedu.orgwrote: On Wed, Nov 23, 2011 at 12:10 PM, Daniel Baluta daniel.bal...@gmail.com wrote: On Wed, Nov 23, 2011 at 11:22 AM, Alexandru Juncu alex.ju...@rosedu.org wrote: On Wed, Nov 23, 2011 at 10:40 AM, Geraint Yang

Re: busybox utility

2011-11-23 Thread Thomas Petazzoni
Le Wed, 23 Nov 2011 13:58:13 +0100, Bernd Petrovitsch be...@petrovitsch.priv.at a écrit : IIUC, that .pdf are just *marketing*/*sales* slides where the GoBox folks basically tell everyone that BusyBox is bad (because it is huge) and GoBox is good (because it is allegedly small). I fully agree

Re: How to hook the system call?

2011-11-23 Thread Geraint Yang
Hi, Thank all of you for helping me with problem! I don't want to modify my kernel source so I am trying to learn to use LSM security hook even though it seems that it couldn't hook all the system calls, I think it should be enough for me. Thanks again! On Wed, Nov 23, 2011 at 8:02 PM, rohan

Re: How to hook the system call?

2011-11-23 Thread Alexandru Juncu
On Wed, Nov 23, 2011 at 6:50 PM, Geraint Yang geraint0...@gmail.com wrote: Hi, Thank all of you for helping me with problem! I don't want to modify my kernel source so I am trying to learn to use LSM security hook even though it seems that it couldn't hook all the system calls, I think it

Re: How to hook the system call?

2011-11-23 Thread Geraint Yang
Hi, I have tried the LSM framework,but when I make my module , I got waining:'register_security' undefined, then I check security/security.c and found out that register_security is not exported ! So if I want to use this function ,I must hack kernel by exporting and recompiling kernel which is

RE: GPL-only symbol Error

2011-11-23 Thread Jeff Haran
-Original Message- From: Greg KH [mailto:g...@kroah.com] Sent: Tuesday, November 22, 2011 6:50 PM To: Jeff Haran Cc: Guillaume Knispel; Graeme Russ; Sengottuvelan S; Kernel Newbies Subject: Re: GPL-only symbol Error On Tue, Nov 22, 2011 at 06:10:27PM -0800, Jeff Haran wrote: But

Re: How to hook the system call?

2011-11-23 Thread Nuno Martins
On Wed, Nov 23, 2011 at 6:05 PM, Geraint Yang geraint0...@gmail.com wrote: Hi, I have tried the LSM framework,but when I make my module , I got waining:'register_security' undefined, then I check security/security.c and found out that register_security is not exported ! So if I want to use

issues regarding using initramfs for entire root fs?

2011-11-23 Thread Robert P. J. Day
i figure someone here has probably done this -- just as proof-of-concept, i want to create a kernel that incorporates a standalone initramfs root filesystem. if it's useful to know, it will be for a powerpc lite5200 board. it's not something i'd do in normal practice, but it's for a course

RE: GPL-only symbol Error

2011-11-23 Thread Jeff Haran
-Original Message- From: Bernd Petrovitsch [mailto:be...@petrovitsch.priv.at] Sent: Wednesday, November 23, 2011 2:51 AM To: Sengottuvelan S Cc: Graeme Russ; Greg KH; Kernel Newbies; Jeff Haran Subject: RE: GPL-only symbol Error On Die, 2011-11-22 at 17:21 -0800, Jeff Haran wrote:

Re: GPL-only symbol Error

2011-11-23 Thread Greg KH
On Wed, Nov 23, 2011 at 10:05:19AM -0800, Jeff Haran wrote: -Original Message- From: Greg KH [mailto:g...@kroah.com] Sent: Tuesday, November 22, 2011 6:50 PM To: Jeff Haran Cc: Guillaume Knispel; Graeme Russ; Sengottuvelan S; Kernel Newbies Subject: Re: GPL-only symbol Error

Re: GPL-only symbol Error

2011-11-23 Thread Greg KH
On Wed, Nov 23, 2011 at 10:31:19AM -0800, Jeff Haran wrote: That's the actual bug: You assume that you can legally make a proprietary Linux kernel module by simply declaring to do so (and going deeper is not quite possible as we do not know the module ). I can clearly legally write a

Ownership of sk_buff

2011-11-23 Thread Vimal
Hi all, When a protocol like TCP or UDP creates an sk_buff and passes it down to the layer 3 and layer 2 protocol functions, which module has ownership of the buffer as it gets passed down? Is it the responsibility of the caller, or the callee to free the sk_buff? Are there any exceptions?

Re: How to hook the system call?

2011-11-23 Thread rohan puri
On Wed, Nov 23, 2011 at 11:35 PM, Geraint Yang geraint0...@gmail.comwrote: Hi, I have tried the LSM framework,but when I make my module , I got waining:'register_security' undefined, then I check security/security.c and found out that register_security is not exported ! So if I want to use

Re: Ownership of sk_buff

2011-11-23 Thread rohan puri
On Thu, Nov 24, 2011 at 5:33 AM, Vimal j.vi...@gmail.com wrote: Hi all, When a protocol like TCP or UDP creates an sk_buff and passes it down to the layer 3 and layer 2 protocol functions, which module has ownership of the buffer as it gets passed down? Is it the responsibility of the