Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3368348pxp; Mon, 14 Mar 2022 18:00:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOxrkbEc11zAitwzILx04ol5L2bRA67hp+G6AbJmletC4KBm/CwuWVj0xVVg/CgG0cekf5 X-Received: by 2002:a63:4f08:0:b0:34c:6090:603e with SMTP id d8-20020a634f08000000b0034c6090603emr21559062pgb.15.1647306050231; Mon, 14 Mar 2022 18:00:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647306050; cv=none; d=google.com; s=arc-20160816; b=aZR5jBKyAWlkRnTOxXNUCLBaoZTuwxzDtIcP4XNWoxJpn3UFpNfsWBd02kqdEOifO7 NS8kGvZiSHfSs6lJ+MSg83UXocamdwoinnfu7ygifdsoZD4ER5O/+cFiSUpUr4WVzUY3 DQ2AYgHQLfCKR14+PPl6yNkNSRWhdepNOuzLI2v6/7vW8aHVZG6AmbeYlIuGyNC8A4Zg Rv38vug1vOrqAwN+ZhviXSHsTxG7ievAnusM/k/LVqN7h0jxvJH1ehHsxFo4al6MRMhx KInMDprh4UoiMpq4XY1RrvL1hdMmcLb/b8QMFrq6Pn5qAa/8uZg6j9J8MiPNw+u9dE3g IwFw== 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=vVFqAhzZjbe357awSATAXXMsgkr/8lA2NoE9F+N0s6GYrThDcckfxUbbCcTKZ8BJk2 S3/1qmgoh/y3RVfzKYvKyW6+7RQMet0xcDX0wF3iatIBhk0rBDp7tVpkF4mvzBWG0dfC qxkqq2ZZSarzk9RvtZfD2PnfYr/DELXfk7xSkrbw+Z3HZTzJmBr+9j/v8qA8A+/eWsba Yy8fsmAIGXLw251gaxHYLc/oVytSZl9luDQghclLNfWJ7Pu88GoXsVFJ13RD5i5eFgpi Vqs1nx9UfPXLk1CV6bXX5izIMfVhpDI4I34Y7zNpCkOYEu1b9QDXfs9DnsGed+IWjQt9 f0Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aTeqRmwS; 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 e63-20020a636942000000b0038015136829si15886095pgc.636.2022.03.14.18.00.36; Mon, 14 Mar 2022 18:00:50 -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=aTeqRmwS; 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 S244834AbiCNMc0 (ORCPT + 99 others); Mon, 14 Mar 2022 08:32:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243937AbiCNMVZ (ORCPT ); Mon, 14 Mar 2022 08:21:25 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F242E13D01; Mon, 14 Mar 2022 05:18:51 -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 ams.source.kernel.org (Postfix) with ESMTPS id A5637B80DF5; Mon, 14 Mar 2022 12:18:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BB723C340E9; Mon, 14 Mar 2022 12:18:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647260329; bh=7qTVnw2yRQESL+5rhUTjec37rFEutZCM+G5pVePxMA8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aTeqRmwSix0IJbCjUhCwYnDIG0WQmm+aZvQHzNRj1WwiKBGsH8dZ4wnzIgng7WJVa iYQ3VMD5oQJw+77v7dgW3drCyw5VRAc+ZIGTCd5Nx9ssatwdunJrANodc3OeyIXfn4 8xr1rOE6mMQH0q3TNBidVTsx4fr9AS1WvWZDBpLU= 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.16 117/121] x86/traps: Mark do_int3() NOKPROBE_SYMBOL Date: Mon, 14 Mar 2022 12:55:00 +0100 Message-Id: <20220314112747.377386421@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220314112744.120491875@linuxfoundation.org> References: <20220314112744.120491875@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) {