Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp421713rdb; Fri, 17 Nov 2023 02:46:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IFYkX2nI9z14zXeAR9WE3Igyzp9Ed0K+BeM+pqHe0VVnKPqGrX7NVQaAa5600yWPR3/XXBx X-Received: by 2002:a17:903:2012:b0:1cc:482c:bc54 with SMTP id s18-20020a170903201200b001cc482cbc54mr10059283pla.48.1700217980724; Fri, 17 Nov 2023 02:46:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700217980; cv=none; d=google.com; s=arc-20160816; b=OmyLaquuBWeWqwKavO5iACEyRKZMMldNR51PHhGgZT/oUdZM68PJEhEMXC0IKpLu5x 6JZ0zYM9D3S9fwRBmrwGsJ5o6s67iufdByvCQR0gMd1uHAIjkfTUI7EKPpaXkSxwo4m8 bh2hyBP1dY30HDbXiE8NZNhjlC4/otCZg67JZ7nI/mCHCuFUPsiDjzgRNoCp1NcQAecW AMa6vlwOnlFFy79LZE7KxpcrgCFvW42hvS2cOOUG+Peqank0KsWOc7m9aC07dwm5G3W/ GnOmW9coHj7KpZT2HFP4GZZbFB9rLUzidz3EHtp1oPhh1LYgV0BSp4YJvBg5t+QMsj1X cdog== 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=ldL14sPRKeUX3Mhb0trNw2Eakc7AL7vqPqxmndXqubM=; fh=wuoRW44pFW5GZX3UW9CBcJ1IVx2YX6qvWOw5ORh+S2Y=; b=QLlmBYeNQ7HJHw/pQg4Q+gl2mXJnlRYHKmjSf5fRcxqY4GxCUIC/zSRuDQ4drfyy/Q UFAdmXv8M8u7nU004LTLVWnSioOCzNjzrz5LNwgHQCevk9+tEx3DEgoO/WGQdXC3gS3H +ge9qVWuSa45umz/WBK4UD934EMpczee48ZcorHlGeDnYp3KSZjq78q5xzpBsEkfBB9+ CkOa5hWO5GzC4pBhU/Q/wq6bAFGIcdfCBhFbfbPxoLa5mwhFO5QCFjCZahYpmUboZEpV o+9rKM3NNQx8s7ifVDdghRh7xyWwExBitD6G8rXrFKyvPtN0d9myJVowXrnjKX8WpCb6 D4oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=WTydDOxz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id jf5-20020a170903268500b001bbaa5e95fdsi1538287plb.102.2023.11.17.02.46.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 02:46:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=WTydDOxz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 2E1438076E6B; Fri, 17 Nov 2023 02:45:27 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345802AbjKQKpM (ORCPT + 99 others); Fri, 17 Nov 2023 05:45:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230085AbjKQKpK (ORCPT ); Fri, 17 Nov 2023 05:45:10 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BF0DBC for ; Fri, 17 Nov 2023 02:45:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700217907; x=1731753907; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Ij9y/YkrDfTlz50Xi+Zj9XJQ6C4S7/BoXXJIz6rNYLA=; b=WTydDOxzqD9VNCcCAuoHG/K7GsxShYD934Yb9WeDK4lGUtSF5PcKhrtm MdYGwYq+2b+M3SBt3Q1HtCNlO9ctYUH3fctVVluaYrRAIvjLPOeVvT5mn 1jsJfAsFNYGb2UxjXhDGTuHlU6rQvR5NglsomygFXgjidwIM+Bobb3dge vZBEUx77UHk4zXHgWo7CMhjXTDeTFnOfrgdt9c0JgXAQt9rwsnQ2hKsmJ qjkHh5YpDQ32tyAvhsxtqXKgYYpw0Ox5HlVIbxiFpcbjeuwjkUDqNboET L4Ng8182pFfBwGidw6RKheHl2glhTd95gW0Qg6kw8JvEEj6rzPqp84vXA A==; X-IronPort-AV: E=McAfee;i="6600,9927,10896"; a="477493889" X-IronPort-AV: E=Sophos;i="6.04,206,1695711600"; d="scan'208";a="477493889" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2023 02:45:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10896"; a="1012895375" X-IronPort-AV: E=Sophos;i="6.04,206,1695711600"; d="scan'208";a="1012895375" Received: from fsforza-mobl1.ger.corp.intel.com (HELO box.shutemov.name) ([10.249.44.215]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2023 02:45:04 -0800 Received: by box.shutemov.name (Postfix, from userid 1000) id 4858410A325; Fri, 17 Nov 2023 13:45:02 +0300 (+03) Date: Fri, 17 Nov 2023 13:45:02 +0300 From: kirill.shutemov@linux.intel.com To: Peter Zijlstra Cc: Uros Bizjak , x86@kernel.org, linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" Subject: Re: [PATCH -tip] x86/mm: Use %RIP-relative address in untagged_addr() Message-ID: <20231117104502.4p53qqldwmyuyqju@box.shutemov.name> References: <20231116191127.3446476-1-ubizjak@gmail.com> <20231117094103.GM8262@noisy.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231117094103.GM8262@noisy.programming.kicks-ass.net> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 17 Nov 2023 02:45:27 -0800 (PST) On Fri, Nov 17, 2023 at 10:41:03AM +0100, Peter Zijlstra wrote: > On Thu, Nov 16, 2023 at 08:10:59PM +0100, Uros Bizjak wrote: > > %RIP-relative addresses are nowadays correctly handled in alternative > > instructions, so remove misleading comment and improve assembly to > > use %RIP-relative address. > > Ha!, it might've been this exact case (and Kirill grumbling) that got me > to fix the alternative code :-) Nice! :) > > Also, explicitly using %gs: prefix will segfault for non-SMP builds. > > Use macros from percpu.h which will DTRT with segment prefix register > > as far as SMP/non-SMP builds are concerned. > > > Signed-off-by: Uros Bizjak > > Acked-byL Peter Zijlstra (Intel) Acked-by: Kirill A. Shutemov -- Kiryl Shutsemau / Kirill A. Shutemov