Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1139488iob; Wed, 4 May 2022 15:45:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyeCT05L6MOGu+Kx0paQKNLFLYwLbMNYH1x9dggbzScN8U7dwcJgpj4Q19adoWgIRYx0BD9 X-Received: by 2002:a17:907:d28:b0:6f4:6375:5245 with SMTP id gn40-20020a1709070d2800b006f463755245mr13722114ejc.12.1651704304809; Wed, 04 May 2022 15:45:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651704304; cv=none; d=google.com; s=arc-20160816; b=wD0YPcn62BnI/1D19nn2oUZK9KR1GHnM3FfJzyzOnTwWiJ9hDSv3X7c51u1UEeZCAl Gkplt8jjnIjp18KPPjEevFzlcgmnIrtW5RJWFAlPB5QYnX4lqMdV/OrEiskpVLoK9mqN SR3q7Q4g44s0Sh1yVJjCrmtkYmRks1fm5DSqEgYSi8a1d5eTPntTWYBTX84lkekW97id OdhK0thKvynqOmq+y2Sm3uYOht5tY13GZE2Y8B+BcPze1sK/ieGk50cxvJazvfGjB0lP CUirnaxOulGAmW9i1Ea0fZhd/hOOpaFDpd+CIlG28uURIblc9zJqo1D2gNQZg2wCgPnF dHuw== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=WEUgp5/8Nz2SPY64kjIQfSXNYxa5k9T31wqUIjeYw/8=; b=fDxEeLWeKFGiFpqiGuDLJ+9s5WzboA5Y/XpYZADTZHww0vYsM7RfFXe6vBiCk7Xnkv zky1iYg8eL3vTPxQfUK7KQZNUYyqp9RM11n9vKPB029IPYdn5MxBuLMz/hOcMnqxn8HY Fqoyy8iJKJkM9+3IxXhKq7ge1y8l6LfQqboTC+0HEvZkuUU0ayP0pmt2izin+3eE/R7k H+U0FcI8wOjMkFIc3Ji1B35RVxFUvMPoMz3ZN0yyRgun0FkQRHzuxOi/MdAqpsu4pNh7 WJMkgMuE9V3rV0wHKQkkh+/y9QKaWo27lQVS287pZXg4KcfgcyZKTzVB1/Rzwzhgp3Ks yuKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Wf/i3Xzv"; 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 z1-20020a170906814100b006e7cd47a2d3si237340ejw.189.2022.05.04.15.44.41; Wed, 04 May 2022 15:45:04 -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="Wf/i3Xzv"; 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 S1350942AbiEDP1J (ORCPT + 99 others); Wed, 4 May 2022 11:27:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229902AbiEDP1I (ORCPT ); Wed, 4 May 2022 11:27:08 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FFB341318 for ; Wed, 4 May 2022 08:23:32 -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 E904EB826BD for ; Wed, 4 May 2022 15:23:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A952C385A5; Wed, 4 May 2022 15:23:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651677809; bh=ktJHAAfxXY27F4Yp0pVOFZhlUjZRdnCIMDE+o9mcaSc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Wf/i3XzvW7iUXulwTOOL76y5ntY2o/iZzlM7DltPzIOvHdDuYW8HHcuc2aVasFSrX SkjKm6Wvv3MhL9TGp012sDM+fPVHy1+flzdjIVPFzBnVUsp+nDdzzxz/MLh0+cy/If nWOhDXTQlG1MoQPNJ6jSQsdJGrJuGBo74GAUFkAXSgHzeouIe4SD9q1SZwlllvTYfR whAlki5jIkAsUXS1pHxGR4PZTtksbMoDE9Sqqlmlghj3swVeelD8PmFbI3MxXq5l5m Hoy75fcqSulg9leoTxV1K+5q6Ym3nBY9Vxrtuef0mJSCW+eXvL6js7GYW3AtrAqmwY QFSYZzrqzjmsA== Date: Thu, 5 May 2022 00:23:25 +0900 From: Masami Hiramatsu To: Peter Zijlstra Cc: x86@kernel.org, jpoimboe@redhat.com, linux-kernel@vger.kernel.org, Masami Hiramatsu Subject: Re: [PATCH] objtool: Fix STACK_FRAME_NON_STANDARD reloc type Message-Id: <20220505002325.f29a5deaebb77549b80d59ce@kernel.org> In-Reply-To: References: <20220429092024.GT2731@worktop.programming.kicks-ass.net> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, 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, 29 Apr 2022 14:00:44 +0200 Peter Zijlstra wrote: > On Fri, Apr 29, 2022 at 11:20:24AM +0200, Peter Zijlstra wrote: > > > > STACK_FRAME_NON_STANDARD results in inconsistent relocation types > > depending on .c or .S usage: > > > > Relocation section '.rela.discard.func_stack_frame_non_standard' at offset 0x3c01090 contains 5 entries: > > Offset Info Type Symbol's Value Symbol's Name + Addend > > 0000000000000000 00020c2200000002 R_X86_64_PC32 0000000000047b40 do_suspend_lowlevel + 0 > > 0000000000000008 0002461e00000001 R_X86_64_64 00000000000480a0 machine_real_restart + 0 > > 0000000000000010 0000001400000001 R_X86_64_64 0000000000000000 .rodata + b3d4 > > 0000000000000018 0002444600000002 R_X86_64_PC32 00000000000678a0 __efi64_thunk + 0 > > 0000000000000020 0002659d00000001 R_X86_64_64 0000000000113160 __crash_kexec + 0 > > So that weird .rodata entry is optprobe_template_func. > > It being in .rodata also means it's not validated and there is no ORC > data generated, is that all intentional? The changelog for: > > 877b145f0f47 ("x86/kprobes: Move trampoline code into RODATA") > > doesn't really say anything useful about any of that :/ This commit was introduced just for reducing attack surface (the trampoline code is NOT executed but just copied into trampoline buffers), but if the ORC unwinder doesn't work correctly, please revert it. I think there is no functional change. Thanks, -- Masami Hiramatsu