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] [day] [month] [year] [list]
Date:	Sat, 4 Apr 2015 20:02:03 +0300
From:	Konstantin Khlebnikov <koct9i@...il.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Konstantin Khlebnikov <khlebnikov@...dex-team.ru>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	Sasha Levin <sasha.levin@...cle.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm/memory: print also a_ops->readpage in print_bad_pte

On Sat, Apr 4, 2015 at 4:35 AM, Andrew Morton <akpm@...ux-foundation.org> wrote:
> On Sat, 4 Apr 2015 03:47:12 +0300 Konstantin Khlebnikov <koct9i@...il.com> wrote:
>
>> On Sat, Apr 4, 2015 at 1:10 AM, Andrew Morton <akpm@...ux-foundation.org> wrote:
>> > On Fri, 03 Apr 2015 20:18:18 +0300 Konstantin Khlebnikov <khlebnikov@...dex-team.ru> wrote:
>> >
>> >> A lot of filesystems use generic_file_mmap() and filemap_fault(),
>> >> f_op->mmap and vm_ops->fault aren't enough to identify filesystem.
>> >>
>> >> This prints file name, vm_ops->fault, f_op->mmap and a_ops->readpage
>> >> (which is almost always implemented and filesystem-specific).
>> >>
>> >> Example:
>> >>
>> >> [   23.676410] BUG: Bad page map in process sh  pte:1b7e6025 pmd:19bbd067
>> >> [   23.676887] page:ffffea00006df980 count:4 mapcount:1 mapping:ffff8800196426c0 index:0x97
>> >> [   23.677481] flags: 0x10000000000000c(referenced|uptodate)
>> >> [   23.677896] page dumped because: bad pte
>> >> [   23.678205] addr:00007f52fcb17000 vm_flags:00000075 anon_vma:          (null) mapping:ffff8800196426c0 index:97
>> >> [   23.678922] file:libc-2.19.so fault:filemap_fault mmap:generic_file_readonly_mmap readpage:v9fs_vfs_readpage
>> >
>> > Is that why we print these out?  Just to identify the fs type?
>> >
>> > There's always vma->vm_file->f_inode->i_sb->s_magic ;)
>>
>> Yes, but that also might be anon inode/file mapped by some driver, so
>> s_magic isn't enough.
>
> Well, we could ensure that every file_system_type has a valid ->name.
> Do an audit, put a debug check in register_filesystem()?

Anyway there are a lot of pseudo filesystems which are a used in many places
(bdev sockfs anon_inodefs). Plus char dev inodes belongs to normal filesystem
but their f_ops points to somewhere else. Printed mmap/fault/readpage points
exactly to the code which is in charge of that page.
--
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