From mboxrd@z Thu Jan 1 00:00:00 1970 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=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 569D2C07E99 for ; Mon, 5 Jul 2021 11:37:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D3DF2613C8 for ; Mon, 5 Jul 2021 11:37:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D3DF2613C8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=techsingularity.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8D3026B006C; Mon, 5 Jul 2021 07:37:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 883346B0070; Mon, 5 Jul 2021 07:37:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 74AEA6B0071; Mon, 5 Jul 2021 07:37:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0248.hostedemail.com [216.40.44.248]) by kanga.kvack.org (Postfix) with ESMTP id 5209F6B006C for ; Mon, 5 Jul 2021 07:37:32 -0400 (EDT) Received: from smtpin39.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id CCDF522010 for ; Mon, 5 Jul 2021 11:37:31 +0000 (UTC) X-FDA: 78328333902.39.DBE5D8E Received: from outbound-smtp07.blacknight.com (outbound-smtp07.blacknight.com [46.22.139.12]) by imf10.hostedemail.com (Postfix) with ESMTP id 062576001A96 for ; Mon, 5 Jul 2021 11:37:30 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail05.blacknight.ie [81.17.254.26]) by outbound-smtp07.blacknight.com (Postfix) with ESMTPS id B9E371C3914 for ; Mon, 5 Jul 2021 12:37:24 +0100 (IST) Received: (qmail 21946 invoked from network); 5 Jul 2021 11:37:24 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.17.255]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 5 Jul 2021 11:37:24 -0000 Date: Mon, 5 Jul 2021 12:37:23 +0100 From: Mel Gorman To: Marco Elver Cc: akpm@linux-foundation.org, glider@google.com, dvyukov@google.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, kasan-dev@googlegroups.com, Andrii Nakryiko , Daniel Borkmann , Vlastimil Babka , Yang Shi , bpf@vger.kernel.org, Alexei Starovoitov Subject: Re: [PATCH] Revert "mm/page_alloc: make should_fail_alloc_page() static" Message-ID: <20210705113723.GN3840@techsingularity.net> References: <20210705103806.2339467-1-elver@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20210705103806.2339467-1-elver@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Authentication-Results: imf10.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf10.hostedemail.com: domain of mgorman@techsingularity.net designates 46.22.139.12 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net X-Stat-Signature: ikwrnxdwcxixp3oy71zemg7soo7bt9tn X-Rspamd-Queue-Id: 062576001A96 X-Rspamd-Server: rspam06 X-HE-Tag: 1625485050-608076 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: On Mon, Jul 05, 2021 at 12:38:06PM +0200, Marco Elver wrote: > This reverts commit f7173090033c70886d925995e9dfdfb76dbb2441. > > Commit 76cd61739fd1 ("mm/error_inject: Fix allow_error_inject function > signatures") explicitly made should_fail_alloc_page() non-static, due to > worries of remaining compiler optimizations in the absence of function > side-effects while being noinline. > > Furthermore, kernel/bpf/verifier.c pushes should_fail_alloc_page onto > the btf_non_sleepable_error_inject BTF IDs set, which when enabling > CONFIG_DEBUG_INFO_BTF results in an error at the BTFIDS stage: > > FAILED unresolved symbol should_fail_alloc_page > > To avoid the W=1 warning, add a function declaration right above the > function itself, with a comment it is required in a BTF IDs set. > > Fixes: f7173090033c ("mm/page_alloc: make should_fail_alloc_page() static") > Cc: Mel Gorman > Cc: Alexei Starovoitov > Signed-off-by: Marco Elver Acked-by: Mel Gorman Out of curiousity though, why does block/blk-core.c not require something similar for should_fail_bio? -- Mel Gorman SUSE Labs