From patchwork Tue Jan 12 23:49:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12015481 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97773C433DB for ; Tue, 12 Jan 2021 23:49:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 36C4023135 for ; Tue, 12 Jan 2021 23:49:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 36C4023135 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7F5E76B0113; Tue, 12 Jan 2021 18:49:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7CD4C6B0114; Tue, 12 Jan 2021 18:49:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 709B56B0115; Tue, 12 Jan 2021 18:49:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0193.hostedemail.com [216.40.44.193]) by kanga.kvack.org (Postfix) with ESMTP id 5D72E6B0113 for ; Tue, 12 Jan 2021 18:49:07 -0500 (EST) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 253A2181AEF30 for ; Tue, 12 Jan 2021 23:49:07 +0000 (UTC) X-FDA: 77698766334.27.knot41_530696d27519 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin27.hostedemail.com (Postfix) with ESMTP id 07C9E3D669 for ; Tue, 12 Jan 2021 23:49:07 +0000 (UTC) X-HE-Tag: knot41_530696d27519 X-Filterd-Recvd-Size: 2833 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Tue, 12 Jan 2021 23:49:06 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 6547723130; Tue, 12 Jan 2021 23:49:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1610495345; bh=e9BMBFEaSOKf0yTOMhrOd2Hj2FNsOt4O1JwdlSqxAR4=; h=Date:From:To:Subject:In-Reply-To:From; b=EDJ16x67znM1zbVVL3ZAZB26KfTcNT35T1YUpem+TmGZoLe45PMiWYQgk8Ac2TqBm INzAnAVxGYHKD7iJa2AQFD3P3h7vf7OxFHPV4tJujn+FtYn4r/YpzX0OIB1qT+solo saWPNJT3TfCMgQD0NSEtjrxNMyknMHA6IgA7HPPI= Date: Tue, 12 Jan 2021 15:49:04 -0800 From: Andrew Morton To: akpm@linux-foundation.org, cl@linux.com, iamjoonsoo.kim@lge.com, jannh@google.com, linux-mm@kvack.org, mm-commits@vger.kernel.org, penberg@kernel.org, rientjes@google.com, torvalds@linux-foundation.org Subject: [patch 01/10] mm, slub: consider rest of partial list if acquire_slab() fails Message-ID: <20210112234904.X5Ka1PlfB%akpm@linux-foundation.org> In-Reply-To: <20210112154839.abeb6e57de79480059fd9b0e@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Jann Horn Subject: mm, slub: consider rest of partial list if acquire_slab() fails acquire_slab() fails if there is contention on the freelist of the page (probably because some other CPU is concurrently freeing an object from the page). In that case, it might make sense to look for a different page (since there might be more remote frees to the page from other CPUs, and we don't want contention on struct page). However, the current code accidentally stops looking at the partial list completely in that case. Especially on kernels without CONFIG_NUMA set, this means that get_partial() fails and new_slab_objects() falls back to new_slab(), allocating new pages. This could lead to an unnecessary increase in memory fragmentation. Link: https://lkml.kernel.org/r/20201228130853.1871516-1-jannh@google.com Fixes: 7ced37197196 ("slub: Acquire_slab() avoid loop") Signed-off-by: Jann Horn Acked-by: David Rientjes Acked-by: Joonsoo Kim Cc: Christoph Lameter Cc: Pekka Enberg Signed-off-by: Andrew Morton --- mm/slub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/slub.c~mm-slub-consider-rest-of-partial-list-if-acquire_slab-fails +++ a/mm/slub.c @@ -1973,7 +1973,7 @@ static void *get_partial_node(struct kme t = acquire_slab(s, n, page, object == NULL, &objects); if (!t) - break; + continue; /* cmpxchg raced */ available += objects; if (!object) { From patchwork Tue Jan 12 23:49:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12015483 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BBD1C433DB for ; Tue, 12 Jan 2021 23:49:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E93A523133 for ; Tue, 12 Jan 2021 23:49:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E93A523133 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 844A76B0115; Tue, 12 Jan 2021 18:49:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 81B046B0116; Tue, 12 Jan 2021 18:49:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 758256B0117; Tue, 12 Jan 2021 18:49:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0136.hostedemail.com [216.40.44.136]) by kanga.kvack.org (Postfix) with ESMTP id 5FC826B0115 for ; Tue, 12 Jan 2021 18:49:10 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 2C3CD180AD81A for ; Tue, 12 Jan 2021 23:49:10 +0000 (UTC) X-FDA: 77698766460.20.eye86_0507a8227519 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id 0D25A180C07A3 for ; Tue, 12 Jan 2021 23:49:10 +0000 (UTC) X-HE-Tag: eye86_0507a8227519 X-Filterd-Recvd-Size: 3296 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf39.hostedemail.com (Postfix) with ESMTP for ; Tue, 12 Jan 2021 23:49:09 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 846E023134; Tue, 12 Jan 2021 23:49:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1610495348; bh=n5WjodynWm14K6aANtxyrT5Xhdz9Tymq3FMLaYEToFI=; h=Date:From:To:Subject:In-Reply-To:From; b=HHGjlmIa0fgWwPeE8rdQnA7yo+DlYHLMrxcvHvLru4e6E53KjE0YHSuq/JzBzzqSN Dn/QoJn43xHBrxpkbTUhiNOEOJNhe0/s780NfEYvTJpVdJCR4/5dNLVi/q3GF6VZ7g j170mcCFGk/g/t3FNjeySPUKtV2YQEI51kU7xzMU= Date: Tue, 12 Jan 2021 15:49:08 -0800 From: Andrew Morton To: akpm@linux-foundation.org, linux-mm@kvack.org, liu.hailong6@zte.com.cn, mm-commits@vger.kernel.org, torvalds@linux-foundation.org Subject: [patch 02/10] mm/page_alloc: add a missing mm_page_alloc_zone_locked() tracepoint Message-ID: <20210112234908.xc2cFVP-8%akpm@linux-foundation.org> In-Reply-To: <20210112154839.abeb6e57de79480059fd9b0e@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Hailong liu Subject: mm/page_alloc: add a missing mm_page_alloc_zone_locked() tracepoint The trace point *trace_mm_page_alloc_zone_locked()* in __rmqueue() does not currently cover all branches. Add the missing tracepoint and check the page before do that. [akpm@linux-foundation.org: use IS_ENABLED() to suppress warning] Link: https://lkml.kernel.org/r/20201228132901.41523-1-carver4lio@163.com Signed-off-by: Hailong liu Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton --- mm/page_alloc.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) --- a/mm/page_alloc.c~mm-page_alloc-add-a-missing-mm_page_alloc_zone_locked-tracepoint +++ a/mm/page_alloc.c @@ -2862,20 +2862,20 @@ __rmqueue(struct zone *zone, unsigned in { struct page *page; -#ifdef CONFIG_CMA - /* - * Balance movable allocations between regular and CMA areas by - * allocating from CMA when over half of the zone's free memory - * is in the CMA area. - */ - if (alloc_flags & ALLOC_CMA && - zone_page_state(zone, NR_FREE_CMA_PAGES) > - zone_page_state(zone, NR_FREE_PAGES) / 2) { - page = __rmqueue_cma_fallback(zone, order); - if (page) - return page; + if (IS_ENABLED(CONFIG_CMA)) { + /* + * Balance movable allocations between regular and CMA areas by + * allocating from CMA when over half of the zone's free memory + * is in the CMA area. + */ + if (alloc_flags & ALLOC_CMA && + zone_page_state(zone, NR_FREE_CMA_PAGES) > + zone_page_state(zone, NR_FREE_PAGES) / 2) { + page = __rmqueue_cma_fallback(zone, order); + if (page) + goto out; + } } -#endif retry: page = __rmqueue_smallest(zone, order, migratetype); if (unlikely(!page)) { @@ -2886,8 +2886,9 @@ retry: alloc_flags)) goto retry; } - - trace_mm_page_alloc_zone_locked(page, order, migratetype); +out: + if (page) + trace_mm_page_alloc_zone_locked(page, order, migratetype); return page; } From patchwork Tue Jan 12 23:49:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12015485 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 001A4C433E0 for ; Tue, 12 Jan 2021 23:49:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8EA0123135 for ; Tue, 12 Jan 2021 23:49:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8EA0123135 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1671B6B0118; Tue, 12 Jan 2021 18:49:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 13DE16B0119; Tue, 12 Jan 2021 18:49:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 053A16B011A; Tue, 12 Jan 2021 18:49:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0223.hostedemail.com [216.40.44.223]) by kanga.kvack.org (Postfix) with ESMTP id E4E8C6B0118 for ; Tue, 12 Jan 2021 18:49:13 -0500 (EST) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id B28BD362D for ; Tue, 12 Jan 2021 23:49:13 +0000 (UTC) X-FDA: 77698766586.26.fish98_5c17a3f27519 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id 921911804B656 for ; Tue, 12 Jan 2021 23:49:13 +0000 (UTC) X-HE-Tag: fish98_5c17a3f27519 X-Filterd-Recvd-Size: 3222 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf24.hostedemail.com (Postfix) with ESMTP for ; Tue, 12 Jan 2021 23:49:13 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 9FE9423133; Tue, 12 Jan 2021 23:49:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1610495352; bh=8koHiLzr5itWHBQjzON8eFAiTv4vMLkrNnLaFsHT9XY=; h=Date:From:To:Subject:In-Reply-To:From; b=lvXeWdYGaZjPsNQua6b0I/SrPqjOlXOMOSbc4SSJ5y3fgoy912qIodtDGyb0YU1bi zeBUIy/iJxOm0/sQl8fQt/8zI+wXmqrXhZ4k+6awc8FaEm2eT1u0esMXL19rvNxbT6 SQ8iwPzepdSWuLj/FBlwrJbZtdbHsqfTUORb/t4Q= Date: Tue, 12 Jan 2021 15:49:11 -0800 From: Andrew Morton To: akpm@linux-foundation.org, alex.shi@linux.alibaba.com, bhe@redhat.com, chris@chrisdown.name, guro@fb.com, hannes@cmpxchg.org, hughd@google.com, linux-mm@kvack.org, lstoakes@gmail.com, mhocko@suse.com, mm-commits@vger.kernel.org, sh_def@163.com, shakeelb@google.com, torvalds@linux-foundation.org, vbabka@suse.cz Subject: [patch 03/10] mm/memcontrol: fix warning in mem_cgroup_page_lruvec() Message-ID: <20210112234911.PDWRysjU0%akpm@linux-foundation.org> In-Reply-To: <20210112154839.abeb6e57de79480059fd9b0e@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Hugh Dickins Subject: mm/memcontrol: fix warning in mem_cgroup_page_lruvec() Boot a CONFIG_MEMCG=y kernel with "cgroup_disabled=memory" and you are met by a series of warnings from the VM_WARN_ON_ONCE_PAGE(!memcg, page) recently added to the inline mem_cgroup_page_lruvec(). An earlier attempt to place that warning, in mem_cgroup_lruvec(), had been careful to do so after weeding out the mem_cgroup_disabled() case; but was itself invalid because of the mem_cgroup_lruvec(NULL, pgdat) in clear_pgdat_congested() and age_active_anon(). Warning in mem_cgroup_page_lruvec() was once useful in detecting a KSM charge bug, so may be worth keeping: but skip if mem_cgroup_disabled(). Link: https://lkml.kernel.org/r/alpine.LSU.2.11.2101032056260.1093@eggly.anvils Fixes: 9a1ac2288cf1 ("mm/memcontrol:rewrite mem_cgroup_page_lruvec()") Signed-off-by: Hugh Dickins Reviewed-by: Alex Shi Acked-by: Roman Gushchin Acked-by: Chris Down Reviewed-by: Baoquan He Acked-by: Vlastimil Babka Cc: Hui Su Cc: Lorenzo Stoakes Cc: Michal Hocko Cc: Johannes Weiner Cc: Shakeel Butt Signed-off-by: Andrew Morton --- include/linux/memcontrol.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/linux/memcontrol.h~mm-memcontrol-fix-warning-in-mem_cgroup_page_lruvec +++ a/include/linux/memcontrol.h @@ -665,7 +665,7 @@ static inline struct lruvec *mem_cgroup_ { struct mem_cgroup *memcg = page_memcg(page); - VM_WARN_ON_ONCE_PAGE(!memcg, page); + VM_WARN_ON_ONCE_PAGE(!memcg && !mem_cgroup_disabled(), page); return mem_cgroup_lruvec(memcg, pgdat); } From patchwork Tue Jan 12 23:49:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12015487 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 438D9C433DB for ; Tue, 12 Jan 2021 23:49:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DE03223132 for ; Tue, 12 Jan 2021 23:49:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DE03223132 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7A87D6B011A; Tue, 12 Jan 2021 18:49:17 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 756DD6B011B; Tue, 12 Jan 2021 18:49:17 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 671236B011C; Tue, 12 Jan 2021 18:49:17 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0154.hostedemail.com [216.40.44.154]) by kanga.kvack.org (Postfix) with ESMTP id 4E88F6B011A for ; Tue, 12 Jan 2021 18:49:17 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 159D21EE6 for ; Tue, 12 Jan 2021 23:49:17 +0000 (UTC) X-FDA: 77698766754.20.curve25_100993127519 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id EE390180C07A3 for ; Tue, 12 Jan 2021 23:49:16 +0000 (UTC) X-HE-Tag: curve25_100993127519 X-Filterd-Recvd-Size: 3981 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf39.hostedemail.com (Postfix) with ESMTP for ; Tue, 12 Jan 2021 23:49:16 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 2175223135; Tue, 12 Jan 2021 23:49:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1610495355; bh=NSG9iDmXs2vC1wTygyubD7mqFbb432cVnyBE6JWzfhc=; h=Date:From:To:Subject:In-Reply-To:From; b=Xo5NvK1Bf1m9mVo1KVKYEsBzLJ0sPAOUrRgP9/3ngQlGKf7eQ2kkzpldyHye61KiO 31jA5Tj3J8Urw89dB3InYwND0+rbf/jQNBrIoOxkvXig+aQQrh0u/663FZKNFygHfz VeeEHEV4Fp2IUZOL+mItT+HBqmR8304JkgoIaDqU= Date: Tue, 12 Jan 2021 15:49:14 -0800 From: Andrew Morton To: akpm@linux-foundation.org, ardb@kernel.org, aryabinin@virtuozzo.com, dvyukov@google.com, glider@google.com, guo.ziliang@zte.com.cn, linus.walleij@linaro.org, linux-mm@kvack.org, linux@armlinux.org.uk, liu.hailong6@zte.com.cn, mm-commits@vger.kernel.org, torvalds@linux-foundation.org Subject: [patch 04/10] arm/kasan: fix the array size of kasan_early_shadow_pte[] Message-ID: <20210112234914.NwudbAxXv%akpm@linux-foundation.org> In-Reply-To: <20210112154839.abeb6e57de79480059fd9b0e@linux-foundation.org> User-Agent: s-nail v14.8.16 MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Hailong Liu Subject: arm/kasan: fix the array size of kasan_early_shadow_pte[] The size of kasan_early_shadow_pte[] now is PTRS_PER_PTE which defined to 512 for arm architecture. This means that it only covers the prev Linux pte entries, but not the HWTABLE pte entries for arm. The reason it works well current is that the symbol kasan_early_shadow_page immediately following kasan_early_shadow_pte in memory is page aligned, which makes kasan_early_shadow_pte look like a 4KB size array. But we can't ensure the order always right with different compiler/linker, nor more bss symbols be introduced. We had a test with QEMU + vexpress:put a 512KB-size symbol with attribute __section(".bss..page_aligned") after kasan_early_shadow_pte, and poison it after kasan_early_init(). Then enabled CONFIG_KASAN, it failed to boot up. Link: https://lkml.kernel.org/r/20210109044622.8312-1-hailongliiu@yeah.net Signed-off-by: Hailong Liu Signed-off-by: Ziliang Guo Reviewed-by: Linus Walleij Cc: Andrey Ryabinin Cc: Russell King Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Ard Biesheuvel Signed-off-by: Andrew Morton --- include/linux/kasan.h | 6 +++++- mm/kasan/init.c | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) --- a/include/linux/kasan.h~arm-kasan-fix-the-arry-size-of-kasan_early_shadow_pte +++ a/include/linux/kasan.h @@ -35,8 +35,12 @@ struct kunit_kasan_expectation { #define KASAN_SHADOW_INIT 0 #endif +#ifndef PTE_HWTABLE_PTRS +#define PTE_HWTABLE_PTRS 0 +#endif + extern unsigned char kasan_early_shadow_page[PAGE_SIZE]; -extern pte_t kasan_early_shadow_pte[PTRS_PER_PTE]; +extern pte_t kasan_early_shadow_pte[PTRS_PER_PTE + PTE_HWTABLE_PTRS]; extern pmd_t kasan_early_shadow_pmd[PTRS_PER_PMD]; extern pud_t kasan_early_shadow_pud[PTRS_PER_PUD]; extern p4d_t kasan_early_shadow_p4d[MAX_PTRS_PER_P4D]; --- a/mm/kasan/init.c~arm-kasan-fix-the-arry-size-of-kasan_early_shadow_pte +++ a/mm/kasan/init.c @@ -64,7 +64,8 @@ static inline bool kasan_pmd_table(pud_t return false; } #endif -pte_t kasan_early_shadow_pte[PTRS_PER_PTE] __page_aligned_bss; +pte_t kasan_early_shadow_pte[PTRS_PER_PTE + PTE_HWTABLE_PTRS] + __page_aligned_bss; static inline bool kasan_pte_table(pmd_t pmd) { From patchwork Tue Jan 12 23:49:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12015489 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D8B6C433E0 for ; Tue, 12 Jan 2021 23:49:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1EB8323132 for ; Tue, 12 Jan 2021 23:49:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1EB8323132 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A19AC6B011C; Tue, 12 Jan 2021 18:49:20 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9C83E6B011D; Tue, 12 Jan 2021 18:49:20 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8DD3C6B011E; Tue, 12 Jan 2021 18:49:20 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0009.hostedemail.com [216.40.44.9]) by kanga.kvack.org (Postfix) with ESMTP id 6EF7F6B011C for ; Tue, 12 Jan 2021 18:49:20 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 405DF362D for ; Tue, 12 Jan 2021 23:49:20 +0000 (UTC) X-FDA: 77698766880.14.veil95_491567127519 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id 1F47218229818 for ; Tue, 12 Jan 2021 23:49:20 +0000 (UTC) X-HE-Tag: veil95_491567127519 X-Filterd-Recvd-Size: 2309 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf14.hostedemail.com (Postfix) with ESMTP for ; Tue, 12 Jan 2021 23:49:19 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 7EE3D23136; Tue, 12 Jan 2021 23:49:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1610495358; bh=Fyfc3St6XcETCyfxluudtDudj6bhhgxSuzF95j2USdc=; h=Date:From:To:Subject:In-Reply-To:From; b=aokZhffsiHHbXlNGDfx4+YHl54EUfd5rsVedet7FuCJ5HSJ8fpcLzkDxa2ohR+iaE TWkG7gEcBaoFNOtJeSGNKgK2s4qlmXhT8kViDNC4RIyRPM9aEJ3wV3dyHF/lpeJIO4 Y68S7c+ZiI+shG+PeQWjwH4QZVSphrbGtlhS662E= Date: Tue, 12 Jan 2021 15:49:18 -0800 From: Andrew Morton To: akpm@linux-foundation.org, linmiaohe@huawei.com, linux-mm@kvack.org, luoshijie1@huawei.com, mm-commits@vger.kernel.org, stable@vger.kernel.org, torvalds@linux-foundation.org, urezki@gmail.com Subject: [patch 05/10] mm/vmalloc.c: fix potential memory leak Message-ID: <20210112234918.AY5LtPz7k%akpm@linux-foundation.org> In-Reply-To: <20210112154839.abeb6e57de79480059fd9b0e@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Miaohe Lin Subject: mm/vmalloc.c: fix potential memory leak In VM_MAP_PUT_PAGES case, we should put pages and free array in vfree. But we missed to set area->nr_pages in vmap(). So we would failed to put pages in __vunmap() because area->nr_pages = 0. Link: https://lkml.kernel.org/r/20210107123541.39206-1-linmiaohe@huawei.com Fixes: b944afc9d64d ("mm: add a VM_MAP_PUT_PAGES flag for vmap") Signed-off-by: Shijie Luo Signed-off-by: Miaohe Lin Reviewed-by: Uladzislau Rezki (Sony) Cc: Signed-off-by: Andrew Morton --- mm/vmalloc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/mm/vmalloc.c~mm-vmallocc-fix-potential-memory-leak +++ a/mm/vmalloc.c @@ -2420,8 +2420,10 @@ void *vmap(struct page **pages, unsigned return NULL; } - if (flags & VM_MAP_PUT_PAGES) + if (flags & VM_MAP_PUT_PAGES) { area->pages = pages; + area->nr_pages = count; + } return area->addr; } EXPORT_SYMBOL(vmap); From patchwork Tue Jan 12 23:49:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12015491 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A82A5C433E0 for ; Tue, 12 Jan 2021 23:49:24 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5FC0F23131 for ; Tue, 12 Jan 2021 23:49:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5FC0F23131 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 07A7D6B011E; Tue, 12 Jan 2021 18:49:24 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 052706B011F; Tue, 12 Jan 2021 18:49:23 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EAA6E6B0120; Tue, 12 Jan 2021 18:49:23 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0105.hostedemail.com [216.40.44.105]) by kanga.kvack.org (Postfix) with ESMTP id D03DF6B011E for ; Tue, 12 Jan 2021 18:49:23 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 955AE8245571 for ; Tue, 12 Jan 2021 23:49:23 +0000 (UTC) X-FDA: 77698767006.20.fact01_280cb8b27519 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id 73F84180C07A3 for ; Tue, 12 Jan 2021 23:49:23 +0000 (UTC) X-HE-Tag: fact01_280cb8b27519 X-Filterd-Recvd-Size: 2666 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf19.hostedemail.com (Postfix) with ESMTP for ; Tue, 12 Jan 2021 23:49:22 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 9EF8023138; Tue, 12 Jan 2021 23:49:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1610495362; bh=RDcIaqC9EWRiTftuo/Tl8jcOF/9zYknnO+03Bno0x6k=; h=Date:From:To:Subject:In-Reply-To:From; b=1uxqsSYK14GsNc3bX09iPRCjufcccpG+YCV/kEQZNVQtqumA6rvz45/il3XQMk9S+ tbQSBJhIedltUXaElDzQQFsZhAXd8BUpidvdzS6TbqkH/9BquhNaOVHMzJP1btxbML siW2IqHgjKrMxnoHgwWg3jGgskgRbVG+I9sIy+ns= Date: Tue, 12 Jan 2021 15:49:21 -0800 From: Andrew Morton To: akpm@linux-foundation.org, jack@suse.cz, jstancek@redhat.com, linux-mm@kvack.org, mgorman@suse.de, mhocko@suse.com, mm-commits@vger.kernel.org, shy828301@gmail.com, songliubraving@fb.com, torvalds@linux-foundation.org, willy@infradead.org, ziy@nvidia.com Subject: [patch 06/10] mm: migrate: initialize err in do_migrate_pages Message-ID: <20210112234921.ydOmosyOp%akpm@linux-foundation.org> In-Reply-To: <20210112154839.abeb6e57de79480059fd9b0e@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Jan Stancek Subject: mm: migrate: initialize err in do_migrate_pages After commit 236c32eb1096 ("mm: migrate: clean up migrate_prep{_local}")', do_migrate_pages can return uninitialized variable 'err' (which is propagated to user-space as error) when 'from' and 'to' nodesets are identical. This can be reproduced with LTP migrate_pages01, which calls migrate_pages() with same set for both old/new_nodes. Add 'err' initialization back. Link: https://lkml.kernel.org/r/456a021c7ef3636d7668cec9dcb4a446a4244812.1609855564.git.jstancek@redhat.com Fixes: 236c32eb1096 ("mm: migrate: clean up migrate_prep{_local}") Signed-off-by: Jan Stancek Acked-by: Michal Hocko Acked-by: Yang Shi Cc: Zi Yan Cc: Jan Kara Cc: Matthew Wilcox Cc: Mel Gorman Cc: Song Liu Signed-off-by: Andrew Morton --- mm/mempolicy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/mempolicy.c~mm-migrate-initialize-err-in-do_migrate_pages +++ a/mm/mempolicy.c @@ -1111,7 +1111,7 @@ int do_migrate_pages(struct mm_struct *m const nodemask_t *to, int flags) { int busy = 0; - int err; + int err = 0; nodemask_t tmp; migrate_prep(); From patchwork Tue Jan 12 23:49:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12015493 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A9DEC433DB for ; Tue, 12 Jan 2021 23:49:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3BDDC23131 for ; Tue, 12 Jan 2021 23:49:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3BDDC23131 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CD8736B0120; Tue, 12 Jan 2021 18:49:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C87BB6B0121; Tue, 12 Jan 2021 18:49:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B75216B0122; Tue, 12 Jan 2021 18:49:26 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0152.hostedemail.com [216.40.44.152]) by kanga.kvack.org (Postfix) with ESMTP id 9C4E86B0120 for ; Tue, 12 Jan 2021 18:49:26 -0500 (EST) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 6C728181AEF30 for ; Tue, 12 Jan 2021 23:49:26 +0000 (UTC) X-FDA: 77698767132.23.care23_550457727519 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin23.hostedemail.com (Postfix) with ESMTP id 4AC2C37604 for ; Tue, 12 Jan 2021 23:49:26 +0000 (UTC) X-HE-Tag: care23_550457727519 X-Filterd-Recvd-Size: 2261 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf44.hostedemail.com (Postfix) with ESMTP for ; Tue, 12 Jan 2021 23:49:25 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id CD03123139; Tue, 12 Jan 2021 23:49:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1610495365; bh=b+3gkIN/yT6h9cR5rTkrcLipzEFh8B9c3SsIlge72q0=; h=Date:From:To:Subject:In-Reply-To:From; b=wRQnWKIh+9FT9rqI5HZ8+bqtylRzHs8Hpedgany/k0hfSFyjJ8fX2JITJ68syr6RS O7EJPP3CN1sz2FOpWbJGQjqLaRDFUl1CTVe7hixiOO+1IkEv/WoARNF4mwexXMArOA qxyqH+zIVSVhGtNQequli/oT46ZjQon2aBmGoK5U= Date: Tue, 12 Jan 2021 15:49:24 -0800 From: Andrew Morton To: akpm@linux-foundation.org, linmiaohe@huawei.com, linux-mm@kvack.org, mike.kravetz@oracle.com, mm-commits@vger.kernel.org, stable@vger.kernel.org, torvalds@linux-foundation.org Subject: [patch 07/10] mm/hugetlb: fix potential missing huge page size info Message-ID: <20210112234924.NrJbRP05o%akpm@linux-foundation.org> In-Reply-To: <20210112154839.abeb6e57de79480059fd9b0e@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Miaohe Lin Subject: mm/hugetlb: fix potential missing huge page size info The huge page size is encoded for VM_FAULT_HWPOISON errors only. So if we return VM_FAULT_HWPOISON, huge page size would just be ignored. Link: https://lkml.kernel.org/r/20210107123449.38481-1-linmiaohe@huawei.com Fixes: aa50d3a7aa81 ("Encode huge page size for VM_FAULT_HWPOISON errors") Signed-off-by: Miaohe Lin Reviewed-by: Mike Kravetz Cc: Signed-off-by: Andrew Morton --- mm/hugetlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/hugetlb.c~mm-hugetlb-fix-potential-missing-huge-page-size-info +++ a/mm/hugetlb.c @@ -4371,7 +4371,7 @@ retry: * So we need to block hugepage fault by PG_hwpoison bit check. */ if (unlikely(PageHWPoison(page))) { - ret = VM_FAULT_HWPOISON | + ret = VM_FAULT_HWPOISON_LARGE | VM_FAULT_SET_HINDEX(hstate_index(h)); goto backout_unlocked; } From patchwork Tue Jan 12 23:49:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12015495 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD722C433E0 for ; Tue, 12 Jan 2021 23:49:30 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 66E7323131 for ; Tue, 12 Jan 2021 23:49:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 66E7323131 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id F21AA6B0122; Tue, 12 Jan 2021 18:49:29 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id ED2036B0123; Tue, 12 Jan 2021 18:49:29 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DE6A66B0124; Tue, 12 Jan 2021 18:49:29 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0112.hostedemail.com [216.40.44.112]) by kanga.kvack.org (Postfix) with ESMTP id C651B6B0122 for ; Tue, 12 Jan 2021 18:49:29 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 97E70180AD81A for ; Tue, 12 Jan 2021 23:49:29 +0000 (UTC) X-FDA: 77698767258.03.tail89_0e1624727519 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id 7CB5228A4E9 for ; Tue, 12 Jan 2021 23:49:29 +0000 (UTC) X-HE-Tag: tail89_0e1624727519 X-Filterd-Recvd-Size: 2489 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf30.hostedemail.com (Postfix) with ESMTP for ; Tue, 12 Jan 2021 23:49:28 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id DE70D23132; Tue, 12 Jan 2021 23:49:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1610495368; bh=u6wwpMUYCNQ5KCpzwNq+++EmdOrZkPCTm/p56rtCb+4=; h=Date:From:To:Subject:In-Reply-To:From; b=dOCNoUzQToYWm1VqyV89M0Q4jM5RaulF9ArMQopEuYis+og7G50uCGPwUxzHX3oyV vOvtIoJbZyHvKFKatbBqOVuC2w7i3yZca2e1nXEZZsuazULMMBbWO8LMPm9lYlKVKy AGfyQoEjF+72CFyCk6FBX+9CO8SJlASOalETJX34= Date: Tue, 12 Jan 2021 15:49:27 -0800 From: Andrew Morton To: akpm@linux-foundation.org, cl@linux.com, iamjoonsoo.kim@lge.com, linux-mm@kvack.org, mm-commits@vger.kernel.org, penberg@kernel.org, rientjes@google.com, torvalds@linux-foundation.org, vbabka@suse.cz Subject: [patch 08/10] MAINTAINERS: add Vlastimil as slab allocators maintainer Message-ID: <20210112234927.qjKNk9pDa%akpm@linux-foundation.org> In-Reply-To: <20210112154839.abeb6e57de79480059fd9b0e@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Vlastimil Babka Subject: MAINTAINERS: add Vlastimil as slab allocators maintainer I would like to help with slab allocators maintenance, from the perspective of being responsible for SLAB and more recently also SLUB in an enterprise distro kernel and supporting its users. Recently I've been focusing on improving SLUB's debugging features, and patch review in the area, including the kmemcg accounting rewrite last year. Link: https://lkml.kernel.org/r/20210108110353.19971-1-vbabka@suse.cz Signed-off-by: Vlastimil Babka Acked-by: Christoph Lameter Acked-by: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) --- a/MAINTAINERS~maintainers-add-myself-as-slab-allocators-maintainer +++ a/MAINTAINERS @@ -16319,6 +16319,7 @@ M: Pekka Enberg M: David Rientjes M: Joonsoo Kim M: Andrew Morton +M: Vlastimil Babka L: linux-mm@kvack.org S: Maintained F: include/linux/sl?b*.h From patchwork Tue Jan 12 23:49:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12015497 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 007FCC433DB for ; Tue, 12 Jan 2021 23:49:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A01552078B for ; Tue, 12 Jan 2021 23:49:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A01552078B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 33C566B0124; Tue, 12 Jan 2021 18:49:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2C27B6B0125; Tue, 12 Jan 2021 18:49:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1FFFB6B0126; Tue, 12 Jan 2021 18:49:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0195.hostedemail.com [216.40.44.195]) by kanga.kvack.org (Postfix) with ESMTP id 070E76B0124 for ; Tue, 12 Jan 2021 18:49:33 -0500 (EST) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id CC6451EE6 for ; Tue, 12 Jan 2021 23:49:32 +0000 (UTC) X-FDA: 77698767384.18.word60_5d0abe727519 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin18.hostedemail.com (Postfix) with ESMTP id ACF29100EC660 for ; Tue, 12 Jan 2021 23:49:32 +0000 (UTC) X-HE-Tag: word60_5d0abe727519 X-Filterd-Recvd-Size: 2227 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf37.hostedemail.com (Postfix) with ESMTP for ; Tue, 12 Jan 2021 23:49:32 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 0E61D2313B; Tue, 12 Jan 2021 23:49:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1610495371; bh=cQ8I36j8H9JUNH2R/BgaKtz/5iOLvdA2oPFMmOIDp7E=; h=Date:From:To:Subject:In-Reply-To:From; b=yNeel/ruxmV2U4aSEdbG0h/4v1MZdRVGXXTA+zo0xiTo89mhVAceINDQ5vYe2vyUy l0P1pFQl1TMBNoapzgyEh7ukGefAUD4xtQPxjYn8t8lqyY5udSxGFDjlNuLavUi1AX EyptjsWz2UtSnzTCrr+E0wLFoRpW5QKI0xjS72pU= Date: Tue, 12 Jan 2021 15:49:30 -0800 From: Andrew Morton To: akpm@linux-foundation.org, anshuman.khandual@arm.com, dan.carpenter@oracle.com, linux-mm@kvack.org, mm-commits@vger.kernel.org, naoya.horiguchi@nec.com, osalvador@suse.de, torvalds@linux-foundation.org Subject: [patch 09/10] mm,hwpoison: fix printing of page flags Message-ID: <20210112234930.wzhtCPbgI%akpm@linux-foundation.org> In-Reply-To: <20210112154839.abeb6e57de79480059fd9b0e@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Oscar Salvador Subject: mm,hwpoison: fix printing of page flags Format %pG expects a lower case 'p' in order to print the flags. Fix it. Link: https://lkml.kernel.org/r/20210108085202.4506-1-osalvador@suse.de Fixes: 8295d535e2aa ("mm,hwpoison: refactor get_any_page") Signed-off-by: Oscar Salvador Reported-by: Dan Carpenter Reviewed-by: Anshuman Khandual Acked-by: Naoya Horiguchi Signed-off-by: Andrew Morton --- mm/memory-failure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/memory-failure.c~mmhwpoison-fix-printing-of-page-flags +++ a/mm/memory-failure.c @@ -1940,7 +1940,7 @@ retry: goto retry; } } else if (ret == -EIO) { - pr_info("%s: %#lx: unknown page type: %lx (%pGP)\n", + pr_info("%s: %#lx: unknown page type: %lx (%pGp)\n", __func__, pfn, page->flags, &page->flags); } From patchwork Tue Jan 12 23:49:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12015499 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F3B0C433DB for ; Tue, 12 Jan 2021 23:49:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AC8C12078B for ; Tue, 12 Jan 2021 23:49:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AC8C12078B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3AEAD6B0128; Tue, 12 Jan 2021 18:49:37 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 35E726B0129; Tue, 12 Jan 2021 18:49:37 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2261F6B012A; Tue, 12 Jan 2021 18:49:37 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0196.hostedemail.com [216.40.44.196]) by kanga.kvack.org (Postfix) with ESMTP id 0D79F6B0128 for ; Tue, 12 Jan 2021 18:49:37 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id BEC32824556B for ; Tue, 12 Jan 2021 23:49:36 +0000 (UTC) X-FDA: 77698767552.24.stove80_2a0ddd927519 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id A13551A4A5 for ; Tue, 12 Jan 2021 23:49:36 +0000 (UTC) X-HE-Tag: stove80_2a0ddd927519 X-Filterd-Recvd-Size: 2226 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf35.hostedemail.com (Postfix) with ESMTP for ; Tue, 12 Jan 2021 23:49:36 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 61F5723131; Tue, 12 Jan 2021 23:49:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1610495375; bh=IQLpdJSqJTkSxzfWi+dXB1+DERUDSuH3taG7+PK6n3E=; h=Date:From:To:Subject:In-Reply-To:From; b=eWuiIHli0EO70cgQHU1ERd+t/UkAS++HuBaJm1rtrnypQivTdE9I0J5a1+MbcesRz 9oNblxlMmP5caGO7wl0DNYG9A7m/h/ENbo0L1v9XNww/9/FNb3JPrdjq7XOHMbtHsK c5ivg+SrbGPeT5LD+7bRIRMMqv8XRW1r/vr1Xuok= Date: Tue, 12 Jan 2021 15:49:33 -0800 From: Andrew Morton To: akpm@linux-foundation.org, axboe@kernel.dk, hch@lst.de, linux-mm@kvack.org, me@kylehuey.com, mm-commits@vger.kernel.org, stable@vger.kernel.org, torvalds@linux-foundation.org, viro@zeniv.linux.org.uk Subject: [patch 10/10] mm/process_vm_access.c: include compat.h Message-ID: <20210112234933.KYQegrK93%akpm@linux-foundation.org> In-Reply-To: <20210112154839.abeb6e57de79480059fd9b0e@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Andrew Morton Subject: mm/process_vm_access.c: include compat.h mm/process_vm_access.c:277:5: error: implicit declaration of function 'in_compat_syscall'; did you mean 'in_ia32_syscall'? [-Werror=implicit-function-declaration] Fixes: 38dc5079da7081e "Fix compat regression in process_vm_rw()" Reported-by: syzbot+5b0d0de84d6c65b8dd2b@syzkaller.appspotmail.com Cc: Kyle Huey Cc: Jens Axboe Cc: Al Viro Cc: Christoph Hellwig Cc: Signed-off-by: Andrew Morton --- mm/process_vm_access.c | 1 + 1 file changed, 1 insertion(+) --- a/mm/process_vm_access.c~mm-process_vm_accessc-include-compath +++ a/mm/process_vm_access.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include