Re: segmentation fault in sys_execve

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

 



the best part is this: "I found this solution in the kernelnewbies Web site, in the section code examples"
:-[

mulix wrote:
On Tue, Mar 05, 2002 at 10:49:42AM -0500, israel fdez wrote:
Hi Mulix, remember me? the one wih the sys_execve function problems?
I found the solution, the problem was that the eip register got lost
when returnong thr regs structure to the original sys_execve function,
the solution is not returning to the original function, and copy the
source of this function to your my_sys_execve function.
Simple no?

yes, pretty much. you should probably paste your solution to
kernelnewbies, so other people know as well...

mulix wrote:

On Wed, Feb 27, 2002 at 03:43:30PM -0500, Israel Fernandez wrote:

Hi again... I'm changing the sys_call_table[__NR_excecve], in the
new function I do nothing, just return to "int sys_execve(struct
pt_regs regs)" doing this: return original_sys_execve(regs), where
regs is the pt_regs I receave in the new function, but when I excecute
any file I get a "Segmentation Fault" error message
Any hint??

your problem likely stems from the fact that you're passing the
original pt_regs by value on the stack instead of passing a pointer to
it - in other words, sys_execve() relies on the location of the struct
pt_regs on the stack.




[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