Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3737994pxv; Mon, 5 Jul 2021 04:38:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKPijrHqn5Nlfe9VfyNJ6Z/fYv6EM5iPsf3Fl+s7jg77uxIe4ufNMK9PlDj2UnP2l0wxUR X-Received: by 2002:a05:6402:503:: with SMTP id m3mr16106059edv.330.1625485138470; Mon, 05 Jul 2021 04:38:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625485138; cv=none; d=google.com; s=arc-20160816; b=AIBHLh7ltxUz2z2vmVmGZuHIbXzx3DmrGgnfLo7uO5mvBBsOy/bdzkOQXdy1bafgkN 6k4sSNV7Fyl555RO+Z5SVBjrz8D0LUsvuu/uL/e4j96rAk+mCN4oK8wAcG5gFPVGj6Cj 30cuJXQ7obd6m0r3d56wwMzsU0zHfYcRiXV8htEAXG1cYujx1cMsC7R9HeN5inGFv+71 gORdbeY4tj9WW6zBwgqTKWPMi+cRpUSF2cOHyGp+oIYHT7mmssL1EC9Ni+oGQVWy8Ool +M5h8y59MBIuhNFN7TOg/odmNbJpMRY5aEHZmibHSTk5qujjdwa3DEL7i+rHOiFroRBH MFAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=MduB2IqsWpwzkEPtGASoULjfQJnI8w+hQTuYS2S8GnM=; b=pKbT0aI/wu1iv7J7GJb0Rs5ah76Vl2OcpMqczakvNBPX3xg5CG4c+BYx1G9nr950xu sRVTSBIGbbz+b9fypC8EDYBTB+I1U+wmgIgFgHr1FAo9jrnfqu668f3R11slBnAhsajE VN74LPbx4nxYBMXIUBX8xagPgamcvOYeCkimWE6aFhLQPnE9S5BN7jQUlcgzDB+paVnb f6nK8EHjYrCLD3YTGtHjmUfh/ER7v28t2W0Q7x97QeaggKgOLgsL6ComSAhGyu6t4/ZE LJrLXRQkIblkX0nT6vJ2THN9lr0ezopiMHXAz5AejdgoyyHrWzPfB5IYJ85tznUF2Ei5 1csw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mp36si10949049ejc.478.2021.07.05.04.38.35; Mon, 05 Jul 2021 04:38:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231340AbhGELkC (ORCPT + 99 others); Mon, 5 Jul 2021 07:40:02 -0400 Received: from outbound-smtp37.blacknight.com ([46.22.139.220]:37419 "EHLO outbound-smtp37.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231286AbhGELkC (ORCPT ); Mon, 5 Jul 2021 07:40:02 -0400 Received: from mail.blacknight.com (pemlinmail05.blacknight.ie [81.17.254.26]) by outbound-smtp37.blacknight.com (Postfix) with ESMTPS id D8208199B 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) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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