<div dir="ltr"><div>Hi All,</div><div> </div><div>I have Implemented sample system call on tree 3.4.6</div><div>Following are the steps i did -</div><div>- &gt;I created directory hello in kernel sources base directory i.e /usr/src/kernels/linux3.4.6/hello</div>

<div> </div><div>-&gt; I have created hello.c file in which i added system call definition</div><div>#include &lt;linux/kernel.h&gt;</div><div>asmlinkage long sys_helloworld()</div><div>{</div><div>    printk(KERN_NOTICE &quot;\n hello system call &quot;);</div>
<div>
   return 0;</div><div>}</div><div> </div><div>In makefile </div><div>obj-y:= hello.c</div><div> </div><div>-&gt; In syscall tabel  arch/x86/syscalls/syscall_32.tbl</div><div>added -  </div><div>349 i386 helloworld sys_helloworld</div>
<div> </div><div>Then compiled the kernel and installed it.</div><div>However when i run application strace ouput shows enosys(function not implemneted)</div><div> </div><div>application as below</div><div> </div><div>int main()</div>
<div>{</div><div>   syscall(349)</div><div>   return 0;</div><div>}</div><div> </div><div>strace shows </div><div>SYS_349(0x1000,0x804843b,..,..,0)=-1 ENOSYS(function not implemneted)</div><div> </div><div>I checked /proc/kallsyms it shows the sys_helloworld symbol</div>
<div>I also tried adding entry in syscall_64.tbl as common though i am running 32 bit kernel. </div><div>gdb syscall 349 doesnot give anything</div><div> </div><div>Can anyone tell what is wrong here ?</div><div> </div><div>
Thanks,</div><div>-Ulka</div><div> </div><div> </div><div><br clear="all"><br>-- <br></div><div><span style="color:rgb(31,73,125);font-family:Arial,sans-serif"><font face="arial,helvetica,sans-serif">Director </font></span></div>

<span style="color:rgb(31,73,125);font-family:Arial,sans-serif"><font face="arial,helvetica,sans-serif">L2IT -Learn &amp; Leverage Information Technology<br>Leading Professional Training Institute in Pune<br>
</font></span><font face="arial,helvetica,sans-serif" style="color:rgb(136,136,136)"><span style="color:rgb(149,55,52);font-family:Arial,sans-serif"><a style="color:rgb(17,85,204)" href="http://www.l2it.com/" target="_blank">www.l2it.com</a></span></font>
</div>