Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

patent on O_ATOMICLOOKUP [Re: [PATCH] loopable tmpfs (2.4.17)]

0 views
Skip to first unread message

Andrea Arcangeli

unread,
May 24, 2002, 4:26:58 PM5/24/02
to
[ speaking for myself in this whole email, and CC'ed l-k ]

On Fri, May 24, 2002 at 11:03:25AM -0700, Dan Kegel wrote:
> software patent on Tux... http://lwn.net/daily/

I'm more lucky than most of you because the original article is in
Italian so I can understand all the details. btw, I noticed the italian
linux community is very aware and responsive (we even had a law proposal
to help the free software IIRC).

Just for reference I attached the 13 line long patch in -aa that is
being requested to be put under this patent:

http://l2.espacenet.com/espacenet/viewer?PN=WO0217597&CY=ep&LG=en&DB=EPD

the code is available also from here:

ftp://ftp.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.19pre8aa4/60_atomic-lookup-5

and in the tux patches at www.redhat.com/~mingo/ that I merged in my
tree and that are shipped with various vendor kernels.

Now dropping this feature from tux is a matter of a few hours and it
cannot make difference if your vfs working set fits in dcache, but
that's not the problem. I wonder what's next, should I apply for a
patent for the classzone algorithm in the memory balancing or is Ingo
going to patent the O1 scheduler too? Ingo, Alan, Arjan, DaveM are so much
worried about binary only modules, Alan even speaks about the DMCA all
over the place, this is an order of magnitude worse, this even forbids
you to use this tequnique despite you may invented it too from scratch
and it's your own idea too. To make the opposite example despite IBM is
a big patent producer IBM even allowed the usage of their RCU patents in
the linux kernel (I've the paperwork under my desk and Linus should have
received too), and other stuff donated to gcc and probably much more
that I don't know about, IMHO exactly to avoid linux to be castrated by
patents. So this news is totally stunning from my part.

I think it is in the interest of the US gov to do something to avoid
these three patents to pass and hurt the linux developement. I think
this is a breakpoint and they cannot ignore those issues at this point.
If they act now, they will stop the problem at its root and we don't
risk a fragmentation. Until it was only rtlinux to be patented that is
never been a showstopper because real time apps are a niche market and
they're not mainstream but the O_ATOMICLOOKUP API is even exported to
userspace! (for all the wrong reasons btw, because that's not yet part
of mainline for some unknown reason but if mainline collides on some
number I will notice in a jiffy and the collision could be resolved so
it's a minor problem compared to the patent) Even Ingo said once a few
years back to l-k that somebody should do something to at least avoid
the application of patentes to linux (I can search and forward you the
email if you're curious) and I certainly agreed with that opinion.

I can probably do nothing more than to write this email just to give
more awareness about the technical parts of the problem, so not really
much, but at least if the thing passes I felt I did all I could to try
to avoid it.

I would also suggest to apply the below patch to mainline (if something
to avoid collisions on the O_ flag #defines that as said is a minor
problem after all).

diff -urN 2.4.15pre1/fs/namei.c atomic-lookup/fs/namei.c
--- 2.4.15pre1/fs/namei.c Wed Oct 24 08:04:22 2001
+++ atomic-lookup/fs/namei.c Fri Nov 9 04:34:12 2001
@@ -448,9 +448,13 @@
{
struct dentry *dentry;
struct inode *inode;
- int err;
+ int err, atomic;
unsigned int lookup_flags = nd->flags;

+ atomic = 0;
+ if (lookup_flags & LOOKUP_ATOMIC)
+ atomic = 1;
+
while (*name=='/')
name++;
if (!*name)
@@ -519,6 +523,9 @@
/* This does the actual lookups.. */
dentry = cached_lookup(nd->dentry, &this, LOOKUP_CONTINUE);
if (!dentry) {
+ err = -EWOULDBLOCKIO;
+ if (atomic)
+ break;
dentry = real_lookup(nd->dentry, &this, LOOKUP_CONTINUE);
err = PTR_ERR(dentry);
if (IS_ERR(dentry))
@@ -582,6 +589,9 @@
}
dentry = cached_lookup(nd->dentry, &this, 0);
if (!dentry) {
+ err = -EWOULDBLOCKIO;
+ if (atomic)
+ break;
dentry = real_lookup(nd->dentry, &this, 0);
err = PTR_ERR(dentry);
if (IS_ERR(dentry))
@@ -924,6 +934,8 @@

if (f & O_DIRECTORY)
retval |= LOOKUP_DIRECTORY;
+ if (f & O_ATOMICLOOKUP)
+ retval |= LOOKUP_ATOMIC;

return retval;
}
diff -urN 2.4.15pre1/include/asm-alpha/fcntl.h atomic-lookup/include/asm-alpha/fcntl.h
--- 2.4.15pre1/include/asm-alpha/fcntl.h Sun Sep 23 21:11:40 2001
+++ atomic-lookup/include/asm-alpha/fcntl.h Fri Nov 9 04:34:12 2001
@@ -20,6 +20,7 @@
#define O_DIRECTORY 0100000 /* must be a directory */
#define O_NOFOLLOW 0200000 /* don't follow links */
#define O_LARGEFILE 0400000 /* will be set by the kernel on every open */
+#define O_ATOMICLOOKUP 01000000 /* do atomic file lookup */
#define O_DIRECT 02000000 /* direct disk access - should check with OSF/1 */

#define F_DUPFD 0 /* dup */
diff -urN 2.4.15pre1/include/asm-i386/fcntl.h atomic-lookup/include/asm-i386/fcntl.h
--- 2.4.15pre1/include/asm-i386/fcntl.h Sun Sep 23 21:11:40 2001
+++ atomic-lookup/include/asm-i386/fcntl.h Fri Nov 9 04:34:12 2001
@@ -20,6 +20,7 @@
#define O_LARGEFILE 0100000
#define O_DIRECTORY 0200000 /* must be a directory */
#define O_NOFOLLOW 0400000 /* don't follow links */
+#define O_ATOMICLOOKUP 01000000 /* do atomic file lookup */

#define F_DUPFD 0 /* dup */
#define F_GETFD 1 /* get close_on_exec */
diff -urN 2.4.15pre1/include/asm-ia64/fcntl.h atomic-lookup/include/asm-ia64/fcntl.h
--- 2.4.15pre1/include/asm-ia64/fcntl.h Thu Nov 16 15:37:42 2000
+++ atomic-lookup/include/asm-ia64/fcntl.h Fri Nov 9 04:34:12 2001
@@ -28,6 +28,7 @@
#define O_LARGEFILE 0100000
#define O_DIRECTORY 0200000 /* must be a directory */
#define O_NOFOLLOW 0400000 /* don't follow links */
+#define O_ATOMICLOOKUP 01000000 /* do atomic file lookup */

#define F_DUPFD 0 /* dup */
#define F_GETFD 1 /* get close_on_exec */
diff -urN 2.4.15pre1/include/asm-ppc/fcntl.h atomic-lookup/include/asm-ppc/fcntl.h
--- 2.4.15pre1/include/asm-ppc/fcntl.h Tue Nov 6 02:04:53 2001
+++ atomic-lookup/include/asm-ppc/fcntl.h Fri Nov 9 04:34:42 2001
@@ -23,6 +23,7 @@
#define O_NOFOLLOW 0100000 /* don't follow links */
#define O_LARGEFILE 0200000
#define O_DIRECT 0400000 /* direct disk access hint */
+#define O_ATOMICLOOKUP 01000000 /* do atomic file lookup */

#define F_DUPFD 0 /* dup */
#define F_GETFD 1 /* get close_on_exec */
diff -urN 2.4.15pre1/include/asm-sparc/fcntl.h atomic-lookup/include/asm-sparc/fcntl.h
--- 2.4.15pre1/include/asm-sparc/fcntl.h Sun Sep 23 21:11:42 2001
+++ atomic-lookup/include/asm-sparc/fcntl.h Fri Nov 9 04:34:12 2001
@@ -20,6 +20,7 @@
#define O_DIRECTORY 0x10000 /* must be a directory */
#define O_NOFOLLOW 0x20000 /* don't follow links */
#define O_LARGEFILE 0x40000
+#define O_ATOMICLOOKUP 0x80000 /* do atomic file lookup */
#define O_DIRECT 0x100000 /* direct disk access hint */

#define F_DUPFD 0 /* dup */
diff -urN 2.4.15pre1/include/asm-sparc64/fcntl.h atomic-lookup/include/asm-sparc64/fcntl.h
--- 2.4.15pre1/include/asm-sparc64/fcntl.h Sun Sep 23 21:11:42 2001
+++ atomic-lookup/include/asm-sparc64/fcntl.h Fri Nov 9 04:34:12 2001
@@ -20,6 +20,7 @@
#define O_DIRECTORY 0x10000 /* must be a directory */
#define O_NOFOLLOW 0x20000 /* don't follow links */
#define O_LARGEFILE 0x40000
+#define O_ATOMICLOOKUP 0x80000 /* do atomic file lookup */
#define O_DIRECT 0x100000 /* direct disk access hint */


diff -urN 2.4.15pre1/include/linux/errno.h atomic-lookup/include/linux/errno.h
--- 2.4.15pre1/include/linux/errno.h Fri Aug 17 05:02:27 2001
+++ atomic-lookup/include/linux/errno.h Fri Nov 9 04:34:12 2001
@@ -21,6 +21,9 @@
#define EBADTYPE 527 /* Type not supported by server */
#define EJUKEBOX 528 /* Request initiated, but will not complete before timeout */

+/* Defined for TUX async IO */
+#define EWOULDBLOCKIO 530 /* Would block due to block-IO */
+
#endif

#endif
diff -urN 2.4.15pre1/include/linux/fs.h atomic-lookup/include/linux/fs.h
--- 2.4.15pre1/include/linux/fs.h Tue Nov 6 02:04:53 2001
+++ atomic-lookup/include/linux/fs.h Fri Nov 9 04:34:12 2001
@@ -1260,6 +1260,7 @@
#define LOOKUP_POSITIVE (8)
#define LOOKUP_PARENT (16)
#define LOOKUP_NOALT (32)
+#define LOOKUP_ATOMIC (64)
/*
* Type of the last component on LOOKUP_PARENT
*/

Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Anton Altaparmakov

unread,
May 24, 2002, 5:18:30 PM5/24/02
to
[Andrew Morton removed from CC: list as he doesn't want to be on it...]

Hi,

At 21:26 24/05/02, Andrea Arcangeli wrote:
>[ speaking for myself in this whole email, and CC'ed l-k ]
>
>On Fri, May 24, 2002 at 11:03:25AM -0700, Dan Kegel wrote:
> > software patent on Tux... http://lwn.net/daily/

This patent was filed on August 22, 2001. If this is after the code came
into public existence this would constitute prior art and hence invalidate
the patent... Of course I have no idea when the code you pointed out was
released...

In either case, software patents are not allowed in the European Union
(yet), so we would just need to have an european kernel... (-;

Best regards,

Anton


--
"I've not lost my mind. It's backed up on tape somewhere." - Unknown
--
Anton Altaparmakov <aia21 at cantab.net> (replace at with @)
Linux NTFS Maintainer / IRC: #ntfs on irc.openprojects.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/

Karim Yaghmour

unread,
May 24, 2002, 5:18:53 PM5/24/02
to

Just wanting to put the record straight here about the rtlinux patent.

Andrea Arcangeli wrote:
> risk a fragmentation. Until it was only rtlinux to be patented that is
> never been a showstopper because real time apps are a niche market and
> they're not mainstream

I've been involved in fighting this patent for the last 2 years. During
this time, I have met and talked with many people about this issue. Today,
I can assure you that the rtlinux patent is definitely a show-stopper for
Linux.

As it stands now, Linux will never be a viable embedded OS until someone
gets rid of the rtlinux patent. As a matter of fact, many people in the
industry decide to go with WinCE precisely because of the rtlinux patent.

Many in the real-time Linux community are very worried by the fact that
the kernel developers do indeed see real-time as a niche market because
the members of the real-time Linux community see the damage being done to
Linux's penetration in the embedded field because of the patent.

As the latest VDC report indicates
(http://www.linuxdevices.com/articles/AT6328992055.html), the no. 1
factor inhibiting Linux's adoption as an embedded OS is indeed real-time.

It is no wonder that the established embedded vendors (WindRiver, QNX,
etc.) feel no threat from Linux. They know that every time Linux will
be evaluated, it will be put aside because of the patent.

Given that the embedded field is poised to overtake the desktop and the
server in terms of number of devices deployed, it would seem to me
that this is much more than just a niche market.

Until the rtlinux patent is dismissed, Linux will remain on the fringes
of the real-time and embedded application field. Unfortunately.

Karim

===================================================
Karim Yaghmour
ka...@opersys.com
Embedded and Real-Time Linux Expert
===================================================

Alexander Viro

unread,
May 24, 2002, 5:56:32 PM5/24/02
to

On Fri, 24 May 2002, Andrea Arcangeli wrote:

> Now dropping this feature from tux is a matter of a few hours and it
> cannot make difference if your vfs working set fits in dcache, but
> that's not the problem. I wonder what's next, should I apply for a
> patent for the classzone algorithm in the memory balancing or is Ingo
> going to patent the O1 scheduler too? Ingo, Alan, Arjan, DaveM are so much
> worried about binary only modules, Alan even speaks about the DMCA all
> over the place, this is an order of magnitude worse, this even forbids
> you to use this tequnique despite you may invented it too from scratch
> and it's your own idea too. To make the opposite example despite IBM is
> a big patent producer IBM even allowed the usage of their RCU patents in
> the linux kernel (I've the paperwork under my desk and Linus should have
> received too), and other stuff donated to gcc and probably much more
> that I don't know about, IMHO exactly to avoid linux to be castrated by
> patents. So this news is totally stunning from my part.

For once I have to agree with Andrea. Software patents do not
magically become better if you allow GPLed software to make use of them.
It's one thing to put your _code_ under whatever license you like. That
defines what you consider acceptable use and what - inexcusable plagiarism.

"Using what I'd learnt from your work" and "lending the book I've
bought to a friend" are equally old and respectable things. Hell, the former
might very well be older, for all we know. Both may be inconvenient to, ahem,
producers of intellectual property. It doesn't make attempts to limit them
morally acceptable.

Don't get me wrong - I despise the "let's abolish IP rights" crowd.
Plagiarism is Wrong and author has absolute right to choose the conditions
for use of the things he'd written. However, there is a line between "you
are using my code" and "you had learnt something from my code".

Patenting crosses that line - it puts restriction on the way one
could use the things he'd learnt from your code. Yes, mere putting your
code under GPL doesn't stop somebody from using the results of your efforts
in the ways you don't approve - he still can learn from your work and use
what he'd learnt in a work of his own. Yes, I can see the attraction of
prohibiting that. Just as I can see the attraction of bribery that had
created DMCA - with fairly close motivations behind it.

Both DMCA and software patents may be legal, but that doesn't make
use of either of them morally acceptable from my point of view. YMMV. It's
sad to see Ingo pulling that crap - I believe that he has reasons that sound
good to him, but... reasons don't make results smell any sweeter.

I've heard an excuse for playing these games (not from Ingo, so I have
no idea whether it has any relation to this case). It goes along the lines
"commercial companies are doing that anyway and that poses a threat; having
patents of our own gives ammo for defence against that threat". That sounds
nice, but... there's an old saying - "don't play games with the devil". It's
not that you can't win - devil is a piss-poor player. But those who do win
tend to find the rules suddenly changed under them. And then there are
bystanders caught in crossfire...

Andreas Dilger

unread,
May 24, 2002, 5:57:30 PM5/24/02
to
On May 24, 2002 17:18 -0400, Karim Yaghmour wrote:
> Just wanting to put the record straight here about the rtlinux patent.

IANAL or an embedded software expert, but...

> I've been involved in fighting this patent for the last 2 years. During
> this time, I have met and talked with many people about this issue. Today,
> I can assure you that the rtlinux patent is definitely a show-stopper for
> Linux.
>

> It is no wonder that the established embedded vendors (WindRiver, QNX,
> etc.) feel no threat from Linux. They know that every time Linux will
> be evaluated, it will be put aside because of the patent.

What, so there are _no_ patents or other restrictions on any of the
commercial embedded OS vendor products? I would imagine that you need
to pay some sort of license fee to those vendors in order to use their
code for products you sell.

I imagine that the rtlinux patent is also available for license, and
will only have a small per-usage fee <= other commercial license fees.
If not then the patent holder is foolish and there is no point in having
the patent in the first place.

Cheers, Andreas

PS - I'm not in favour of patents for Linux at all, but saying "you
can't use rtlinux because of the patent" doesn't make sense.

PPS- I also think "defensive patents" on Linux are also a bad idea,
because (a) the Linux source code is surely "published" and any
ideas therein already constitute prior art for the sake of
defending a patent infringement suit, and (b) since patents can
be bought and sold any "defensive patents" might fall into the
wrong hands if the patent holder goes bankrupt and the assets are
sold off to the highest bidder - bad news for the entire Linux
community.
--
Andreas Dilger
http://www-mddsp.enel.ucalgary.ca/People/adilger/
http://sourceforge.net/projects/ext2resize/

Linus Torvalds

unread,
May 24, 2002, 5:46:26 PM5/24/02
to

On Fri, 24 May 2002, Karim Yaghmour wrote:
>
> I've been involved in fighting this patent for the last 2 years. During
> this time, I have met and talked with many people about this issue. Today,
> I can assure you that the rtlinux patent is definitely a show-stopper for
> Linux.

_Why_?

That patent is expressly licensed for GPL'd kernels, ie Linux.

It might be an issue with some other OS, but not Linux.

See "http://www.fsmlabs.com/about/patent/openpatentlicense.htm".

I've heard a lot of discussions about ho this kind of "license to Open
Source software" kinds of patents have long been discussed as ways to
subvert the patent system the same way that the copyleft itself subverts
the copyrights.

Even the FSF supports this particular patent (they used to have some
issues about the patent license being revocable, but now you have the
patent license "as long as the licensee compiles with this license and the
terms of the GPL".

[ Actually, the FSF is slightly unhappy about the fact that that patent
license expressly picks out GPL v2, the same way the _kernel_ explicitly
mentions that only v2 of the GPL is the default. Victor, like me, does
not trust the FSF to remain faithful to its original licenses. ]

In short, it you start playing fast and lose with the GPL, you lose the
patent rights too. Too bad. But if you stay true, that license is yours,
for free. Exactly like the GPL requires.

Linus

Alan Cox

unread,
May 24, 2002, 6:37:15 PM5/24/02
to
> What, so there are _no_ patents or other restrictions on any of then

> commercial embedded OS vendor products? I would imagine that you need
> to pay some sort of license fee to those vendors in order to use their
> code for products you sell.

Thousands of them. Some of them like the Siemens power management patent
really hurt Linux too.

> PPS- I also think "defensive patents" on Linux are also a bad idea,
> because (a) the Linux source code is surely "published" and any
> ideas therein already constitute prior art for the sake of
> defending a patent infringement suit, and (b) since patents can
> be bought and sold any "defensive patents" might fall into the
> wrong hands if the patent holder goes bankrupt and the assets are
> sold off to the highest bidder - bad news for the entire Linux
> community.

It means you have to file the patent first, which is a pain. The whole
Software patent thing is a huge disaster and one they are lobbying very
hard to push into europe and via the backdoors of unaccountable
undemocratic bodies like the WTO. They have to, otherwise the demise of
the USA as a viable economy rapidly accelerates because its only the US
afflicted by this mess.

Those defensive patents also provide scope for trading stuff with other
companies, and finally never forget that if you own patents and say its
a stupid idea you carry a *lot* more weight.

I'd suggest Andrea does something else. Ask the Red Hat people for a formal
confirmation he can use it, just like IBM with RCU. I have this funny feeling
that he'll get an extremely positive response.

Alan

Alan Cox

unread,
May 24, 2002, 6:46:13 PM5/24/02
to
> Just for reference I attached the 13 line long patch in -aa that is
> being requested to be put under this patent:

In the USA it probably is covered by that patent yes

> Now dropping this feature from tux is a matter of a few hours and it
> cannot make difference if your vfs working set fits in dcache, but
> that's not the problem. I wonder what's next, should I apply for a
> patent for the classzone algorithm in the memory balancing or is Ingo
> going to patent the O1 scheduler too? Ingo, Alan, Arjan, DaveM are so much
> worried about binary only modules, Alan even speaks about the DMCA all
> over the place, this is an order of magnitude worse, this even forbids
> you to use this tequnique despite you may invented it too from scratch
> and it's your own idea too. To make the opposite example despite IBM is

The DMCA also forbids you from using both content and ideas of your own.
If you had a clever idea about disabled access to an ebook its jail. Patents
are bad but don't trivialise the other stuff.

> a big patent producer IBM even allowed the usage of their RCU patents in
> the linux kernel (I've the paperwork under my desk and Linus should have
> received too), and other stuff donated to gcc and probably much more
> that I don't know about, IMHO exactly to avoid linux to be castrated by
> patents. So this news is totally stunning from my part.

So mail the Red Hat legal people and ask them to land similar paperwork
under your desk if you feel you need it (remember the GPL on 'no additional
restrictions' . Lots of people are following this kind of path - RTLinux may
have been first but lots of stuff like QV30 have followed similar "GPL ok"
type paths.

Like it or not patents owned and controlled by the free software community
are a neccessary thing in the short term. Yes software patents need reform,
and their addition to patent law avoiding in most of the world. Code is
speech, imagine being able to patent a book plot, or suing George Bush
because you had a patent on pro war rhetoric ?

Alexander Viro

unread,
May 24, 2002, 6:53:15 PM5/24/02
to

On Fri, 24 May 2002, Alan Cox wrote:

> Like it or not patents owned and controlled by the free software community
> are a neccessary thing in the short term. Yes software patents need reform,
> and their addition to patent law avoiding in most of the world. Code is
> speech, imagine being able to patent a book plot, or suing George Bush
> because you had a patent on pro war rhetoric ?

*LOTS* of prior art on that one.

0 new messages