lkml.org 
[lkml]   [1997]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Bug in caching of mount options
On Tue, 30 Sep 1997, Jim Nance wrote:
> If I mount a filesystem with the noexec option, then I (of cousre)
> cant run any binaries on it. If I remount it with:
>
> mount -o remount,exec /mnt/zip
>
> I can still not run binaries which I tried to run before the remount,
> but I CAN run new binaries which I copy into the file system.
>
> I can be more detailed if some one wants me to, but this is pretty
> easy to reproduce.

An inode structure caches the superblock flags (which include the noexec
mount option), in the member "i_flags".
When remounting "exec", only the superblock flags [s_flags] are updated.
Any 'cached' inodes still have the original flag value, which causes
IS_NOEXEC(inode) to return true.

The solution would be to parse the inode cache, and update "i_flags".
This code would belong in fs/inode.c, and would be similar to
invalidate_inodes() - although, obviously, there would be differences...

Regards,

markhe

------------------------------------------------------------------
Mark Hemment, Unix/C Software Engineer (Contractor)
markhe@nextd.demon.co.uk http://www.nextd.demon.co.uk/
"Success has many fathers, failure is a B**TARD!" - anon
------------------------------------------------------------------


\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.037 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site