From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3239ECAAD3 for ; Mon, 5 Sep 2022 14:57:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238529AbiIEO52 (ORCPT ); Mon, 5 Sep 2022 10:57:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238473AbiIEO5Y (ORCPT ); Mon, 5 Sep 2022 10:57:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FFBEEE03 for ; Mon, 5 Sep 2022 07:57:23 -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 E00886119A for ; Mon, 5 Sep 2022 14:57:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7FEB0C433D6; Mon, 5 Sep 2022 14:57:21 +0000 (UTC) Date: Mon, 5 Sep 2022 10:57:58 -0400 From: Steven Rostedt To: "Masami Hiramatsu (Google)" Cc: Peter Zijlstra , Borislav Petkov , Josh Poimboeuf , linux-kernel@vger.kernel.org, Ingo Molnar Subject: Re: CONFIG_RETHUNK int3 filling prevents kprobes in function body Message-ID: <20220905105758.176734eb@gandalf.local.home> In-Reply-To: <20220904230713.a461f8fe85329663226c755f@kernel.org> References: <20220904230713.a461f8fe85329663226c755f@kernel.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 4 Sep 2022 23:07:13 +0900 Masami Hiramatsu (Google) wrote: > Can we use another instruction for padding instead of INT3? (e.g. NOP or UD2) > > Or, can I expect the instruction length in __return_sites[] are always 5? > If so, I can just skip 5 bytes if the address is in __return_sites[]. Perhaps another option is to have a table of where the padding is placed (tagged), and that kprobes could check to see if the int3 is due to this padding or not? -- Steve