Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1762910ybb; Thu, 26 Mar 2020 06:57:13 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtr676gOzXPok9ufLSQd2Y2jU66QkkkOCP5hS5cbeAzR8siJEYugq5NmSZX5y+E1lWwTtOr X-Received: by 2002:a4a:e38c:: with SMTP id l12mr5162387oov.7.1585231033340; Thu, 26 Mar 2020 06:57:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585231033; cv=none; d=google.com; s=arc-20160816; b=PAEm3Z4IqbiINnbbNDS60GxcNFYCGOa3Rux9TFolwFCglrC5b+F43Gc6BA1hNmp7mQ QqPYQ9qmRzMUDV/3lvfk7JFPB19yjaIH/dJ+1OEL4g0l9yG+f7IQxAGdvKbJvmNH60sG sKci7AbHtsiDJt9+2ITueYjpYIl7VTgKLp/OPxoSDiwrFOMaGTXFeKQ3PrfB/jpnJXp2 ZZWhK8Egx59abrKzY71ghkj9HxhabsWiNVpDfqbpFu4SiTFpWvOkj50MzjKMLf/SSgG8 VBGtytYsRgD1vizCFvLAubJmutB73A7d/jd2rvY+Jh3XBfFvDBEPXw3e6rmvWag1D5Vi JikA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=FXv3fMoVKY2zuGHET+HIX0s7UbodBDHLQThNOb8pISg=; b=V8q4oxP16sFRZ56E+a3YUjhXAgTHTBAC4XlryxR/xkDxqLR6apEKhAADaqcvDhFpWI cmU0dDSIgOGHVhyNXdDxz5rTXxaxbeZ2lIIsaSf1tWXkZqKJNiloLwKJQTu5KQoBHBkZ PGNBcbTIsRa/bHzqbwHpct+smeEa8ZYcLozE2GMs+AishsR20SLVQj61WbxSfrzzgtgj Fy+eBgY5Kaj+twT1Y+EGyj7CFeIFEu7Tpno7l+KILa6dvVruYpC5sdz4vN7uksnQ0dKX QCdbHGCljUJWxtCZUWCCMZpNXcKlDNGNanI1TAH64P7o7l90wz7liAeDzQsMforvDHsz /31A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IjiyS6se; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x63si1028228oia.101.2020.03.26.06.57.00; Thu, 26 Mar 2020 06:57:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IjiyS6se; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727822AbgCZN42 (ORCPT + 99 others); Thu, 26 Mar 2020 09:56:28 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:53697 "EHLO us-smtp-delivery-74.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727719AbgCZN41 (ORCPT ); Thu, 26 Mar 2020 09:56:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585230987; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FXv3fMoVKY2zuGHET+HIX0s7UbodBDHLQThNOb8pISg=; b=IjiyS6sevBJ1Oe73lBaMfAMzWtdrOThiMuFeK4OvXmVCATFFuiC/C6nrRMn1r2ev88bXIc 8ZB31BUSvIBFwnhQGz9AJPTfWWDS29txrm8tH+XuPnL7yxG/9pNXNM7zJMhND36ioMyqld ZrrEjWu/1bTzfLMKVB7STUkqSV/n8D8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-104-cpyZBhleMH20OQhTkwuzoQ-1; Thu, 26 Mar 2020 09:56:25 -0400 X-MC-Unique: cpyZBhleMH20OQhTkwuzoQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DD9AB189F764; Thu, 26 Mar 2020 13:56:23 +0000 (UTC) Received: from treble (ovpn-112-176.rdu2.redhat.com [10.10.112.176]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0DFD25C1B0; Thu, 26 Mar 2020 13:56:22 +0000 (UTC) Date: Thu, 26 Mar 2020 08:56:20 -0500 From: Josh Poimboeuf To: Peter Zijlstra Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org, x86@kernel.org, mhiramat@kernel.org, mbenes@suse.cz Subject: Re: [PATCH v4 01/13] objtool: Remove CFI save/restore special case Message-ID: <20200326135620.tlmof5fa7p5wct62@treble> References: <20200325174525.772641599@infradead.org> <20200325174605.369570202@infradead.org> <20200326113049.GD20696@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200326113049.GD20696@hirez.programming.kicks-ass.net> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 26, 2020 at 12:30:49PM +0100, Peter Zijlstra wrote: > This isn't ideal either; stuffing code with NOPs just to make > annotations work is certainly sub-optimal, but given that sync_core() > is stupid expensive in any case, one extra nop isn't going to be a > problem here. /me puts his hardened objtool maintainer's glasses on... The problem is, when you do this kind of change to somebody else's code -- like adding a NOP to driver code -- there's a 90% chance they'll NACK it and tell you to fix your shit. Because they'll be happy to tell you the code itself should never be changed just to "make objtool happy". And honestly, they'd be right, and there's not much you can say in reply. And then we end up having to fix it in objtool again anyway. The 'insn == first' check isn't ideal, but at least it works (I think?). Maybe there's some cleaner approach. I'll need to think about it later after I make some progress on the massive oil well fire I call my INBOX. -- Josh