public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Constantine Gavrilov <constg@qlusters.com>
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 16:44:54 +0200	[thread overview]
Message-ID: <200409131644.54441.arnd@arndb.de> (raw)
In-Reply-To: <4145A8E1.8010409@qlusters.com>

[-- Attachment #1: Type: text/plain, Size: 881 bytes --]

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 <><

[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2004-09-13 14:47 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 [this message]
2004-09-13 15:18   ` Constantine Gavrilov
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=200409131644.54441.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=bugs@x86-64.org \
    --cc=constg@qlusters.com \
    --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