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 98F9DC38145 for ; Wed, 7 Sep 2022 12:57:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229792AbiIGM5D (ORCPT ); Wed, 7 Sep 2022 08:57:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229494AbiIGM5B (ORCPT ); Wed, 7 Sep 2022 08:57:01 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D151B61DBD; Wed, 7 Sep 2022 05:57:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=saz/FrJ1w47O2wLBfc2rAqnN8dl7BoLqINnYw53up78=; b=J/AlguoYEKFUJHZzZTzTeihCY2 1eIruknXw5y/I46AHz3YFYUNX0+Wu6rDfuE7xaknQKQKS3iEtybFg74Lyl0GPD0eBs4V9oHTK56OO llkUfN0yU7B4h8tMB2ob7MFt9PGq6CMSHh3SuS2LIYv4TJYCo049bHFuiXRuyyXfmyBxUHO1z8ZW9 lC/GPtw46IQF29WjzV2tJZQb/9pYS427AolTPvgnUzBQRwOPZNus/f0FeFbcYzQti87V4UxUWK6YB nro8XkeDj8nBpOUASApqByDfB8uPAqCE+yCcZ61VkFxPz7BfyS2gcp6AZvAhQAF6Qq30N/iqH+D65 Wbv4amcw==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oVubu-00ARZI-39; Wed, 07 Sep 2022 12:56:54 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 593473002A3; Wed, 7 Sep 2022 14:56:53 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id DE50C203C2334; Wed, 7 Sep 2022 14:56:52 +0200 (CEST) Date: Wed, 7 Sep 2022 14:56:52 +0200 From: Peter Zijlstra To: "Masami Hiramatsu (Google)" Cc: Steven Rostedt , Ingo Molnar , Suleiman Souhlal , bpf , linux-kernel@vger.kernel.org, Borislav Petkov , Josh Poimboeuf , x86@kernel.org Subject: Re: [PATCH 1/2] x86/kprobes: Fix kprobes instruction boudary check with CONFIG_RETHUNK Message-ID: References: <166251211081.632004.1842371136165709807.stgit@devnote2> <166251212072.632004.16078953024905883328.stgit@devnote2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <166251212072.632004.16078953024905883328.stgit@devnote2> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 07, 2022 at 09:55:21AM +0900, Masami Hiramatsu (Google) wrote: > if (!kallsyms_lookup_size_offset(paddr, NULL, &offset)) > return 0; > One more thing: https://lkml.kernel.org/r/20220902130951.853460809@infradead.org can result in negative offsets. The expression: 'paddr - offset' will still get you to +0, but I might not have fully considered things when I wrote that patch.