Re: X86 : system call

2021-12-12 Thread Greg KH
On Sun, Dec 12, 2021 at 12:34:54PM +0530, Muni Sekhar wrote: > Also, could someone please point me to a document which explains about > "how to add a new system call" and the "system call flow from user > space to kernel space" in X86 ARCHITECTURE (32-BIT AND 64-BI

X86 : system call

2021-12-11 Thread Muni Sekhar
Hi all, 32-bit system call numbers and entry vectors are defined in the format "". What is the difference between and ? The abi is always "i386" for arch/x86/entry/syscalls/syscall_32.tbl, whereas for 64-bit(arch/x86/entry/syscalls/syscall_64.tbl) it is used as &qu

How to comfirm whether __GI___clock_gettime() implemented as fast system call or not on x86_64 platform with Linux 4.19.84?

2020-07-19 Thread 孙世龙 sunshilong
Hi, list How to comfirm whether __GI___clock_gettime() implemented as fast system call or not on x86_64 platform with Linux 4.19.84? Here is some related backtrace log(hope there is some hint on this question): (gdb) bt #0 0x7ffc41da89fa in ?? () #1 0x7fa90785aaf0 in ?? () #2

Re: Unimplemented system call

2019-03-05 Thread valdis . kletnieks
On Tue, 05 Mar 2019 19:52:13 -0500, Umair Khan said: > I was just wondering why are these system calls not implemented? Ah. So now we get to the question you *should* have asked. :) Depends on the system call and the hardware and the kernel config. Often, on embedded systems, you know f

Re: Unimplemented system call

2019-03-05 Thread Umair Khan
200 > > > > May I know what is the use of this system call? > > /* > * Not a real system call, but a placeholder for syscalls which are > * not implemented -- see kernel/sys_ni.c > */ > asmlinkage long sys_ni_syscall(void); > > Well, did you go look at kernel/s

Re: Unimplemented system call

2019-03-05 Thread valdis . kletnieks
On Tue, 05 Mar 2019 19:08:20 -0500, Umair Khan said: > I was just roaming around the linux source code when I stumbled upon > this line - > https://github.com/torvalds/linux/blob/master/include/linux/syscalls.h#L1200 > > May I know what is the use of this system call? /* * No

Unimplemented system call

2019-03-05 Thread Umair Khan
Hello, I was just roaming around the linux source code when I stumbled upon this line - https://github.com/torvalds/linux/blob/master/include/linux/syscalls.h#L1200 May I know what is the use of this system call? Thank you, Umair ___ Kernelnewbies

stack pointer used in vector_swi() in arm linux system call

2018-10-02 Thread Anonymous Page
Hi, While reading the vector_swi() routine for arm linux system call, I found that r0-r12 registers are copied to the kernel stack(below is the code). ENTRY(vector_swi) #ifdef CONFIG_CPU_V7M v7m_exception_entry #else sub sp, sp, #S_FRAME_SIZE stmia sp, {r0 - r12

Re: System call vs POSIX call

2018-08-16 Thread Nicholas Mc Guire
> > which do some checks before invoking the actual system call. > > system() does a fork/exec of a process. > > syscall() issues an arbitrary system call, but all marshalling of > parameters and return codes becomes your problem yup - sorry - my bad - thats what I actually

Re: System call vs POSIX call

2018-08-16 Thread Bernd Petrovitsch
ser-space function or some mixture. > > Note that you can do system calls directly with system() but that is > > generaly not how you do it - you to through the glibc calls > > which do some checks before invoking the actual system call. > > system() does a fork/exec of a pr

Re: System call vs POSIX call

2018-08-16 Thread valdis . kletnieks
On Thu, 16 Aug 2018 16:29:29 -, Nicholas Mc Guire said: > Note that you can do system calls directly with system() but that is > generaly not how you do it - you to through the glibc calls > which do some checks before invoking the actual system call. system() does a fork/exec of

Re: System call vs POSIX call

2018-08-16 Thread Nicholas Mc Guire
On Thu, Aug 16, 2018 at 09:51:05PM +0530, Subhashini Rao Beerisetty wrote: > Hi All, > > I'm trying to get the difference between system call and POSIX call. System > calls are user mode API's (open(), close(), ioctl(),...) gets the kernel > service via software interrupt. What ab

System call vs POSIX call

2018-08-16 Thread Subhashini Rao Beerisetty
Hi All, I'm trying to get the difference between system call and POSIX call. System calls are user mode API's (open(), close(), ioctl(),...) gets the kernel service via software interrupt. What about POSIX calls and how it differs with the system call.? Can anyone clarify me

Re: System call service routine and interrupt context

2018-04-30 Thread Greg KH
On Mon, Apr 30, 2018 at 08:13:11PM +0530, Pritam Bankar wrote: > Hi, > > My question is, do all the code of interrupt handler in system call > gets executed in interrupt context? No. > System calls generate software interrupts. Some do, some do not. It all depends :) >

System call service routine and interrupt context

2018-04-30 Thread Pritam Bankar
Hi, My question is, do all the code of interrupt handler in system call gets executed in interrupt context? System calls generate software interrupts. So when I do open() syscall it we call do_sys_open() handler which will eventually call file system specific open function call. Will all

Re: Invoking a system call from within the kernel

2017-11-19 Thread Greg KH
order to correctly manage such logic. > There was a previous attempt to implement async system calls using the > AIO interface. Linus rejected it on the basis that an async system call > API should be more general. Yes, please go look at those previous attempts and learn from why they fa

Re: Invoking a system call from within the kernel

2017-11-18 Thread valdis . kletnieks
stem calls using the > AIO interface. Linus rejected it on the basis that an async system call > API should be more general. Do you have enough system calls to make it more general than AIO? pgp1HWUqu77ns.pgp Description: PGP signature __

Re: Invoking a system call from within the kernel

2017-11-18 Thread valdis . kletnieks
On Sat, 18 Nov 2017 13:15:27 -0500, Demi Marie Obenour said: > However, the ioctl I actually want to implement (see above) does the > system call asynchronously. That isn’t possible using the existing > APIs. Ever consider that it's because there's no clear semantics to what

Re: Invoking a system call from within the kernel

2017-11-18 Thread Demi Marie Obenour
rn success if and only if the thread creation was successfull. 6. In the child, for each `struct linux_async_syscall` passed, invoke the system call, as if from userspace. Upon return, post a message to the file descriptor, which the userspace process can then retrieve with read(2). I a

Re: Invoking a system call from within the kernel

2017-11-16 Thread Greg KH
On Wed, Nov 15, 2017 at 09:16:35PM -0500, Demi Marie Obenour wrote: > I am looking to write my first driver. This driver will create a single > character device, which can be opened by any user. The device will > support one ioctl: > > long ioctl_syscall(int fd, long syscall, long

Re: Query regarding kernel modules intercepting system call.

2017-07-09 Thread Lino Sanfilippo
On 09.07.2017 12:06, Lino Sanfilippo wrote: > Hi, > > On 08.07.2017 17:38, Ajinkya Surnis wrote: >> The purpose of assignment is to check the authenticity of the user >> executing the system call, and prevent certain users from executing, kind >> of like certain se

Re: Query regarding kernel modules intercepting system call.

2017-07-09 Thread Lino Sanfilippo
Hi, On 08.07.2017 17:38, Ajinkya Surnis wrote: > The purpose of assignment is to check the authenticity of the user > executing the system call, and prevent certain users from executing, kind > of like certain security programs (although I don't exactly know how they > work). &

Re: Query regarding kernel modules intercepting system call.

2017-07-08 Thread valdis . kletnieks
On Sat, 08 Jul 2017 21:08:40 +0530, Ajinkya Surnis said: > The purpose of assignment is to check the authenticity of the user > executing the system call, and prevent certain users from executing, kind > of like certain security programs (although I don't exactly know how they > work

Re: Query regarding kernel modules intercepting system call.

2017-07-08 Thread Aruna Hewapathirane
ode: > > https://github.com/Ajinkya-Veritas/Test-Module/blob/master/testmod.c > > However, the interviewer had done a weird scenario where he created two > modules from same code. > (mod1 and mod2) So obviously, they would intercept same system call. > After loading those modul

Re: Query regarding kernel modules intercepting system call.

2017-07-08 Thread Ajinkya Surnis
done a weird scenario where he created two modules from same code. (mod1 and mod2) So obviously, they would intercept same system call. After loading those modules and unloading them in same order caused panic, which I described in detail initially. My goal is to avoid panic, but couldn't find out how

Re: Query regarding kernel modules intercepting system call.

2017-07-08 Thread Aruna Hewapathirane
Hello Ajinkya, On Sat, Jul 8, 2017 at 12:14 PM, Greg KH wrote: > On Sat, Jul 08, 2017 at 09:38:52PM +0530, Ajinkya Surnis wrote: > > Actually, this is not a college assignment. I'm a professional software > > engineer who is completely new to kernel programming. > Welcome to

Re: Query regarding kernel modules intercepting system call.

2017-07-08 Thread Greg KH
On Sat, Jul 08, 2017 at 09:38:52PM +0530, Ajinkya Surnis wrote: > Actually, this is not a college assignment. I'm a professional software > engineer who is completely new to kernel programming. > I recently gave an interview to one cloud security firm. The interviewer gave > me this particular

Re: Query regarding kernel modules intercepting system call.

2017-07-08 Thread Ajinkya Surnis
9:08:40PM +0530, Ajinkya Surnis wrote: > > The purpose of assignment is to check the authenticity of the user > executing > > the system call, and prevent certain users from executing, kind of like > certain > > security programs (although I don't exactly know how they

Re: Query regarding kernel modules intercepting system call.

2017-07-08 Thread Greg KH
On Sat, Jul 08, 2017 at 09:08:40PM +0530, Ajinkya Surnis wrote: > The purpose of assignment is to check the authenticity of the user executing > the system call, and prevent certain users from executing, kind of like > certain > security programs (although I don't exactly know h

Re: Query regarding kernel modules intercepting system call.

2017-07-08 Thread Ajinkya Surnis
The purpose of assignment is to check the authenticity of the user executing the system call, and prevent certain users from executing, kind of like certain security programs (although I don't exactly know how they work). On Sat, Jul 8, 2017 at 8:50 PM, Greg KH <g...@kroah.com> wrote: &g

Re: Query regarding kernel modules intercepting system call.

2017-07-08 Thread Greg KH
On Sat, Jul 08, 2017 at 07:53:31PM +0530, Ajinkya Surnis wrote: > Actually, I've been given an assignment to write a kernel module such that > whenever a certain system call (e.g. open()) is executed, the control should > come to my new module; then it will do some processing on the p

Re: Query regarding kernel modules intercepting system call.

2017-07-08 Thread Ajinkya Surnis
Actually, I've been given an assignment to write a kernel module such that whenever a certain system call (e.g. open()) is executed, the control should come to my new module; then it will do some processing on the parameters and then call the actual syscall function (sys_open()). I only found

Re: Query regarding kernel modules intercepting system call.

2017-07-08 Thread Greg KH
On Sat, Jul 08, 2017 at 07:38:21PM +0530, Ajinkya Surnis wrote: > Hi guys, > > I'm new to kernelnewbies and this is my first question in the list. > > > I'm working on system call interception (for open() system call) and I got one > problem: I have two kernel modules (mo

Query regarding kernel modules intercepting system call.

2017-07-08 Thread Ajinkya Surnis
Hi guys, I'm new to kernelnewbies and this is my first question in the list. I'm working on system call interception (for open() system call) and I got one problem: I have two kernel modules (mod1 and mod2) and both of them are trying to intercept open() syscall. I've loaded mod1 first

Re: how to get filename of execve() system call from kernel module which install hook to syscall table to intercept original syscall in kernels before 4.2 and atter 4.2 ? X86_64

2017-03-08 Thread valdis . kletnieks
On Wed, 08 Mar 2017 15:20:57 +0300, Lev Olshvang said: > Hi Greg, >   > Thank you for a prompt reply. My intention is to build some euristics for > Intrusion detection of embedded based on sequence of syscalls. > I am collecting syscall events and send then with netlink to my monitor. > Since

Re: how to get filename of execve() system call from kernel module which install hook to syscall table to intercept original syscall in kernels before 4.2 and atter 4.2 ? X86_64

2017-03-08 Thread Lev Olshvang
, "Greg KH" <g...@kroah.com>:On Mon, Mar 06, 2017 at 10:18:26AM +0300, Lev Olshvang wrote: Hello all,  In kernels 3.X up to 4.2 execve(|) system call was for x86_64 architecture the the system call was made through some  magic ( I can't say I understand it ) assembly stub in arch/x86/k

Re: how to get filename of execve() system call from kernel module which install hook to syscall table to intercept original syscall in kernels before 4.2 and atter 4.2 ? X86_64

2017-03-08 Thread Greg KH
On Wed, Mar 08, 2017 at 03:20:57PM +0300, Lev Olshvang wrote: > Hi Greg, >   > Thank you for a prompt reply. My intention is to build some euristics for > Intrusion detection of embedded based on sequence of syscalls. > I am collecting syscall events and send then with netlink to my monitor. >

how to get filename of execve() system call from kernel module which install hook to syscall table to intercept original syscall in kernels before 4.2 and atter 4.2 ? X86_64

2017-03-07 Thread Lev Olshvang
Hello all, In kernels 3.X up to 4.2 execve(|) system call was for x86_64 architecture the the system call was made through some magic ( I can't say I understand it ) assembly stub in arch/x86/kernel/entry_64.S so up to kernel 4.2 it was possble to patch this assembly to install the hook, ex

Re: how to get filename of execve() system call from kernel module which install hook to syscall table to intercept original syscall in kernels before 4.2 and atter 4.2 ? X86_64

2017-03-07 Thread valdis . kletnieks
On Tue, 07 Mar 2017 20:22:33 +0100, Greg KH said: > On Mon, Mar 06, 2017 at 10:18:26AM +0300, Lev Olshvang wrote: > Why do you want to hook a syscall? that's a very complex, and broken, > and ill-advised thing to do. Please don't do that. > > What problem are you trying to solve here that led

Re: how to get filename of execve() system call from kernel module which install hook to syscall table to intercept original syscall in kernels before 4.2 and atter 4.2 ? X86_64

2017-03-07 Thread Greg KH
On Mon, Mar 06, 2017 at 10:18:26AM +0300, Lev Olshvang wrote: > Hello all, > > In kernels 3.X up to 4.2 execve(|) system call was for x86_64 architecture > the the system call was made through some > magic ( I can't say I understand it ) assembly stub in > arch/x86/kernel/

Different ways of doing a system call

2016-07-17 Thread Aleksander Alekseev
Hello Recently I've explored different ways of doing a system call on Linux (only on x86 and x64 architectures). Here is what I discovered so far: * int 0x80(x86, slow) * sysenter(x86, fast) * vsyscall(x86, deprecated) * VDSO trampoline (x86, fast) * syscall (x64

Re: system call

2016-04-09 Thread Nitin Varyani
shell > >> > initramfs:" > >> > is displayed on booting. > >> > >> I don't think this is related to the changes you made. I would advise > >> you just build the sources for your > >> distro and try to get to boot the

Re: system call

2016-04-09 Thread Pranay Srivastava
ethings like >> >> > "dropping to shell >> >> > initramfs:" >> >> > is displayed on booting. >> >> >> >> I don't think this is related to the changes you made. I would advise >> >> you just build the sources for yo

Re: system call

2016-04-09 Thread Pranay Srivastava
distro? >> >> > >> > >> > On Thu, Apr 7, 2016 at 1:08 PM, Pranay Srivastava <pran...@gmail.com> >> > wrote: >> >> >> >> Nitin >> >> >> >> >> >> On Thu, Apr 7, 2016 at 11:53 AM, Nitin Varyani >>

Re: system call

2016-04-09 Thread Pranay Srivastava
Pranay Srivastava <pran...@gmail.com> wrote: >> >> Nitin >> >> >> On Thu, Apr 7, 2016 at 11:53 AM, Nitin Varyani <varyani.nit...@gmail.com> >> wrote: >> > >> > Hi, >> > I want to implement a system call as explained in

Re: system call

2016-04-09 Thread Nitin Varyani
gt; > On Thu, Apr 7, 2016 at 11:53 AM, Nitin Varyani <varyani.nit...@gmail.com> > wrote: > > > > Hi, > > I want to implement a system call as explained in Linux kernel > development by Robert Love. > > > > He does three things > > adding entr

Re: system call

2016-04-07 Thread Pranay Srivastava
Nitin On Thu, Apr 7, 2016 at 11:53 AM, Nitin Varyani <varyani.nit...@gmail.com> wrote: > > Hi, > I want to implement a system call as explained in Linux kernel > development by Robert Love. > > He does three things > adding entry to entry.S > adding entr

Re: system call

2016-04-07 Thread Sharath Chandra
Hi Nitin, Take a look at this link, it'll give you a start: http://blog.techveda.org/adding-system-calls-linux-kernel-3-5-x/ On Wed, Apr 6, 2016 at 11:23 PM, Nitin Varyani <varyani.nit...@gmail.com> wrote: > Hi, > I want to implement a system call as explained in

Re: system call

2016-04-07 Thread Giedrius Statkevičius
On Thu, Apr 7, 2016 at 9:23 AM, Nitin Varyani <varyani.nit...@gmail.com> wrote: > Hi, > I want to implement a system call as explained in Linux kernel > development by Robert Love. > > He does three things > adding entry to entry.S > adding entry to asm/unist

system call

2016-04-07 Thread Nitin Varyani
Hi, I want to implement a system call as explained in Linux kernel development by Robert Love. He does three things adding entry to entry.S adding entry to asm/unistd.h and adding the system call code to sched.c and then make + make install I do not want to implement for all

Re: remote system call

2016-03-12 Thread Nicholas Mc Guire
On Sat, Mar 05, 2016 at 04:58:07PM -0500, valdis.kletni...@vt.edu wrote: > On Sat, 05 Mar 2016 15:58:13 +0530, Nitin Varyani said: > > Codes are huge and documentation is negligible. How can I separate whay I > > want to achieve from that big code? > > Why do you think that's possible? > > It's

Re: remote system call

2016-03-05 Thread Nitin Varyani
> > wrote: > >> Hi, >> I want to migrate user context of a process to a remote machine >> (i.e. registers, code, data, virtual memory and program counter) and when >> it makes a system call or file i/o, I want to send that request to its home >> node. >>

Re: remote system call

2016-03-03 Thread Mulyadi Santosa
On Thu, Mar 3, 2016 at 6:12 PM, Nitin Varyani <varyani.nit...@gmail.com> wrote: > Hi, > I want to migrate user context of a process to a remote machine > (i.e. registers, code, data, virtual memory and program counter) and when > it makes a system call or file i

remote system call

2016-03-03 Thread Nitin Varyani
Hi, I want to migrate user context of a process to a remote machine (i.e. registers, code, data, virtual memory and program counter) and when it makes a system call or file i/o, I want to send that request to its home node. That is, the user process executing at remote node will copy

Track execution of close() system call in kernel

2015-12-17 Thread Harsh Jain
Hi, How to track the code flow of close() system call for socket fds. In working case I am getting following debug traces in dmesg inet_release sk 88040e376000 sk->sk_prot->close a0774a50 chelsio_close Entered CPU: 3 PID: 10108 Comm: openssl Tainted: G

Error in compiling Linux kernel after creating hello world system call

2014-11-29 Thread Jackson Isaac
Hi everyone, I am trying to write hello world system call in linux but I am encountering the following error when I run 'sudo make': ... AR arch/x86/lib/lib.a LINKvmlinux LD vmlinux.o ld: cannot find hello: File format not recognized make: *** [vmlinux] Error 1 I have

Re: Error in compiling Linux kernel after creating hello world system call

2014-11-29 Thread Paul Bolle
On Sat, 2014-11-29 at 18:43 +0530, Jackson Isaac wrote: I am trying to write hello world system call in linux but I am encountering the following error when I run 'sudo make': Why sudo? That can't be right! ... AR arch/x86/lib/lib.a LINKvmlinux LD vmlinux.o ld

Re: mapping of inode and file structure in Open System call

2014-11-17 Thread lokesh kumar
how inode and file structure pointer are filled. I think logic is written in fs/open.c but i got confused in callbacks used in it.could anyone please tell me which topics should i cover to understand open system call. You should probably first understand how the file is located. See the role

Re: mapping of inode and file structure in Open System call

2014-11-16 Thread Saket Sinha
cover to understand open system call. You should probably first understand how the file is located. See the role of lookup. Thanks. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo

mapping of inode and file structure in Open System call

2014-11-12 Thread lokesh kumar
are filled. I think logic is written in fs/open.c but i got confused in callbacks used in it.could anyone please tell me which topics should i cover to understand open system call. Thanks. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http

Re: mapping of inode and file structure in Open System call

2014-11-12 Thread Pranay Srivastava
) (struct inode *, struct file *); could anyone tell me how inode and file structure pointer are filled. I think logic is written in fs/open.c but i got confused in callbacks used in it.could anyone please tell me which topics should i cover to understand open system call. You should probably

Trace system call

2014-06-08 Thread Anil Joshi
Hi All, I am all new to this area so please sorry in advance if i am asking a wrong a wrong query. I made an client server program,i have to trace the kernel functions that are being called when write() call is being executed in the server program. I try'ed with strace but didn't get the desired

Re: Trace system call

2014-06-08 Thread Peter Senna Tschudin
Please copy the list on your replies, it help others. On Sun, Jun 8, 2014 at 10:48 AM, Anil Joshi aj27...@gmail.com wrote: Hello Sir, I cannot find the one to trace my write() call. Systemtap allows you to write your own scripts.There is a free getting started guide at:

Re: problem with adding system call!

2014-05-12 Thread Valdis . Kletnieks
On Tue, 29 Apr 2014 20:54:41 +0300, Nada Saif said: I'm trying to add simple linux system call - I received the following error: No rule to make target 'block ... I use kernel 2.6.32 .. My system call called YourFirstName Any suggestion to solve the issue ? Hint: Next time, just cut-n

system call returns -1

2014-05-02 Thread Nada Saif
Hi, I added a new system call to kernel 2.6.32.61 - I used these commands for complication : make oldconfig make make modules install It went ok with few warning messages. When I tried to test the system call , the function _syscall return -1, what that means? Thanks, Nada

Re: system call returns -1

2014-05-02 Thread Rami Rosen
AM, Nada Saif nada.sa...@gmail.com wrote: Hi, I added a new system call to kernel 2.6.32.61 - I used these commands for complication : make oldconfig make make modules install It went ok with few warning messages. When I tried to test the system call , the function _syscall return -1

Adding a dummy system call

2014-04-04 Thread Adam Fowler
Hi Everyone, I am trying to learn the linux kernel via the book Linux Kernel Development 3rd edition by Robert Love, and in it he advises to use the macro _syscallX to allow access to user added syscalls not wrapped by glibc functions. In my attempt to add a system call this macro failed me

Re: Adding a dummy system call

2014-04-04 Thread Vitor Braga
Check out SYSCALL_DEFINEx series of macros: http://lxr.free-electrons.com/source/include/linux/syscalls.h#L171 Is this what you're looking for? Vitor. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org

Re: Adding a dummy system call

2014-04-04 Thread Augusto Mecking Caringi
by glibc functions. In my attempt to add a system call this macro failed me and after a little man page perusal I noticed _syscallX is obselete. Is it considered a better practice to declare the asmlinkage int sys_X(..) declaration myself instead of using this obsolete macro? Or did syscall(2

Re: Adding a dummy system call

2014-04-04 Thread Adam Fowler
Development 3rd edition by Robert Love, and in it he advises to use the macro _syscallX to allow access to user added syscalls not wrapped by glibc functions. In my attempt to add a system call this macro failed me and after a little man page perusal I noticed _syscallX is obselete. Is it considered

System call interception by jprobe

2014-03-31 Thread edsionte
Hi, guys, I am trying to use jprobe to intercept syscalls in linux kernel. Such as open(),the original flow is open()--sys_open(), and now, open()--check_file()--sys_oepn() The check_file() is jprobe's entry point. If check_file() returns sucessfully, jprobe_return() will be called and

in sparc linux system call entry assembly code

2014-03-28 Thread 김찬
andcc %l7, 1, %g0 bne linux_fast_syscall /* Just do first insn from SAVE_ALL in the delay slot */ when linux system call trap is entered, the sys_call_table address is stored in %l7 and %psr in %l0 and it branches to linux_sparc_syscall. (%psr is read in branch delayed slot

Re: in sparc linux system call entry assembly code

2014-03-28 Thread Valdis . Kletnieks
On Fri, 28 Mar 2014 07:25:37 -, 김찬 said: andcc %l7, 1, %g0 bne linux_fast_syscall Then what is this andcc %l7, 1, %g0 doing? Well, I'm not an expert on Sparc assembler, but.. 'andcc' looks like it's doing an and, and setting the cc (condition code). Then 'bne'

RE: in sparc linux system call entry assembly code

2014-03-28 Thread Chan Kim
: valdis.kletni...@vt.edu valdis.kletni...@vt.edu Sent : 2014-03-28 22:36:27 ( +09:00 ) To : Chan Kim c...@etri.re.kr Cc : kernelnewbies@kernelnewbies.org kernelnewbies@kernelnewbies.org Subject : Re: in sparc linux system call entry assembly code On Fri, 28 Mar 2014 07:25:37 -, 김찬 said: andcc %l7, 1

Side effects of open system call

2014-02-20 Thread Rahul Bedarkar
Hi, In ioctl man page, mentioned that Often the open(2) call has unwanted side effects, that can be avoided under Linux by giving it the O_NONBLOCK flag. I have seen open man page but can't find what are side effects of open. Does anybody know what are side effects of open in general ?

Re: Side effects of open system call

2014-02-20 Thread Valdis . Kletnieks
On Thu, 20 Feb 2014 20:36:44 +0530, Rahul Bedarkar said: Often the open(2) call has unwanted side effects, that can be avoided under Linux by giving it the O_NONBLOCK flag. I have seen open man page but can't find what are side effects of open. Well, for starters, the open() call can

Re: Side effects of open system call

2014-02-20 Thread Rahul Bedarkar
hung process may be unkillable even by 'kill -9'. Thanks, Does this mean that if I open a device file with O_NONBLOCK flag and if device is not ready by that time open system call will return immediately and fail? Most people would call that an unwanted side effect

Re: Side effects of open system call

2014-02-20 Thread parinay
open a device file with O_NONBLOCK flag and if device is not ready by that time open system call will return immediately and fail? Most people would call that an unwanted side effect. :) ___ Kernelnewbies mailing list Kernelnewbies

adding a system call in Linux kernel v3.11

2013-10-20 Thread David
I’ve been trying to do an assignment and I have never worked in a kernel or linux. I’m currently using vmware player to emulate fedora live desktop x86_64-19-1. I followed the code posted on http://lists.kernelnewbies.org/pipermail/kernelnewbies/2013-July/008598.html but I get a warning when I

Re: adding a system call in Linux kernel v3.11

2013-10-20 Thread Valdis . Kletnieks
On Fri, 18 Oct 2013 23:31:54 -0700, David said: fedora live desktop x86_64-19-1. I followed the code posted on http://lists.kernelnewbies.org/pipermail/kernelnewbies/2013-July/008598.html but I get a warning when I go to make modules. It is: CALLscripts/checksyscalls.sh stdin:1226:2:

system call does not work

2013-10-10 Thread Ulka Vaze
Hi All, I have Implemented sample system call on tree 3.4.6 Following are the steps i did - - I created directory hello in kernel sources base directory i.e /usr/src/kernels/linux3.4.6/hello - I have created hello.c file in which i added system call definition #include linux/kernel.h asmlinkage

system call does not work

2013-10-10 Thread Ulka Vaze
Hi All, I have Implemented sample system call on tree 3.4.6 Following are the steps i did - - I created directory hello in kernel sources base directory i.e /usr/src/kernels/linux3.4.6/hello - I have created hello.c file in which i added system call definition #include linux/kernel.h asmlinkage

RE: system call does not work

2013-10-10 Thread binoy.jayan
-9745783048 From: kernelnewbies-boun...@kernelnewbies.org [kernelnewbies-boun...@kernelnewbies.org] on behalf of Ulka Vaze [ulka.v...@l2it.com] Sent: Thursday, October 10, 2013 4:47 PM To: Kernelnewbies@kernelnewbies.org Subject: system call does not work Hi All

System call is not working gives error enosys

2013-10-09 Thread Ulka Vaze
Hi All, I have Implemented sample system call on tree 3.4.6 Following are the steps i did - - I created directory hello in kernel sources base directory i.e /usr/src/kernels/linux3.4.6/hello - I have created hello.c file in which i added system call definition #include linux/kernel.h asmlinkage

Re: Where is the system call table in linux kernel v3.9?

2013-07-23 Thread Srinivas Ganji
and it has worked (the table is in arch/x86/syscalls/syscall_32.tbl). Now, I'm going to try to create my own directory in kernel source which contains my system call implementation files as Srinivas Ganji has proposed. On Fri, 19 Jul 2013 12:15:44 +0530 Srinivas Ganji srinivasganji.ker...@gmail.com

Re: Where is the system call table in linux kernel v3.9?

2013-07-19 Thread Srinivas Ganji
Hi Iker Pedrosa, In old versions of Linux kernels like 2.6.xx, the approach was different from Linux version 3.3 on wards. There are two different approaches to implement own system call. Each approach involves several steps. The difference between two approaches is, in one approach, we

System-call in Kernel Space

2013-07-19 Thread Saket Sinha
We all know that system-calls are for user-space. I have a file-system driver where I have to use system calls in kernel-space. Normally, we DON'T do any high level IOs from Kernel space (file creation/reading, and so on). But here in my driver I am stacking FS drivers, I can't avoid this.

Re: System-call in Kernel Space

2013-07-19 Thread SandeepKsinha
On Fri, Jul 19, 2013 at 1:29 PM, Saket Sinha saket.sinh...@gmail.comwrote: We all know that system-calls are for user-space. I have a file-system driver where I have to use system calls in kernel-space. Normally, we DON'T do any high level IOs from Kernel space (file creation/reading,

Re: Where is the system call table in linux kernel v3.9?

2013-07-19 Thread Valdis . Kletnieks
On Fri, 19 Jul 2013 13:25:35 +0530, Prashant Shah said: You can even use filp_open(), vfs_read(), vfs_write() if sys_* is not available https://github.com/prashants/km/blob/master/filerw/filerw.c The reasons to not do file I/O from inside the kernel are many and well documented. Of course,

Re: System-call in Kernel Space

2013-07-19 Thread Rohan Puri
On Fri, Jul 19, 2013 at 1:33 PM, SandeepKsinha sandeepksi...@gmail.comwrote: On Fri, Jul 19, 2013 at 1:29 PM, Saket Sinha saket.sinh...@gmail.comwrote: We all know that system-calls are for user-space. I have a file-system driver where I have to use system calls in kernel-space.

Re: Where is the system call table in linux kernel v3.9?

2013-07-18 Thread Valdis . Kletnieks
On Thu, 18 Jul 2013 18:14:22 +0530, Sudip Mukherjee said: Hi In 3.10.1 the system call table is in arch/x86/syscalls/syscall_32.tbl Only for x86. You're on an ARM or PowerPC or MIPS or any of the other 27 or so architectures we support, it's elsewhere. ;) pgp7413KqpI0x.pgp Description: PGP

Re: tracing send and recv system call

2013-06-03 Thread Kristof Provost
On 2013-06-03 14:12:16 (+0530), Varun Sharma vsd...@gmail.com wrote: Hi, I am tracing send and recv system call .From user space to kernel space switching send in kernel space not going into sys_send .It directly going into sys_sendto . Apparently glibc implements send() using the sendto

Re: location of inbuilt system call implementation

2013-03-11 Thread Denis Kirjanov
Check for the SYSCALL_DEFINE[0-6] macros. commit 1a94bc34768e463a93cb3751819709ab0ea80a01 Author: Heiko Carstens heiko.carst...@de.ibm.com Date: Wed Jan 14 14:13:59 2009 +0100 [CVE-2009-0029] System call wrapper infrastructure From: Martin Schwidefsky schwidef...@de.ibm.com

location of inbuilt system call implementation

2013-03-10 Thread Niroj Pokhrel
Hi All, I am newbies to Linux and am going through system call in kernel-3.4. I just wanted to check how sys_read, sys_write or other system calls work but I was searching for the implementation but couldn't find it. I found that : System Call are added in /arch/x86/syscalls/syscall_32(or64).tbl

Re: Intercepting a system call

2013-01-25 Thread Paul Davies C
You can access the code also from the below link. https://gist.github.com/4634681 On Fri, Jan 25, 2013 at 6:58 PM, Paul Davies C pauldavi...@gmail.comwrote: Hi, [1] is the module I wrote for intercepting the system call fork(). I have taken the conventional way of hooking the system call

Re: Intercepting a system call

2013-01-25 Thread Paul Davies C
think? On Fri, Jan 25, 2013 at 6:58 PM, Paul Davies C pauldavi...@gmail.comwrote: Hi, [1] is the module I wrote for intercepting the system call fork(). I have taken the conventional way of hooking the system call. Firstly I found out the address of the sys_call_table from the System.map

Re: Intercepting a system call

2013-01-25 Thread Valdis . Kletnieks
On Fri, 25 Jan 2013 18:58:29 +0530, Paul Davies C said: [1] is the module I wrote for intercepting the system call fork(). Totally skipping over the details of actually doing it - it's usually considered a Bad Idea to hook a system call, and 98% of the time there's a much better way

Re: calling system call in arm from user space

2013-01-08 Thread Peter Teoh
On Wed, Dec 26, 2012 at 1:04 PM, Niroj Pokhrel nirojpokh...@gmail.comwrote: Hi, I have written a system call and build it with kernel for Arm architecture. However, I'm confused to use it to call it from the user space. As it is in x86, where we can simply call by using sycall() function

calling system call in arm from user space

2012-12-25 Thread Niroj Pokhrel
Hi, I have written a system call and build it with kernel for Arm architecture. However, I'm confused to use it to call it from the user space. As it is in x86, where we can simply call by using sycall() function and the return value is returned by the syscal() itself. In Arm, I tried to write

system call numbers

2012-11-22 Thread Matthias Brugger
Hi all, I'm looking into the avr32 architecture implementation, as compiling the kernel gives you several warnings about system calls which are missing. I had a look in the unistd.h file I realized that system call numbers differ widely from other architectures (I had a look at arm and x86

  1   2   >