Revision 6b7339f4c31ad69c8e9c0b2859276e22cf72176d authored by Kirill A. Shutemov on 06 July 2015, 20:18:37 UTC, committed by Linus Torvalds on 09 July 2015, 18:12:48 UTC
Reading page fault handler code I've noticed that under right circumstances kernel would map anonymous pages into file mappings: if the VMA doesn't have vm_ops->fault() and the VMA wasn't fully populated on ->mmap(), kernel would handle page fault to not populated pte with do_anonymous_page(). Let's change page fault handler to use do_anonymous_page() only on anonymous VMA (->vm_ops == NULL) and make sure that the VMA is not shared. For file mappings without vm_ops->fault() or shred VMA without vm_ops, page fault on pte_none() entry would lead to SIGBUS. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Acked-by: Oleg Nesterov <oleg@redhat.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Willy Tarreau <w@1wt.eu> Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 883a2df
File | Mode | Size |
---|---|---|
.gitignore | -rw-r--r-- | 12 bytes |
Kconfig | -rw-r--r-- | 2.3 KB |
Makefile | -rw-r--r-- | 1.5 KB |
asymmetric_keys.h | -rw-r--r-- | 744 bytes |
asymmetric_type.c | -rw-r--r-- | 10.5 KB |
mscode.asn1 | -rw-r--r-- | 840 bytes |
mscode_parser.c | -rw-r--r-- | 2.8 KB |
pkcs7.asn1 | -rw-r--r-- | 3.4 KB |
pkcs7_key_type.c | -rw-r--r-- | 2.3 KB |
pkcs7_parser.c | -rw-r--r-- | 10.1 KB |
pkcs7_parser.h | -rw-r--r-- | 1.8 KB |
pkcs7_trust.c | -rw-r--r-- | 4.9 KB |
pkcs7_verify.c | -rw-r--r-- | 9.6 KB |
public_key.c | -rw-r--r-- | 3.1 KB |
public_key.h | -rw-r--r-- | 1.1 KB |
rsa.c | -rw-r--r-- | 6.7 KB |
signature.c | -rw-r--r-- | 1.4 KB |
verify_pefile.c | -rw-r--r-- | 11.9 KB |
verify_pefile.h | -rw-r--r-- | 1.2 KB |
x509.asn1 | -rw-r--r-- | 1.6 KB |
x509_cert_parser.c | -rw-r--r-- | 13.8 KB |
x509_parser.h | -rw-r--r-- | 2.1 KB |
x509_public_key.c | -rw-r--r-- | 9.4 KB |
x509_rsakey.asn1 | -rw-r--r-- | 130 bytes |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...