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: <9793f9d3-4ef1-aad0-b38f-d8760e536ff9@suse.cz>
Date:   Mon, 30 Jan 2017 17:14:21 +0100
From:   Vlastimil Babka <vbabka@...e.cz>
To:     Michal Hocko <mhocko@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     David Rientjes <rientjes@...gle.com>, Mel Gorman <mgorman@...e.de>,
        Johannes Weiner <hannes@...xchg.org>,
        Al Viro <viro@...iv.linux.org.uk>, linux-mm@...ck.org,
        LKML <linux-kernel@...r.kernel.org>,
        Michal Hocko <mhocko@...e.com>,
        Martin Schwidefsky <schwidefsky@...ibm.com>,
        Heiko Carstens <heiko.carstens@...ibm.com>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        Anton Vorontsov <anton@...msg.org>,
        Colin Cross <ccross@...roid.com>,
        Kees Cook <keescook@...omium.org>,
        Tony Luck <tony.luck@...el.com>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Ben Skeggs <bskeggs@...hat.com>,
        Kent Overstreet <kent.overstreet@...il.com>,
        Santosh Raspatur <santosh@...lsio.com>,
        Hariprasad S <hariprasad@...lsio.com>,
        Yishai Hadas <yishaih@...lanox.com>,
        Oleg Drokin <oleg.drokin@...el.com>,
        "Yan, Zheng" <zyan@...hat.com>,
        Alexei Starovoitov <ast@...nel.org>,
        Eric Dumazet <eric.dumazet@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH 5/9] treewide: use kv[mz]alloc* rather than opencoded
 variants

On 01/30/2017 10:49 AM, Michal Hocko wrote:
> From: Michal Hocko <mhocko@...e.com>
>
> There are many code paths opencoding kvmalloc. Let's use the helper
> instead. The main difference to kvmalloc is that those users are usually
> not considering all the aspects of the memory allocator. E.g. allocation
> requests <= 32kB (with 4kB pages) are basically never failing and invoke
> OOM killer to satisfy the allocation. This sounds too disruptive for
> something that has a reasonable fallback - the vmalloc. On the other
> hand those requests might fallback to vmalloc even when the memory
> allocator would succeed after several more reclaim/compaction attempts
> previously. There is no guarantee something like that happens though.
>
> This patch converts many of those places to kv[mz]alloc* helpers because
> they are more conservative.
>
> Changes since v1
> - add kvmalloc_array - this might silently fix some overflow issues
>   because most users simply didn't check the overflow for the vmalloc
>   fallback.
>
> Cc: Martin Schwidefsky <schwidefsky@...ibm.com>
> Cc: Heiko Carstens <heiko.carstens@...ibm.com>
> Cc: Herbert Xu <herbert@...dor.apana.org.au>
> Cc: Anton Vorontsov <anton@...msg.org>
> Cc: Colin Cross <ccross@...roid.com>
> Cc: Kees Cook <keescook@...omium.org>
> Cc: Tony Luck <tony.luck@...el.com>
> Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>
> Cc: Ben Skeggs <bskeggs@...hat.com>
> Cc: Kent Overstreet <kent.overstreet@...il.com>
> Cc: Santosh Raspatur <santosh@...lsio.com>
> Cc: Hariprasad S <hariprasad@...lsio.com>
> Cc: Yishai Hadas <yishaih@...lanox.com>
> Cc: Oleg Drokin <oleg.drokin@...el.com>
> Cc: "Yan, Zheng" <zyan@...hat.com>
> Cc: Alexander Viro <viro@...iv.linux.org.uk>
> Cc: Alexei Starovoitov <ast@...nel.org>
> Cc: Eric Dumazet <eric.dumazet@...il.com>
> Cc: netdev@...r.kernel.org
> Acked-by: Andreas Dilger <andreas.dilger@...el.com> # Lustre
> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@...cle.com> # Xen bits
> Acked-by: Christian Borntraeger <borntraeger@...ibm.com> # KVM/s390
> Acked-by: Dan Williams <dan.j.williams@...el.com> # nvdim
> Acked-by: David Sterba <dsterba@...e.com> # btrfs
> Acked-by: Ilya Dryomov <idryomov@...il.com> # Ceph
> Acked-by: Tariq Toukan <tariqt@...lanox.com> # mlx4
> Signed-off-by: Michal Hocko <mhocko@...e.com>

Acked-by: Vlastimil Babka <vbabka@...e.cz>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ