2003-06-04 18:16:21

by Patrick Mochel

[permalink] [raw]
Subject: Is sys_sysfs used?


In fs/filesystems.c, we have sys_sysfs:

/*
* Whee.. Weird sysv syscall.
*/
asmlinkage long sys_sysfs(int option, unsigned long arg1, unsigned long arg2)
{
...
}

Which is, as advertised, kinda weird.

I see that only one architecture defines __NR_sysfs: x86-64, though it
appears most architectures mention it in arch/*/kernel/entry.S (or
equivalent).

Is it used anymore? Would it be possible to remove it?


-pat


2003-06-04 18:32:01

by Richard B. Johnson

[permalink] [raw]
Subject: Re: Is sys_sysfs used?

On Wed, 4 Jun 2003, Patrick Mochel wrote:

>
> In fs/filesystems.c, we have sys_sysfs:
>
> /*
> * Whee.. Weird sysv syscall.
> */
> asmlinkage long sys_sysfs(int option, unsigned long arg1, unsigned long arg2)
> {
> ...
> }
>
> Which is, as advertised, kinda weird.
>
> I see that only one architecture defines __NR_sysfs: x86-64, though it
> appears most architectures mention it in arch/*/kernel/entry.S (or
> equivalent).
>
> Is it used anymore? Would it be possible to remove it?
>
>
> -pat

But what would you use as a place-holder?? There are lots
of unused sys-calls (break, acct, lock, mpx, etc). You
certainly can't be running out of numbers, and you certainly
can't remove a number and change everything else, you'll
not get up, even with static-linked files!


Cheers,
Dick Johnson
Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips).
Why is the government concerned about the lunatic fringe? Think about it.

2003-06-04 18:36:14

by Patrick Mochel

[permalink] [raw]
Subject: Re: Is sys_sysfs used?


> But what would you use as a place-holder?? There are lots
> of unused sys-calls (break, acct, lock, mpx, etc). You
> certainly can't be running out of numbers, and you certainly
> can't remove a number and change everything else, you'll
> not get up, even with static-linked files!

Mark it as unused in unistd.h (like #232 for asm-i386), and implement it
as sys_ni_syscall in the entry.S table.

Al has already reminded me that it must be marked deprecated for a full
version before it can be removed, but when/if it does, then that's what
would happen until some lucky sucker took its place.


-pat

2003-06-05 06:56:44

by Andi Kleen

[permalink] [raw]
Subject: Re: Is sys_sysfs used?

Patrick Mochel <[email protected]> writes:

> I see that only one architecture defines __NR_sysfs: x86-64, though it
> appears most architectures mention it in arch/*/kernel/entry.S (or
> equivalent).

That's because x86-64 has a merged entry.S/unistd.h. The other architectures
probably use some other name in unistd.h

I think it can be removed safely from the AMD64 64bit table at least.

-Andi

2003-06-08 13:24:32

by Andries E. Brouwer

[permalink] [raw]
Subject: Re: Is sys_sysfs used?

From: Patrick Mochel <[email protected]>

I see that only one architecture defines __NR_sysfs: x86-64, though it
appears most architectures mention it in arch/*/kernel/entry.S (or
equivalent).

There are definitions in include/asm-*/unistd.h.

Is it used anymore? Would it be possible to remove it?

There should be a good reason to change the kernel API.
Just "why not remove this probably unused call?" is not a good reason.

(It indeed is almost unused. A grep on a random source tree shows
a use in mount.c in busybox.)

Andries