Patch for /proc/mounts problems on 2.2.x

From: Christian Czezatke (czezatke@xss.co.at)
Date: Wed Oct 25 2000 - 03:59:13 EST


Hi!

I've recently run across some problems with /proc/mounts on Linux 2.2.17
when trying to get rid of /etc/mtab in favor of /proc/mounts.

Unfortunately, I had to discover that /proc/mounts does not show all the
mounting options (usrquota, grpquota). -- Furthermore, the max. size of
/proc/mounts is limited to one page. Even worse, the current
implementation in Linux 2.2.17 and 2.2.18preX does not perform proper
bounds checking. (I've successfully triggered off an OOPS by exploiting
this on a box running Linux 2.2.17).

Patches that are basically a backport of the 2.4.x implementation of
fs/super.c:get_filesystem_info (handles /proc/mounts) can be found at:

  http://www.xss.co.at/sysinfo/mounts_diff-2.2.17-patch
  (against Linux 2.2.17)

or

  http://www.xss.co.at/sysinfo/mounts_diff-2.2.18pre17-patch
  (against Linux 2.2.18pre17).

These patches fix the bounds-checking issue. (Alan, please consider the
patch against 2.2.18pre17 for inclusion into the 2.2.18 kernel.)

In the future we should IMHO remove the current limitations of
/proc/mounts so that the mount-command can finally get rid of having to do
all the bookkeeping in /etc/mtab itself.

For more information (especially why this would be a good thing...) please
have a look at:

  http://www.xss.co.at/sysinfo/mounts.html

Please let me know what you think about this issue.

     Christian

--
--------------------------------------------------------------------
\       DI. Christian Czezatke  | email: czezatke@xss.co.at       /    
 \      xS+S Andreas Haumer     | phone: +43-1-6060114-30        /
  \     Karmarschgasse 51/2/20  | fax:   +43-1-6060114-71       /
   \    A-1100 Vienna/Austria   |                              /
    -----------------------------------------------------------

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



This archive was generated by hypermail 2b29 : Tue Oct 31 2000 - 21:00:15 EST