lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111124175002.GM2203@ZenIV.linux.org.uk>
Date:	Thu, 24 Nov 2011 17:50:03 +0000
From:	Al Viro <viro@...IV.linux.org.uk>
To:	George Spelvin <linux@...izon.com>
Cc:	jack@...e.cz, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org, George Spelvin <linux@...izon.com>
Subject: Re: 3.1-rc10 oops in nameidata_to_filp

On Thu, Nov 24, 2011 at 05:38:29PM +0000, Al Viro wrote:
> Said that, I'm not buying the theory of open assigning to ->f_mapping and
> screwing it up; all such assignments end up with ->i_mapping of *some*
> inode, as far as I can see from cursory grep over the tree.  Just in case:
> do you have CONFIG_FS_POSIX_ACL set?

BTW, why are we going through that dance with ->host->i_mapping anyway?
It had been introduced by commit by akpm back in 2004 and from my reading
of the commit message it was an overkill even back then.  Basically,
that call got moved to the point past the call of ->open() (good, ->f_mapping
could've been changed by it) *and* converted from ->f_mapping to
->f_mapping->host->i_mapping, which is useless.  Definitely so in the
case mentioned in that commit (blkdev_open() sets ->f_mapping 
bdev->bd_inode->i_mapping and that thing will have ->host pointing
back to bdev->bd_inode).  Commit was in BK, its copy in historical tree
is commit 1c211088833a27daa4512348bcae9890e8cf92d4
Author: Andrew Morton <akpm@...l.org>
Date:   Wed May 26 17:35:42 2004 -0700

    [PATCH] Fix the setting of file->f_ra on block-special files
    
    We need to set file->f_ra _after_ calling blkdev_open(), when inode->i_mapping
    points at the right thing.  And we need to get it from
    inode->i_mapping->host->i_mapping too, which represents the underlying device.
    
    Also, don't test for null file->f_mapping in the O_DIRECT checks.
    
    Signed-off-by: Andrew Morton <akpm@...l.org>

and the only difference wrt setting ->f_mapping on bdev open back then
is that it used to be done in do_open() instead of blkdev_open() itself.
So I don't understand what that part of changes had been for...  Andrew?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ