Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4617550pxu; Tue, 13 Oct 2020 03:00:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJye8DM58jJh9ta++1verUuMPudcB2Fzq2roOCl6+jCznFA11VdG6iQcVZUO64GxY/J57O4j X-Received: by 2002:a17:906:f988:: with SMTP id li8mr19687606ejb.93.1602583222029; Tue, 13 Oct 2020 03:00:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602583222; cv=none; d=google.com; s=arc-20160816; b=z2Xgiz5IcyvxVFSvVHQqezztNjNWm83zuAkWT8lfuUy5VKpsXcLOME0fKa0vrE7VBT Myq0vMdIPICYB7XkzJon3F2viGeUDrmpPwEsR9JZ+isiy7GZJlIf+vqHu0KVNBUhyyHB aeckajlciRF5zKHBL2eCkwgbX3XbJCt+pK6pAIiVenCZS0GSY6DpmWEUclSGGHl+g2P2 6eA6yfemCYA/RkVlBuOmfAlYKeo4SdsdbXfuzSmCNwEQiWrUp7eIn2uGWBRHGJa9yWSp w75Nivw7sP62Du5CR7mvCNVUgryhrH9BwYEXQBqVIo9pwNxyRRI7Oh2t5w6RWAdiA7X5 uAcQ== 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:date:from:sender:dkim-signature; bh=/bmJ0xS/t+paSfxBz6VHen1esJkSFeYNVD1TnMG3w+I=; b=zVYVjOY0p5TBpkaedjd35oH/w+LRZMsIilT4roYqO0KpgtMDs8ht/s9a6em6lWFaP0 ny8nLeEQuuZHGw0UfVlNOIsidnbLBHiIphBR3CAOqFtQTYA/cj6LDqeLOG8hIwb3Y7Ct xa9SJ2zNeJZ7gAUsirRnJSsO3Lq39n/J4SokFMs9pHW61QvGIa2KYh2QQfWbT12CDY46 YtUV1hs+A95TpEagwTLvpSG1pnXsj4dLt6DAY5iMQjnZXWO+EZ40K/LVhIJXD8hezwvF wEHq3jdTr8FPFd8CzSP60zVCwolKad7o97JOA/gkwcUlBeQhmYYEDdk1f/uB6N3FhpUA /inA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rKpeglS+; 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 v9si14856078edj.607.2020.10.13.02.59.59; Tue, 13 Oct 2020 03:00:21 -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=@gmail.com header.s=20161025 header.b=rKpeglS+; 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 S1729357AbgJLU3j (ORCPT + 99 others); Mon, 12 Oct 2020 16:29:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728392AbgJLU3j (ORCPT ); Mon, 12 Oct 2020 16:29:39 -0400 Received: from mail-qv1-xf2d.google.com (mail-qv1-xf2d.google.com [IPv6:2607:f8b0:4864:20::f2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BC87C0613D0 for ; Mon, 12 Oct 2020 13:29:37 -0700 (PDT) Received: by mail-qv1-xf2d.google.com with SMTP id s17so8961049qvr.11 for ; Mon, 12 Oct 2020 13:29:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/bmJ0xS/t+paSfxBz6VHen1esJkSFeYNVD1TnMG3w+I=; b=rKpeglS+cpj0cL4bLQG4qjJD2EdoXxZrsjKeMWtx7dvIcEoiQzv/rIZg216uiA9WQ0 7pzrRoDItnu7MHHjA3KixwliSEdhKdxiaSMH6kjaM07yqkjVfBGHGDd0ValdgMFEsrpl 3a7Bodt9PDW7bfc/9T3IVMYMPTXODxf8HNe4pvqp3W5MVGMJ6MwGO8ETKfE/LJwkI6s6 Kt2AJpnUGtUxFaFCNNVxjXz43NYVE8h8cXibfKLRfysaTlT8Sdix0RuX2jOaFcZBpesk GyVKnGa3ZL5dNpciyVpn8/cvcVTFVzwPF2FY8eAImXAFmB8TGZeCeurNSWNAkntbkyE2 XuNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:date:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=/bmJ0xS/t+paSfxBz6VHen1esJkSFeYNVD1TnMG3w+I=; b=fvtgbq1BB2QA6fAhQcqT8MADAOam2EbdC925pC0L6Zc3XhOrNr6TmKRWvdZOn9RdiR Qn/KMXr4GYwhk1F7Do8YTxvba9HlXmOYpFyArHzQFnHP4oCuWWMElTXF3J0f62BMVPd8 2taSAugNjSmL8+AlNwH9+Kl4iQgDD3v0foo9XYmJXUSMrGFO0C8pTrxJoLQWLuXZ9gNc Q71J11UIvWT5rshUQUjhftcRruRgsZLjrGFZssV03XSj9aE6yc4ru9XtAppRC2zMXMDQ XuvW//oGzqXOFqwO99IeRoDTFLBe4HC4EwWE+z7U8fOsGNBNyUBVWKqimUvMKZc62kcO 2H8g== X-Gm-Message-State: AOAM530yOBWCp2RcCSEMonLLbu74ykXXzAt3we8sx3o5KTcvdR31570w nTV6g5oIdwP4XuHSvAdEfWk= X-Received: by 2002:ad4:59cf:: with SMTP id el15mr13217971qvb.17.1602534576720; Mon, 12 Oct 2020 13:29:36 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id h68sm13493307qkf.30.2020.10.12.13.29.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Oct 2020 13:29:36 -0700 (PDT) Sender: Arvind Sankar From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Mon, 12 Oct 2020 16:29:34 -0400 To: Borislav Petkov Cc: Uros Bizjak , Linus Torvalds , x86-ml , lkml Subject: Re: [GIT PULL] x86/asm updates for v5.10 Message-ID: <20201012202934.GB818459@rani.riverdale.lan> References: <20201012110557.GK25311@zn.tnic> <20201012185547.GK22829@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20201012185547.GK22829@zn.tnic> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 12, 2020 at 08:55:47PM +0200, Borislav Petkov wrote: > On Mon, Oct 12, 2020 at 08:41:32PM +0200, Uros Bizjak wrote: > > On Mon, Oct 12, 2020 at 8:11 PM Linus Torvalds < > > torvalds@linux-foundation.org> wrote: > > > > > On Mon, Oct 12, 2020 at 4:06 AM Borislav Petkov wrote: > > > > > > > > * Use XORL instead of XORQ to avoid a REX prefix and save some bytes in > > > > the .fixup section, by Uros Bizjak. > > > > > > I think this one is actually buggy. > > > > > > For the 1-byte case, it does this: > > > > > > __get_user_asm(x_u8__, ptr, retval, "b", "=q"); > > > > > > and ends up doing "xorl" on a register that we told the compiler is a > > > byte register (with that "=q") > > > > > > Yes, it uses "%k[output]" to turn that byte register into the word > > > version of the register, but there's no fundamental reason why the > > > register might not be something like "%ah". > > > > > > > GCC does not distinguish between %ah and %al and it is not possible to pass > > "%ah" to the assembly. To access the high part of the %ax register, %h > > modifier has to be used in the assembly template. > > Btw, did those get documented in the meantime? I can find them only in > gcc sources: > > k -- likewise, print the SImode name of the register. > h -- print the QImode name for a "high" register, either ah, bh, ch or dh. https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#x86Operandmodifiers