Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp859681pxp; Wed, 16 Mar 2022 19:18:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwq46soWJT+yR8iLtNZBc6MymxuHvx+SDQcLWPXyy2sN+d0Ru+h2EX9RaFdq3yq81EKS+7s X-Received: by 2002:a50:d949:0:b0:418:ecfe:8c25 with SMTP id u9-20020a50d949000000b00418ecfe8c25mr2210343edj.156.1647483528134; Wed, 16 Mar 2022 19:18:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647483528; cv=none; d=google.com; s=arc-20160816; b=nhIGdx8yGWBPVhr3+C587ys9HPz8TwiOKem0d9EHsXId69d5c6XNz9xm/TTHt4DxCF cm1Zz0ZQHbfCcrOhercDOQE23CBM9PWoqMWkdwZ+HceXDUEeH9oIHXHIJKE4pJscSA1P 9muO3UqlI9E7YIbdlqk8p4LL9GqwhP57K5LFawH/FGXtp11rKG15xi19PFHHoNDxoo/P WaGDL4q/sVkKPENABMTX1De0+LB6lASpOLpDStS9Ip5fyFQFAsugzyA5qAyMMHJr7aRa 1/BTJKF01wS8xsCEFeSmUw2wZYzS/cve7jZ7G+pB9WF70iFEGvNYCdsDs1pCOcw8aHXH vEdw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xXstrqbhdrCtpIJmjbeJjoMnjfiHRrkdJe4QqBw0f0g=; b=Ihot1VByYinQr4o7PFy2ZDyXl8V0GPbPwpvT9Q4NILCm8RRBLo+DnzHrYqmWqnnr/c T11HK2CctOuKezlFpXQltCBXNLsZXKH/z/RIm9rVAAjyrYX2wUoyclPe+KQ8NUsQIBgO /W2nzedQR8eTlUAyCVvtvY0rfz5ydSjoNQsaB1l68sSOpAy/ENi4y0zs6BK/9f69RDs/ EulfxqOp3n8hoavo8J78N70XX0+5fonznCYPqajywg00lxQ1jbwYHcUCeGGGoVWN+wbb 0QS8fpP3eERaefwJDKauv43EU3Ytswn7AbrsRzwIc805xHhwxCWB8AEiHJHgZ7QEzl+I tLnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=raQfnCQY; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hh21-20020a170906a95500b006d06e2fbb61si2199205ejb.634.2022.03.16.19.18.19; Wed, 16 Mar 2022 19:18:48 -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=@linuxfoundation.org header.s=korg header.b=raQfnCQY; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238245AbiCNMWT (ORCPT + 99 others); Mon, 14 Mar 2022 08:22:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241111AbiCNMM6 (ORCPT ); Mon, 14 Mar 2022 08:12:58 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD89635DF9; Mon, 14 Mar 2022 05:10:56 -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 sin.source.kernel.org (Postfix) with ESMTPS id F2827CE1268; Mon, 14 Mar 2022 12:10:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B78AC340E9; Mon, 14 Mar 2022 12:10:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647259853; bh=7qTVnw2yRQESL+5rhUTjec37rFEutZCM+G5pVePxMA8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=raQfnCQYENY4cVrI29KjXHG/3KzGL6LFqrPu0qGNnx1efCWT3vmG/mvHT2WXCRTX5 zpuGviHz4SWparX1l6AqF/6PUkaKqeS28kHVm3sbKpvjmP9nHsgMa0XGjzGEtlu7dL Z5NosGQuJHx0h0momITckl3z/5I2VlXEbmuczp8k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Li Huafei , Borislav Petkov , Masami Hiramatsu Subject: [PATCH 5.15 104/110] x86/traps: Mark do_int3() NOKPROBE_SYMBOL Date: Mon, 14 Mar 2022 12:54:46 +0100 Message-Id: <20220314112745.928908458@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220314112743.029192918@linuxfoundation.org> References: <20220314112743.029192918@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 From: Li Huafei commit a365a65f9ca1ceb9cf1ac29db4a4f51df7c507ad upstream. Since kprobe_int3_handler() is called in do_int3(), probing do_int3() can cause a breakpoint recursion and crash the kernel. Therefore, do_int3() should be marked as NOKPROBE_SYMBOL. Fixes: 21e28290b317 ("x86/traps: Split int3 handler up") Signed-off-by: Li Huafei Signed-off-by: Borislav Petkov Acked-by: Masami Hiramatsu Cc: Link: https://lore.kernel.org/r/20220310120915.63349-1-lihuafei1@huawei.com Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/traps.c | 1 + 1 file changed, 1 insertion(+) --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c @@ -659,6 +659,7 @@ static bool do_int3(struct pt_regs *regs return res == NOTIFY_STOP; } +NOKPROBE_SYMBOL(do_int3); static void do_int3_user(struct pt_regs *regs) {