public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Constantine Gavrilov <constg@qlusters.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: bugs@x86-64.org, linux-kernel@vger.kernel.org
Subject: Re: Calling syscalls from x86-64 kernel results in a crash on Opteron machines
Date: Mon, 13 Sep 2004 18:18:00 +0300	[thread overview]
Message-ID: <4145BA28.5020702@qlusters.com> (raw)
In-Reply-To: <200409131644.54441.arnd@arndb.de>

Arnd Bergmann wrote:

>On Montag, 13. September 2004 16:04, Constantine Gavrilov wrote:
>  
>
>>We have a piece of kernel code that calls some system calls in kernel 
>>context (from a process with mm and a daemonized kernel thread that does 
>>not have mm). This works fine on IA64 and i386 architectures.
>>    
>>
>
>You can find the list of system calls that are supposed to work
>from kernel space in asm/unistd.h inside #ifdef __KERNEL__SYSCALLS__.
>On current kernels, that list only contains execve(), which should
>be avoided as well in favor of call_usermodehelper. Other calls
>might work on some architectures but that is not a supported
>interface any more.
>
>You could call the sys_* functions directly if they are exported,
>but it is unlikely that such code gets integrated in the mainline
>kernel.
>
>The real answer for your problem highly depends on which syscalls
>you want to use.
>
>	Arnd <><
>  
>
I can implement differently what I want, though it will be somewhat 
kludgy and kernel depenedent (depends on a version and distribution). I 
wanted to avoid that. Since what I write is really an application and 
not interface, it was very "native" to use application syscall approach.

My real problem is not how to implement it. I want to understand this 
specific x86_64 problem.

-- 
----------------------------------------
Constantine Gavrilov
Kernel Developer
Qlusters Software Ltd
1 Azrieli Center, Tel-Aviv
Phone: +972-3-6081977
Fax:   +972-3-6081841
----------------------------------------



  reply	other threads:[~2004-09-13 15:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-13 14:04 Calling syscalls from x86-64 kernel results in a crash on Opteron machines Constantine Gavrilov
2004-09-13 14:38 ` Christoph Hellwig
2004-09-13 15:05   ` Constantine Gavrilov
2004-09-13 16:17     ` Andrea Arcangeli
2004-09-13 16:41       ` Stephen Hemminger
2004-09-13 20:08         ` Andrea Arcangeli
2004-09-13 16:42     ` Greg KH
2004-09-13 17:21     ` Brian Gerst
2004-09-14  2:04     ` William Lee Irwin III
2004-09-13 14:44 ` Arnd Bergmann
2004-09-13 15:18   ` Constantine Gavrilov [this message]
2004-09-13 19:39     ` H. Peter Anvin
2004-09-13 15:00 ` Brian Gerst
2004-09-13 15:26   ` Constantine Gavrilov
     [not found] <2DZQy-7TB-7@gated-at.bofh.it>
2004-09-13 14:31 ` Andi Kleen
2004-09-13 15:28   ` Constantine Gavrilov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4145BA28.5020702@qlusters.com \
    --to=constg@qlusters.com \
    --cc=arnd@arndb.de \
    --cc=bugs@x86-64.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox