Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp15686545rwb; Mon, 28 Nov 2022 14:59:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf7hFiHdBLw1lKx6Kn6bVx/gSEjoFOV6PwGSIvZ/Hxw06tHHzM0H+SnW5xHbzs03hbWyDBRw X-Received: by 2002:a17:90b:804:b0:20a:7ec2:c96d with SMTP id bk4-20020a17090b080400b0020a7ec2c96dmr55421972pjb.178.1669676375778; Mon, 28 Nov 2022 14:59:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669676375; cv=none; d=google.com; s=arc-20160816; b=hTEGR3yplXcZ5TIwE69+36hB0nIxGHu94wk2+NVUtXDQP4qpGHX7PMg3+BXTtzDO6a K+fdU4Maq0KWurLCw4FmMRI8eXZ+WG13u6yzA5tdeJvlAxZa7QJGpvqR25kaWEG18cjF YwwcYER8be/rg6el3WplqialavjTvkXPrmWP+kEDm/hDoSkPGmH3hJY6G68q4Nu+IIQi ktZOLHzoA7mBzo8gQbuCsY7hT/ZyfEIBK9pypZNEZAn2mB5JZiiqMG6amH9OZXTK5E/W LySDxXHyb1gMeOt4Z3GNOQREoFP07nbxSWCF+8qjH90J3hucQ2E0jssw7erddohAAxjL HH0g== 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=9Q9szGNYMhSiNNSee04BnD1hzRz/IY1kCkdyOYUCGbg=; b=Hp8HKtxOIvz08xzKs86AdvWCrdKnbNMvar/WlYM6XQ7XxnrqRBJKQNKTCQ6Ny39uZi MkfKiRxHTlxfIKLmQy99yUa3gkSobJ2KQ14/yuvMc1fIEu++t9EqesLqjbv+XbON9dl7 8LF88+X+wqLVK+ruR9wlY+CvKR2rhjZoW5GQmpxgja3MNsnP1NDUVvHzGU+2ZjRtl9sR UFrOLwd50+1rL/s1O07KC+f2aoFFQxnEuVCjzPkfqFgRSMlNVcffCOvKDVzysnjA5H18 fgESGY6AHdK+cQJCDDVMf3jLCWONFJ2ASh3+DY0mRE6GV3AZOMR01NSHsAhj9FG95NfM ugpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=mN4PUamx; 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=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y6-20020a63de46000000b00476837b4138si13757176pgi.800.2022.11.28.14.59.25; Mon, 28 Nov 2022 14:59:35 -0800 (PST) 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=@alien8.de header.s=dkim header.b=mN4PUamx; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234333AbiK1WUU (ORCPT + 83 others); Mon, 28 Nov 2022 17:20:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233919AbiK1WUR (ORCPT ); Mon, 28 Nov 2022 17:20:17 -0500 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5514430563 for ; Mon, 28 Nov 2022 14:20:16 -0800 (PST) Received: from zn.tnic (p5de8e9fe.dip0.t-ipconnect.de [93.232.233.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id CA9BB1EC042F; Mon, 28 Nov 2022 23:20:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1669674014; 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: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=9Q9szGNYMhSiNNSee04BnD1hzRz/IY1kCkdyOYUCGbg=; b=mN4PUamxtBk87PLqiviOcquAwrDbZHger8qcXMamDAsH6joWG444klQJ7ma162U30THJwh Xpsk0TESRHV6Jk2uG026Vbbo5aPXT2Hj0A+54Z6N3G+vDxXCAdctsi6psqzawdyBwF30aq pQMj7FytIK6FqB5F5Y8XcGhMUPQ0e9s= Date: Mon, 28 Nov 2022 23:20:11 +0100 From: Borislav Petkov To: Uros Bizjak Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Dave Hansen , "H. Peter Anvin" Subject: Re: [PATCH] x86/boot: Remove x86_32 PIC using ebx workaround Message-ID: References: <20221104124546.196077-1-ubizjak@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221104124546.196077-1-ubizjak@gmail.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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, Nov 04, 2022 at 01:45:46PM +0100, Uros Bizjak wrote: > Current minimum required version of GCC is version 5.1 which allows > reuse of PIC hard register on x86/x86-64 targets [1]. Remove > obsolete workaround that was needed for earlier GCC versions. > > [1] https://gcc.gnu.org/gcc-5/changes.html Thanks for the doc pointer. Lemme see if I understand this commit message correctly: SysV i386 ABI says that %ebx is used as the base reg in PIC. gcc 5 and newer can handle all possible cases properly where inline asm could clobber the PIC reg. I.e., it is able to deal with the "=b" constraint where an insn can overwrite %ebx and it'll push and pop around that statement. So far so good. Why then does this matter for x86-64 where PIC addressing is done rip-relative so %rbx is normal reg there? Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette