Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2221313yba; Mon, 15 Apr 2019 07:24:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqy890IZ9BsalAA/pkBDFJ3wFsKfX/NKn3aK3HL/qPJZBxfKW56df5gChC29EmsKob08B6+Y X-Received: by 2002:a17:902:7892:: with SMTP id q18mr74880895pll.163.1555338273730; Mon, 15 Apr 2019 07:24:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555338273; cv=none; d=google.com; s=arc-20160816; b=QGxvp0+vG4MZo3VeR0sBFHOO1VOQq58cwNLBsz9ZTFr3iK+UI3CNqrizo1TVz3sRl3 xB/3XprndpdTQnanH07Ie3HbeQqVevOs7CwaHfiXdQZPsZbH82IE+PegPq/DLzQQz49n HF2Knea9og6BA2sETc/n6fI5HTbuIRkJDOspfYGz5g1+0jpSMf46EeP21OAgA+5Vj1cx G0pBA2STTtnPLj5R4ag14VxJb8hojhoI6B4dqLlJHEllHYxZLhsjWL5+TkV5XCZpC9iS QljTAzkfB6S6LmNq+Sfr2bK2wtQOAiVbGzAr/T2zUUdAF+JtR7bD/LIR2Ir281rnAqUM df0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=pmyvWH9ZMN07VK8oyhMskbovsYoBe8IQZyso9rGspVI=; b=rp7r/XWzYLuOZw+TY6gx1rVh2qvFFWreFTLqpCcwaJSRVAj/ajHSehZoHG1mLjjTOH E3LwwCI5C1wcT2CybogPUj8sxLcyBpKkBIH2BgNeaPx6u0DKBHCcX0qp4icUSjeuHcSY 4y7305dMK7Zuv4JgYnZIvHhyNmqCUzmO4QttiyiSTX4AE1jx1mu8W0oONXFFiD9ob2Dm 4HS3dtZTWgxZPa3L1MqQDuMy9p7YAVkIqXzIfbpD3BdAuS0qaYabeq43/VUOZmGqHdIX bWk0aADPUzXtWcS2Dgv53gKivJbxJhkyTCR5bDW0x5gbVTSw3rmIHFpIggGkM39poLhZ Z5aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="gda2MW/V"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k9si45423384pfo.173.2019.04.15.07.24.17; Mon, 15 Apr 2019 07:24:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="gda2MW/V"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727565AbfDOOWg (ORCPT + 99 others); Mon, 15 Apr 2019 10:22:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:53512 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726094AbfDOOWf (ORCPT ); Mon, 15 Apr 2019 10:22:35 -0400 Received: from linux-8ccs (ip5f5adbb4.dynamic.kabel-deutschland.de [95.90.219.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 51E4020880; Mon, 15 Apr 2019 14:22:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555338154; bh=f0MTa7O9eKaqafBFgQG47VlmY1xfprmetDMdk8EjmCs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gda2MW/VzVJSa3xOMiLc5NR4KzuPJtxxImHxRxhpaIVjF3mbNKxbji4LvC98vvwgE XwggmmZ9821q4ATTw4dihR9dTGPKKAvqWEz08cOFZPlPBvEy+veEOoO2291H5Pne6I rWHkItre8LoCmzTpMcHtAu27dKt48fVWz1d/1L08= Date: Mon, 15 Apr 2019 16:22:29 +0200 From: Jessica Yu To: Nick Desaulniers Cc: Tri Vo , Matthew Wilcox , Randy Dunlap , Peter Oberparleiter , Andrew Morton , Greg Hackmann , Linux Memory Management List , kbuild-all@01.org, kbuild test robot , LKML , Petri Gynther Subject: Re: [PATCH] module: add stub for within_module Message-ID: <20190415142229.GA14330@linux-8ccs> References: <20190407022558.65489-1-trong@android.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-OS: Linux linux-8ccs 5.1.0-rc1-lp150.12.28-default+ x86_64 User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +++ Nick Desaulniers [08/04/19 11:08 -0700]: >On Sat, Apr 6, 2019 at 7:26 PM Tri Vo wrote: >> >> Provide a stub for within_module() when CONFIG_MODULES is not set. This >> is needed to build CONFIG_GCOV_KERNEL. >> >> Fixes: 8c3d220cb6b5 ("gcov: clang support") > >The above commit got backed out of the -mm tree, due to the issue this >patch addresses, so not sure it provides the correct context for the >patch. Maybe that line in the commit message should be dropped? Yeah, if the commit is no longer valid, then we should drop this line and perhaps generalize the commit message more, maybe something like "provide a stub for within_module() to prevent build errors when !CONFIG_MODULES". >> Suggested-by: Matthew Wilcox >> Reported-by: Randy Dunlap >> Reported-by: kbuild test robot >> Link: https://marc.info/?l=linux-mm&m=155384681109231&w=2 >> Signed-off-by: Tri Vo >> --- >> include/linux/module.h | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/include/linux/module.h b/include/linux/module.h >> index 5bf5dcd91009..47190ebb70bf 100644 >> --- a/include/linux/module.h >> +++ b/include/linux/module.h >> @@ -709,6 +709,11 @@ static inline bool is_module_text_address(unsigned long addr) >> return false; >> } >> >> +static inline bool within_module(unsigned long addr, const struct module *mod) >> +{ >> + return false; >> +} >> + > >Do folks think that similar stubs for within_module_core and >within_module_init should be added, while we're here? > >It looks like kernel/trace/ftrace.c uses them, but has proper >CONFIG_MODULE guards. Tri, if you plan on sending a v2, could you add Nick's suggestion above? Would probably be good to prevent future build errors if a user omits CONFIG_MODULE guards. Thanks, Jessica