Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3353824iob; Sun, 1 May 2022 14:49:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxA28rmjdcHct35L9bbZ2DPRCn+ab8wVv0dF5xBPevNJ5+yXWLTGpndgA2QxhBUYFMFsYOk X-Received: by 2002:a05:651c:3c2:b0:24f:b91:fcba with SMTP id f2-20020a05651c03c200b0024f0b91fcbamr6266379ljp.154.1651441759541; Sun, 01 May 2022 14:49:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651441759; cv=none; d=google.com; s=arc-20160816; b=NZFvt8Z3hpd/4f1s9GNx9J2qjFEPJ550tCj/XmkYkAxhY6aT5/Y1sBjXMYb2/65Arq Fq5RYLGIvaFjGLeKp7EK1HPyb+25T+hU8inzZLFf8NB0aY9ZjDndItb24ApKC2sYKvZF Dc8W3MO5JAlb8rPlBw9X8UP6tHGUXpUmuwLoI67AT1EjojScUqQzi4mm8nmhUWttPs9O N42b1iANoBC5PKmy86PcmLJUr/jd9VqHP27XNtsVgRjLgzvJl/0IUSNmIQOYx6CmUV77 HJi+EIkc3vWcn88vg3pnOs76bFlwCDPE3MIo3olxg+rvmpllsfODEzfXs7903ao0+WCi 1kIA== 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=gsyUpztCNYmZ96EpQWYmAz5WX7xwnKSKkquJpktJq7A=; b=mYcLT10L0Nl3PZ9E+gOUnvBQozvE070CFIcgSV+52GTsK4u7wZV3YUj5kowkMx1t5q O9TXwIWcsoXBl+2d3f5vs3OGW/iG6VmIHZSd2JORo2jHMCvIOjq8GnEk9xv6KT5Hp7UG /7o2KVq1MEoI5GzT1UfJjOkjf1RGL1RZcGE3BhnSvQtYP40Iee6D/kjVUAS3BkBO2Y8t J7Gr792zlrCs45HLNjLLB48xclp9hB9VYHFO2/nevyKPEztZxKEm5ys6R/qv3kn4YxY5 ZnM1vD+LIbFeGhaac0/2esSUhUJCOB7LzUEtpvZIBt8PzRSevZZGqfjVg08C7IrLZauA 4tWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=Hsx5jjk0; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p21-20020a05651212d500b00471f6aa61a6si16283094lfg.180.2022.05.01.14.48.52; Sun, 01 May 2022 14:49:19 -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=@infradead.org header.s=desiato.20200630 header.b=Hsx5jjk0; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350827AbiD2MEM (ORCPT + 99 others); Fri, 29 Apr 2022 08:04:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231992AbiD2MEL (ORCPT ); Fri, 29 Apr 2022 08:04:11 -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 27A5013D62 for ; Fri, 29 Apr 2022 05:00:53 -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=gsyUpztCNYmZ96EpQWYmAz5WX7xwnKSKkquJpktJq7A=; b=Hsx5jjk00lixP/qXUD8gXzHFVk WaNixI94vnP836l6T5B5pyGwhaeSy4PRpWlT1p3MckQIimt2kyH2O40kz5CR0ljgiw0p9k0XdnB36 aQ7sJFumPBjqwJxhUu7edL+OHJjYUXuSCnki4GZ2RGRazYxV6mhaVS30nUd53fH9C1DrI55tWmEqo MlNWi2mxN35w5Vao20yAI0pmK8O5JHL2m0c32AxBC8LPmS9a+x+7dh5e/dLE+YENBb7dn4W0a7uRt rvAI6nB+k7aGcVr3LM0CoIKlKmAwo3/NBo0v2q5WkV8K6hvhNAc/fXtPE2BPODr9Ra1YQpGJR19yx LtSAjSoQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nkPIk-009bTf-MO; Fri, 29 Apr 2022 12:00:47 +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) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 23149300385; Fri, 29 Apr 2022 14:00:45 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0673920295B20; Fri, 29 Apr 2022 14:00:45 +0200 (CEST) Date: Fri, 29 Apr 2022 14:00:44 +0200 From: Peter Zijlstra To: x86@kernel.org, jpoimboe@redhat.com Cc: linux-kernel@vger.kernel.org, Masami Hiramatsu Subject: Re: [PATCH] objtool: Fix STACK_FRAME_NON_STANDARD reloc type Message-ID: References: <20220429092024.GT2731@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220429092024.GT2731@worktop.programming.kicks-ass.net> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE 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, 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 :/ I also don't see any kprobe/optprobe hooks in unwind.h, so what happens if we hit an optprobe?