[patch] removing EINVAL error from cacheflush() man page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

The cacheflush() man page states that cacheflush() will set  EINVAL if
cache parameter is not one of ICACHE, DCACHE, or BCACHE. I have tried
to verify this behavior in linux-2.6.29.1 and observed that this check
is not implemented in the kernel. Based on this observation, I have
proposed one patch to LKML and the details are available in the below
listed URL:

http://lkml.org/lkml/2009/4/9/203

At first, this patch
(mips-cacheflush-system-call-not-returning-einval-checkpatch-fixes.patch)
 was added to the -mm tree and later dropped. Mr. Ralf Baechle and Mr.
Andrew Morton have expressed their views on why it was dropped.

Ralf Baechle :
"There is no point in checking the arguments which are being ignored anyway."

Andrew Morton:
"
> There is no point in checking the arguments which are being ignored
> anyway.
>
Well, there _is_ a point.  So that people don't write buggy userspace
which "seems" to work, but which will fail if at some time in the
future we _do_ start using the argument.  ie: for
future-compatibility.
But it's too late to fix that up now."

The reference to -EINVAL  is present from the very first release of
cacheflush() man page :
man-pages-1.10.tar.gz which was released on Jan 15  1996.
Thanks to Mr. Michael Kerrisk for providing the URL which helped me to
trace out the  history of cacheflush() man page:
ftp://ftp.win.tue.nl/pub/linux-local/manpages.archive/

Based on this, I think , we should modify the cacheflush() man page.

Signed-off-by: Maxin B. John <maxin.john@xxxxxxxxxxx>
--------
diff -uNr man-pages-3.21-orig/man2/cacheflush.2 man-pages-3.21/man2/cacheflush.2
--- man-pages-3.21-orig/man2/cacheflush.2       2009-04-15
21:35:32.000000000 +0530
+++ man-pages-3.21/man2/cacheflush.2    2009-05-07 15:06:31.350544848 +0530
@@ -63,14 +63,6 @@
 to
 .I (addr+nbytes-1)
 is not accessible.
-.TP
-.B EINVAL
-.I cache
-is not one of
-.BR ICACHE ,
-.BR DCACHE ,
-or
-.BR BCACHE .
 .SH CONFORMING TO
 This Linux-specific system call is only available on MIPS based systems.
 .\" FIXME This system call was only on MIPS back in 1.2 days, but
~
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux