Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4218434pxu; Mon, 12 Oct 2020 12:37:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2Wti40XkBolaPN999TRaSob/w2Vg88O8AR8CdP+p183D8jD2ZMr07yC0FIXAAb094DP1X X-Received: by 2002:a17:906:5247:: with SMTP id y7mr28981341ejm.503.1602531462686; Mon, 12 Oct 2020 12:37:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602531462; cv=none; d=google.com; s=arc-20160816; b=R8vti/biGFIBHtJCEFNP5EP0AvrWIOfBXKDqmerfQIHRucaP5LuFjDREKD+On1ekBq H4GQPB1jTS/kwQ27IeGXGEUpqaewoGlw/4GTM88yCwEASBWH43rCMBpYk2hZtB47uZNb s7UP5cvfITLYBpsk8pioU1JNdQON0Cl4atDA+EF1L04DrITd2xdJU389FJE5u9lBUbum Zs4ADZn24EPTL8kRPT5k9M/HDm0H9vzYYLgLqWTeSART/KcYXW+o1urlNb1I5t4UEyUe caruBWvYDfRMA9QggcwCwtNFtcYdvZ156PANlE43sKw0hSrYErsOx1j1ceb+W+Jt5xej Z5ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=4IEcErwKura8IVO2XV3PGiHRSSS7854fDtA49nhFrcw=; b=FCYnk8vBEuN1syWLu7Mvwpzh7+SY0xb4e406QI/I+e9V/ZHlzjlE59hXDACv5WvCQu 71huDmrBknX6+2GS/ZaG7i4gAZDUzEShywgxtzT9uwtYuNAehlmzosVUW6mhBSBpAOhC C/jpqZBrv0QhQVKZEv4IK95826s/I4MaZr1zHElwCGc2QYmpv6GCs4MaxU0M4jIVe2JJ hsWvby1vs78tTgqhzk9QwVY/mWZqVwtCV90acpHTmhSFcA/1+Z7GszHkxIKr79LD55zQ 4lclcfn4VvJkCMkZZCXaBOoHadraRL2P237fw/HjIWWkpTA8mgBXapdRVdD1jK1uBNkA Yo9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=a+gxzMp4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ca6si12753019edb.10.2020.10.12.12.37.18; Mon, 12 Oct 2020 12:37:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=a+gxzMp4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730993AbgJLTeK (ORCPT + 99 others); Mon, 12 Oct 2020 15:34:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728031AbgJLTeJ (ORCPT ); Mon, 12 Oct 2020 15:34:09 -0400 Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7576C0613D0 for ; Mon, 12 Oct 2020 12:34:07 -0700 (PDT) Received: by mail-lf1-x144.google.com with SMTP id d24so19498174lfa.8 for ; Mon, 12 Oct 2020 12:34:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4IEcErwKura8IVO2XV3PGiHRSSS7854fDtA49nhFrcw=; b=a+gxzMp490jjatDYg1NAvpcsRkEU9T02SFYLU1fU2rakRbdcEbNM+TLkxTXZ7D0apX zKj1nkwdSnNkz8AYfbO198EuKs2R8WwiHVchARb3yavRlud4m/3KaNJwj1LU4RxaMfWm 3UnEeLM99kCP0N66IxPsHHHI0WZvL/t3jgFCQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4IEcErwKura8IVO2XV3PGiHRSSS7854fDtA49nhFrcw=; b=K9rnefFVEmXJtxRFunfdPlEkQ6EfeEndgd0bD9AbhEOGeLWOa5BiCiNKdIWSpp8qyf 6zYvRJcKxgX3w9ogmIAJPDHMnHa2WqCwWAcAQ24kIEG3pbLzqWONePUI4Bx3Wo9FOZFW 9dDOA1cfqpewU7R8I3iflysDduOghZwBUJJS6frgvw0rnGg3rk+vNHouV/HozEeWpga4 cVdyNcep5U9PSh70rXywKmicxLvnbeJwcjmXixn4FiBJ9CaYqs3BSZr/mdyojKAnwGzy VKE/WS5ER6aZI5tYvIZn66UZCToIW1mNUhgWZG+YFicdPxbc/GshRhfaSMxU24l7qdv/ YeSA== X-Gm-Message-State: AOAM531FbDkxH+ZMwdZbE3F9YPRie4h+Ad6ydhrO2xaZs1/h/yOwcycs rSuzsa949Vf3hyy7c1Etn4U6rukSGFsM9A== X-Received: by 2002:a19:7418:: with SMTP id v24mr8588276lfe.440.1602531245943; Mon, 12 Oct 2020 12:34:05 -0700 (PDT) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com. [209.85.167.49]) by smtp.gmail.com with ESMTPSA id n125sm2899140lfd.7.2020.10.12.12.34.05 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Oct 2020 12:34:05 -0700 (PDT) Received: by mail-lf1-f49.google.com with SMTP id l2so19545479lfk.0 for ; Mon, 12 Oct 2020 12:34:05 -0700 (PDT) X-Received: by 2002:ac2:5f48:: with SMTP id 8mr2620988lfz.344.1602531244892; Mon, 12 Oct 2020 12:34:04 -0700 (PDT) MIME-Version: 1.0 References: <20201012110557.GK25311@zn.tnic> In-Reply-To: From: Linus Torvalds Date: Mon, 12 Oct 2020 12:33:49 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] x86/asm updates for v5.10 To: Uros Bizjak Cc: Borislav Petkov , x86-ml , lkml Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 12, 2020 at 12:24 PM Uros Bizjak wrote: > > I don't think it is even possible to write to a part of a register in the asm. An example: But this example is the *reverse* of what I worry about. I worry about the asm writing not to a "part" of a register, but to *more* than we told the compiler we'd write to. If we told the compiler we're only writing to %al, then I could see the compiler using %ah for something, and scheduling that "somethihng" to after the inline asm that said it was only modifying the low bits. Now, I do believe you're right that gcc (and probably clang) simply doesn't track %ah liveness and clobbering separately from %al. But it still stinks as a concept when this isn't actually documented anywhere I can tell. See my worry? Linus