mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rddunlap@osdl.org>
To: Manfred Spraul <manfred@colorfullife.com>
Cc: piggin@cyberone.com.au, linux-kernel@vger.kernel.org,
	akpm@osdl.org, torvalds@osdl.org
Subject: Re: [PATCH] fix shmat
Date: Mon, 23 Feb 2004 10:21:35 -0800	[thread overview]
Message-ID: <20040223102135.2f878f93.rddunlap@osdl.org> (raw)
In-Reply-To: <403A4328.5010302@colorfullife.com>

On Mon, 23 Feb 2004 19:15:04 +0100 Manfred Spraul <manfred@colorfullife.com> wrote:

|  From the bitkeeper commit message queue:
| 
| >	
| >	sys_shmat() need to be declared asmlinkage.  This causes breakage when we
| >	actually get the proper prototypes into caller's scope.
| >  
| >
| Why? sys_shmat is not a system call. Or at least there is a comment just 
| before the implementation that this is not a syscall.
| I think either the asmlinkage or the comment are wrong:
| /*
|  * Fix shmaddr, allocate descriptor, map shm, add attach descriptor to 
| lists.
|  *
|  * NOTE! Despite the name, this is NOT a direct system call entrypoint. The
| 
| >  * "raddr" thing points to kernel space, and there has to be a wrapper around
| >  * this.
| >  */
| >-long sys_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr)
| >+asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr)
| > {
| > 	struct shmid_kernel *shp;
| > 	unsigned long addr;
| >
| 
| I'd propose to remove the asmlinkage and to move the prototype (without 
| asmlinkage) back from syscalls.h to shm.h - what do you think?

It's not a syscall AFAICT.
It's not listed in any .S files, like most syscalls are.
However, it is listed in kernel/sys.c as a "cond_syscall",
which I'm guessing is incorrect.

I'd like to rename it so that it doesn't begin with "sys_".

--
~Randy

  reply	other threads:[~2004-02-23 18:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1AvBNO-0004QF-00@bkwatch.colorfullife.com>
2004-02-23 18:15 ` Manfred Spraul
2004-02-23 18:21   ` Randy.Dunlap [this message]
2004-02-23 18:36   ` Linus Torvalds
2004-02-23 20:33     ` Manfred Spraul
2004-02-23 20:57       ` Andrew Morton
2004-02-23 23:29         ` Anton Blanchard
2004-02-23 19:02   ` Christoph Hellwig

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=20040223102135.2f878f93.rddunlap@osdl.org \
    --to=rddunlap@osdl.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    --cc=piggin@cyberone.com.au \
    --cc=torvalds@osdl.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

all inboxes | Powered by JetHome®