Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1052879rwn; Thu, 8 Sep 2022 12:36:53 -0700 (PDT) X-Google-Smtp-Source: AA6agR6EpnJ+WPGn9FnuAXHkOaeaQk0CcRd1AnEiFARsdbCFPkg6PAPZjPJ8NAsV2G8OBNJt+CnQ X-Received: by 2002:a63:f747:0:b0:429:f993:da06 with SMTP id f7-20020a63f747000000b00429f993da06mr9186024pgk.291.1662665813292; Thu, 08 Sep 2022 12:36:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662665813; cv=none; d=google.com; s=arc-20160816; b=uLoxtGVTQnWyle0GzEF0hjoGt/gyQfquQCSvdAolyeWanFiCYFM1rdvXWmZthD/dd4 UPSitmWMV4H3OhF419VER4RGO8yPC3m3NR4xW74son+32wAzDC84tT4hMr58EtxABEyD KqMqXMYhmtBs5uaXP+GSWjWzdIp7Mo7NXsCKRSUrlBv1XP2rGJJMlz98XIzobAkbAsjk NvkPjBIqUXCFutyXiBoNHdqqKAZ+yP2lzeAGmRwraTmG5bquS7IdHsYmqQNj1Ct7d4KD mZc5K7FCGeEjOHeaGsqA2WS/hfZ3lA0mjZZUyZNpSXTQDeTRFRrnm9tYD7XvO3hh+08q s9ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=FwjOK0P8naImWwKQ9h3o6YU88Yx1FzpgkgpEbdQySQ0=; b=eF7cPmpw/2C0cWcg5fBaxrS1IfbJjClrh53oiAOfrGUxCQLAJQA0ZGt81C4GhH4Fle ERaGwcXSRaFVpkvZ+HZXzLmEa8sSwjGJ7wrRrMJW24WBlCXE0GhyX2RVGPHXcqRYjYue RJyOKXivYFTwdSUFn2J4gOcXqhMPEQgkHD6Tk314YsJfEf/xYcKAhq/KHFL9voNDcfAX +FxKtgKe6J7091uARBxxwOR92dZqWRyNyj2BiuppPgNwVr6hrGMxdQyEf+HRb9HC8KZy pVVyNBP+8Z19ck49CxzMlXhQUk5kPCvccZlliodkeHKJttgP12qAPFYTn15LR2vwu8ds flxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KvlRWEJ3; 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 md12-20020a17090b23cc00b00200957d2265si2946552pjb.134.2022.09.08.12.36.41; Thu, 08 Sep 2022 12:36:53 -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=KvlRWEJ3; 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 S232215AbiIHTby (ORCPT + 99 others); Thu, 8 Sep 2022 15:31:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232011AbiIHTbw (ORCPT ); Thu, 8 Sep 2022 15:31:52 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18D90BB932; Thu, 8 Sep 2022 12:31:52 -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 C5453B82235; Thu, 8 Sep 2022 19:31:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 088B0C433C1; Thu, 8 Sep 2022 19:31:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662665509; bh=NmE619tRw480q6SlrwPDQuo+MM2YUSnioxegTXmhEHg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KvlRWEJ32TDBz38Gt6UPyhmuOvwv0H6sA6MmoAaBpuZY5csfvvSiCIvigsAZcO44+ jrgMuk0DnvyV0bATZ+zKus3DjHznzN1PeD0qA9lt3O0bkkGyKBf6MOL74LaTHezGvN 2BLPdJKvyGadn40FA5gf0pM9uD+XcjI1FFv9XXgwnTF8LyOm60EMpL9QmPmftLl30Z GFxD/LOTYhqj7CvVpttkpD7Yy9NRJWcqnhq/WPr4QwWDd8SVMYLhGAlPLeip1GzC9j x5hRVGUDpLIe3563UcHSj+4ZriObyVnyLiIhXpAnZC6wD5mrslcMv9G/2lmPsgeeiq 6BddUzRLayJtQ== Date: Thu, 8 Sep 2022 12:31:47 -0700 From: Josh Poimboeuf To: "Masami Hiramatsu (Google)" Cc: Peter Zijlstra , Steven Rostedt , Ingo Molnar , Suleiman Souhlal , bpf , linux-kernel@vger.kernel.org, Borislav Petkov , x86@kernel.org Subject: Re: [PATCH v3 0/2] x86/kprobes: Fixes for CONFIG_RETHUNK Message-ID: <20220908193147.mtfwh33q2cfbw52b@treble> References: <20220908220354.28c196c8bbe4e83c83afcb59@kernel.org> <166264927154.775585.16570756675363838701.stgit@devnote2> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <166264927154.775585.16570756675363838701.stgit@devnote2> X-Spam-Status: No, score=-7.1 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 On Fri, Sep 09, 2022 at 12:01:11AM +0900, Masami Hiramatsu (Google) wrote: > Hi Peter and Josh, > > So here is 3rd version of the patches to fix kprobes and optprobe with > CONFIG_RETHUNK and CONFIG_SLS. > Previous version is here; > > https://lore.kernel.org/all/166260087224.759381.4170102827490658262.stgit@devnote2/ > > In this version, I simplified all code and just checks the INT3 comes > from kgdb or not. Other INT3 are treated as one-byte instruction. Looks good to me. I was confused by the naming of kgdb_has_hit_break(), because in this case, with the function being called from outside the stopped kgdb context, the breakpoint hasn't actually been hit. But it still seems to do the right thing: it checks for BP_ACTIVE which means the breakpoint has been written. Reviewed-by: Josh Poimboeuf -- Josh