lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 20 Aug 2010 08:33:46 -0700
From:	Greg KH <gregkh@...e.de>
To:	"Kirill A. Shutemov" <kirill@...temov.name>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	"H. Peter Anvin" <hpa@...or.com>,
	Alexander Shishkin <virtuoso@...nd.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	John Stultz <johnstul@...ibm.com>,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	Jon Hunter <jon-hunter@...com>, Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	David Howells <dhowells@...hat.com>,
	Avi Kivity <avi@...hat.com>, John Kacur <jkacur@...hat.com>,
	Chris Friesen <chris.friesen@...band.com>,
	Kay Sievers <kay.sievers@...y.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [RFCv2] notify userspace about time changes

On Fri, Aug 20, 2010 at 11:37:23AM +0300, Kirill A. Shutemov wrote:
> On Thu, Aug 19, 2010 at 08:31:27AM -0700, Greg KH wrote:
> > On Thu, Aug 19, 2010 at 11:36:12AM +0300, Kirill A. Shutemov wrote:
> > > On Wed, Aug 18, 2010 at 09:09:37PM -0700, Greg KH wrote:
> > > > On Wed, Aug 18, 2010 at 04:53:03PM -0700, Andrew Morton wrote:
> > > > > Is sysfs the right interface for this thing?  Bear in mind that
> > > > > CONFIG_SYSFS does exist.  
> > > > > 
> > > > > > +		     fd = open("/sys/kernel/time_notify", O_WRONLY);
> > > > > > +		     fdprintf(fd, "%d 1 0 1 1", efd);
> > > > > 
> > > > > why not
> > > > > 
> > > > > 		sys_time_notify(efd, 1, 0, 1, 1);
> > > > 
> > > > Yeah, that would be much better than a sysfs file, this is abusing the
> > > > sysfs interface quite a lot.
> > > 
> > > Do you really think, that increasing number of syscalls is better then
> > > fs-based interfaces?
> > 
> > As you are pretty much creating a new syscall here anyway, there is no
> > problem with making it a real one, right?
> 
> I think Linux has too many syscalls. Significant part these interfaces
> would be better to map to a filesystem[s].

What is the difference between a syscall and a filesystem interface?
They are both things that we can not change in the future and need to be
preserved and documented.

Don't be afraid of syscall's, they don't bite :)

> > That way you can properly
> > handle the user/kernel documentation and persistance over time (i.e. you
> > can't change it.)
> 
> On the other, hand properly designed fs-based interface requires less
> modification of userspeace to use it. Acctually, you can use most of
> fs-based intefaces directly from shell. No need in libc modifications and
> utilities to use it from shell or other script language.
> See cgroup, for example.
> 
> > So yes, a syscall would be better, especially as this does not exactly
> > fit into the model of sysfs, right?
> 
> Yes, sysfs is not the best place for it, but...

You just answered your own question.  Please don't make it in sysfs,
make it a syscall as it does not fit into sysfs.

thanks,

greg "constantly fighting to keep /sys/ from being like /proc/" k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ