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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160916120903.GB72667@black.fi.intel.com>
Date:   Fri, 16 Sep 2016 15:09:03 +0300
From:   "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
To:     Theodore Ts'o <tytso@....edu>,
        Andreas Dilger <adilger.kernel@...ger.ca>,
        Jan Kara <jack@...e.com>,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     Alexander Viro <viro@...iv.linux.org.uk>,
        Hugh Dickins <hughd@...gle.com>,
        Andrea Arcangeli <aarcange@...hat.com>,
        Dave Hansen <dave.hansen@...el.com>,
        Vlastimil Babka <vbabka@...e.cz>,
        Matthew Wilcox <willy@...radead.org>,
        Ross Zwisler <ross.zwisler@...ux.intel.com>,
        linux-ext4@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        linux-block@...r.kernel.org
Subject: Re: [PATCHv3 19/41] block: define BIO_MAX_PAGES to HPAGE_PMD_NR if
 huge page cache enabled

On Thu, Sep 15, 2016 at 02:55:01PM +0300, Kirill A. Shutemov wrote:
> We are going to do IO a huge page a time. So we need BIO_MAX_PAGES to be
> at least HPAGE_PMD_NR. For x86-64, it's 512 pages.

0-DAY reported this:

[    2.555776] PCI: Using configuration type 1 for base access
[    2.870504] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[    2.885252] ------------[ cut here ]------------
[    2.887501] WARNING: CPU: 0 PID: 1 at mm/slab_common.c:98 kmem_cache_create+0xbc/0x18b
[    2.891987] Modules linked in:
[    2.893538] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.8.0-rc6-00021-gd96a38d #421
[    2.897164]  00000000 00200246 cef0decc c141aa9e 00000000 c11279b6 cef0dee4 c104990a
[    2.908396]  00000062 c1a820f0 c1b752f4 c1999b09 cef0def8 c104999c 00000009 00000000
[    2.912555]  00000000 cef0df1c c11279b6 00000000 c1999afe 00001800 6bc01ac0 c1b3d0bc
[    2.916733] Call Trace:
[    2.930981]  [<c141aa9e>] dump_stack+0x74/0xa7
[    2.933128]  [<c11279b6>] ? kmem_cache_create+0xbc/0x18b
[    2.935630]  [<c104990a>] __warn+0xbc/0xd3
[    2.937586]  [<c1b752f4>] ? x509_key_init+0xf/0xf
[    2.939837]  [<c104999c>] warn_slowpath_null+0x16/0x1b
[    2.942279]  [<c11279b6>] kmem_cache_create+0xbc/0x18b
[    2.957745]  [<c1b752f4>] ? x509_key_init+0xf/0xf
[    2.960010]  [<c1b7534c>] init_bio+0x58/0x94
[    2.962048]  [<c10004a8>] do_one_initcall+0x83/0x103
[    2.964428]  [<c1061d24>] ? parse_args+0x1c9/0x29c
[    2.966725]  [<c1b41cc0>] ? kernel_init_freeable+0x16f/0x20c
[    2.969400]  [<c1b41ce0>] kernel_init_freeable+0x18f/0x20c
[    2.994076]  [<c1731e6a>] kernel_init+0xd/0xd5
[    2.996185]  [<c17385ae>] ret_from_kernel_thread+0xe/0x30
[    2.998748]  [<c1731e5d>] ? rest_init+0xa6/0xa6
[    3.000968] ---[ end trace 197bc755366f9a86 ]---
[    3.021244] ACPI: Added _OSI(Module Device)

Fix up:

diff --git a/block/bio.c b/block/bio.c
index aa7354088008..a06bf174cddf 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -44,7 +44,8 @@
  */
 #define BV(x) { .nr_vecs = x, .name = "biovec-"__stringify(x) }
 static struct biovec_slab bvec_slabs[BVEC_POOL_NR] __read_mostly = {
-	BV(1), BV(4), BV(16), BV(64), BV(128), BV(BIO_MAX_PAGES),
+	BV(1), BV(4), BV(16), BV(64), BV(128),
+	{ .nr_vecs = BIO_MAX_PAGES, .name ="biovec-max_pages" },
 };
 #undef BV
 
-- 
 Kirill A. Shutemov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ