atom feed3 messages in org.kernel.vger.linux-man[patch] removing EINVAL error from ca...
FromSent OnAttachments
Maxin JohnMay 7, 2009 2:39 am 
Ralf BaechleMay 7, 2009 4:08 am 
Maxin JohnMay 7, 2009 7:28 am 
Subject:[patch] removing EINVAL error from cacheflush() man page
From:Maxin John (maxi@gmail.com)
Date:May 7, 2009 2:39:56 am
List:org.kernel.vger.linux-man

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.

-------- 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 ~