Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2284181iob; Thu, 5 May 2022 21:54:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnJQrbrLDcZRtPx+fH7GTN55AF9XFJTax/1K15bhTBGn59tukGGrmdofyI4DwiFtEZrS9G X-Received: by 2002:a17:907:1c8e:b0:6f4:e24f:20e0 with SMTP id nb14-20020a1709071c8e00b006f4e24f20e0mr1331489ejc.227.1651812861913; Thu, 05 May 2022 21:54:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651812861; cv=none; d=google.com; s=arc-20160816; b=Xa/ToXCOKrIPG3v8BXAqDGBc1LGHFsiRsjFaO7UHDafsO/aOYLx3aksR2/rA5i0cZO moGGgCBZB13U0vZrcxVezxzsxTalsQWGzHbyjQ4goNzH1gormK5NXUecWLYQFIIFWtIr +JWRgTHR+wb1Yw7CP8zIGBoXVv9CWp37BhFvx7Fw/BT6/7bgec5Dx6XJKzwBsf95P3Rf HCtA1wozMZHZhoDOTcky0wd0Ael+84UW0bXWNppPLPle5PFywklo069v/wguvNWdjmm/ aUNE/sygc6bc4GOpnTSWrMLaqlbCYawsBbfdsv4sVO4Va/pJPs4zfB1ObHaXx+bD8O/D D0OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=5ExVLOvD0Cf+kD2ul9mmMkaU1fkFkiIrxbL+iiqNQH0=; b=GgnSIe0voEgDmqeg+WHB+OYpPMRAmjKb2llwVatTUFqQ29A2Bd1CGcoj6mmmrdOvBi QBnpqSIKLmxfMsf3Or6w+xLotqczoyoifRfq4OISHdzvh0MhEaQPA/KLmwBaPOX/lQbu sbK7Zc3CN0K9nLKDXANMqfGjteopsTmdlk2taRVTd/P3b5bmnTv4D9kvTOMuki7Qudlf kSCYX5ijUc5wkSU7SkheP59AmnVySJBziDhBe8dJgg6lQsPpLj5tBgWgT7ExbsBmu6Cp vuCjZKjPXqQQJDxvgZ6Qammi8nEZ6Pf58H7Bpt4y9CMid16+3vae8a0K3BJ1P9sNAo0L GFRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V2865g5o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x5-20020a170906148500b006df76385b7asi4336484ejc.26.2022.05.05.21.53.57; Thu, 05 May 2022 21:54:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V2865g5o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S232361AbiEEAf0 (ORCPT + 99 others); Wed, 4 May 2022 20:35:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232166AbiEEAfX (ORCPT ); Wed, 4 May 2022 20:35:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60E352CCBA for ; Wed, 4 May 2022 17:31:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 06B9F61D16 for ; Thu, 5 May 2022 00:31:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5552EC385AA; Thu, 5 May 2022 00:31:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651710705; bh=oRbFK0+QsxbpJy+JTSG2ZgoCNqYlye01oWjlbX7I/jA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=V2865g5oV4//XcjoBYttq0NKogx8/atdD6piWCnAV3Zb0QD7OT3GVTLztBzd05VOl r+sIFfBvStaRCoZCkSYniQ4fQnU7wXXMD2xBCsZWW0ZfaSTcmv+3TiWQgk5fz+p062 Rqz9XIXKTY5vLXzOz/bQdtduQbaJ9UBRNle/wYvGnt6Iff3gNLdrcWTk5Dg1Kd3NDV +Crvx22ktwqGG3fFDqjNgd9jNFKKL+m/3cNhNUEOUPN1lXbUDYw4OqKRQS4Sy2PgJT UaSMsJUB7iWg/YD7u4kCv32VXzJ6xuWjDkc2QxBxAEW0wDll5T/zq2DtQLBNiFA/xc EHTLwoRx5yIcg== Date: Thu, 5 May 2022 09:31:40 +0900 From: Masami Hiramatsu To: Max Filippov Cc: Steven Rostedt , "Naveen N . Rao" , Anil S Keshavamurthy , "David S . Miller" , Peter Zijlstra , LKML Subject: Re: [PATCH] kprobes: Fix build errors with CONFIG_KRETPROBES=n Message-Id: <20220505093140.9a0500813b8d529442c76933@kernel.org> In-Reply-To: References: <20220502184050.1792743-1-jcmvbkbc@gmail.com> <165163539094.74407.3838114721073251225.stgit@devnote2> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 4 May 2022 10:53:42 -0700 Max Filippov wrote: > On Tue, May 3, 2022 at 8:36 PM Masami Hiramatsu wrote: > > > > Max Filippov reported: > > > > When building kernel with CONFIG_KRETPROBES=n kernel/kprobes.c > > compilation fails with the following messages: > > > > kernel/kprobes.c: In function ‘recycle_rp_inst’: > > kernel/kprobes.c:1273:32: error: implicit declaration of function > > ‘get_kretprobe’ > > > > kernel/kprobes.c: In function ‘kprobe_flush_task’: > > kernel/kprobes.c:1299:35: error: ‘struct task_struct’ has no member > > named ‘kretprobe_instances’ > > > > This came from the commit d741bf41d7c7 ("kprobes: Remove > > kretprobe hash") which introduced get_kretprobe() and > > kretprobe_instances member in task_struct when CONFIG_KRETPROBES=y, > > but did not make recycle_rp_inst() and kprobe_flush_task() > > depending on CONFIG_KRETPORBES. > > > > Since those functions are only used for kretprobe, move those > > functions into #ifdef CONFIG_KRETPROBE area. > > > > Reported-by: Max Filippov > > Fixes: d741bf41d7c7 ("kprobes: Remove kretprobe hash") > > Cc: stable@vger.kernel.org > > Signed-off-by: Masami Hiramatsu > > --- > > include/linux/kprobes.h | 2 - > > kernel/kprobes.c | 144 +++++++++++++++++++++++------------------------ > > 2 files changed, 72 insertions(+), 74 deletions(-) > > Tested-by: Max Filippov Thank you! Steve, can you pick this fix? Thanks, -- Masami Hiramatsu