Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp22693rdb; Sun, 28 Jan 2024 11:34:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IGstwOJ/bptiW4Q5d4tlVjCIRja8PswW6YYFwqLPBZh4LmPspnK4ee4PCYw46wtG3hFPu+2 X-Received: by 2002:ae9:e416:0:b0:783:5b21:5746 with SMTP id q22-20020ae9e416000000b007835b215746mr4027406qkc.43.1706470466041; Sun, 28 Jan 2024 11:34:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706470466; cv=pass; d=google.com; s=arc-20160816; b=v+IKRjWpXqSz7enwvDbN2zoBKgfGtSYXYe1w343G5XL56RdIHEGpOK6NNAQxWpyML/ 8PDrQMoypGpWIZwdvwldoH6n8rgtGaG13zIljFVXc6re5W14SLN5fKBoJ1ZzqBy+RVZx S/mTgqE65GF2V0TONDC0H0nmtmgoE/MQbKJ6HESPfZfdVpRX/KAGctin7EZydKGPVrNT Hz870QcP8DYsIh+h62ma3L7tkxIlovXVWoU4Mj5tFGEbV/5M6n8K06/151lXVbMn9Uyr ekD4NTe/J5w8RblNWY9B/meBWbElKDMIc2hz0fp1tsfvO1km7JZKDmRINVcuZxWtyS6y ONeA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature :dkim-filter; bh=96vGipOx59lTT3wlSdaxzIA8bgY6RlhghuOy110T7sA=; fh=FKtJ4giiRoKFjPlK0XSoRzYoVbbZut6YhpHrroivN48=; b=q8jb3GmyX1tkKNuRt4NVZmdVdJD9G4d798zmQ1A3GqDOzvntYhXIA1ncIuYAgbAVyC uTZ/t/DLTPHLjCSjQTmQJrKDEQnWDbvCWSmOvKeDwNhvF17psRjd1k3U2+TWWkYdsEev 8z/po0eXi42rnjD3LjxUvjR2xm0rPKujXiXIAjKr7pvHuBzymEp5HGifcosaRwskCBYn G1goimjYs5JjM9uLNLb7d6fMdmCBghsHWGbenyW4C9+fDc3Ea04A66DBJVL/Oa/T2ZXl 1WKwIqKa1yOnHDh0C16h4/wT4n+fEnWZEmnsrjNZQlOQcTeNAgZixH8jyE4uQQSYRk4m ugvw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@zytor.com header.s=2024011201 header.b=GxElQOIg; arc=pass (i=1 spf=pass spfdomain=zytor.com dmarc=pass fromdomain=zytor.com); spf=pass (google.com: domain of linux-kernel+bounces-41907-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41907-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id bs13-20020a05620a470d00b00783fee83582si483184qkb.141.2024.01.28.11.34.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Jan 2024 11:34:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-41907-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@zytor.com header.s=2024011201 header.b=GxElQOIg; arc=pass (i=1 spf=pass spfdomain=zytor.com dmarc=pass fromdomain=zytor.com); spf=pass (google.com: domain of linux-kernel+bounces-41907-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41907-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C82CF1C21727 for ; Sun, 28 Jan 2024 19:34:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 457BA1F16B; Sun, 28 Jan 2024 19:34:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="GxElQOIg" Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 29BDF33CD3 for ; Sun, 28 Jan 2024 19:34:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.136 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706470459; cv=none; b=s50vWDK3nCfycBpYzOCiCEruPXCC4D9PNS9gYt8TPIF2F9XN3OUtEELvp9XShDFJTkXDOgm9qQjx/wEABWyqr9m4M1uiY/qnQy+XbnRKrXkDYCnpdIUiCobbTH5/1tn67QGMtjj+Bue9YbqwTA1PvrVilj4upNWVQXmOi5eTmjI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706470459; c=relaxed/simple; bh=zAyr8u6NAVcez0p7NSlziYI9cWPcjuKrqp86JKbpV0I=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=XWH/XMb9fzmzwL8xUiBuuuJ0fdR9wdWSC7NHwLVL4c+N4fFYlfxfnwo6xYH/irqX3Dv52NpOWbYK4LFXoovG0o5zrtKy41Xtn+MeB7Lof/AJgzx3njyHXtDRqwQQ6cJP2AGOrBw8JHaqq0WSZXQyNO5/DODVvFl8EnRYh6aUsT0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com; spf=pass smtp.mailfrom=zytor.com; dkim=fail (0-bit key) header.d=zytor.com header.i=@zytor.com header.b=GxElQOIg reason="key not found in DNS"; arc=none smtp.client-ip=198.137.202.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zytor.com Received: from [IPV6:2601:646:8002:4641:eb14:ad94:2806:1c1a] ([IPv6:2601:646:8002:4641:eb14:ad94:2806:1c1a]) (authenticated bits=0) by mail.zytor.com (8.17.2/8.17.1) with ESMTPSA id 40SJXPkw1789355 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Sun, 28 Jan 2024 11:33:25 -0800 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 40SJXPkw1789355 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2024011201; t=1706470406; bh=96vGipOx59lTT3wlSdaxzIA8bgY6RlhghuOy110T7sA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=GxElQOIg00h+OinI2TjStUbTe8pHUW9FBVErhCsvEUHcfV332f7n1MvQi4VNTO9LD HHkeNubnVL/z+FoUeWCJSkMw5bjym1vTScRHo6R+z9EQw7jDGS+Bf95CobbSLWdStB DQXjYiiiZuRoxoA/MCIC5GRtdMJIJBBR/KX8JCPMjcybil6aJzKj2mKc5BlwXhqrdM FKfHLigmYPVOQa2MlxwfXE0uObucmN7x1DVLLCl5TA2PHEwtSTxv3fA2ax7sRpLABb wgTfVcI4eFsftj4CY09G/kIUXRM0fJEjGlabPs3QazmUjTxxBc8YwwMTBYB7GtB6OZ gtx/Jbw8NFZPg== Message-ID: <882e400f-913b-4ed5-9611-ef87cd8b58b2@zytor.com> Date: Sun, 28 Jan 2024 11:33:20 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] x86/fred: Fix build with clang Content-Language: en-US To: "Li, Xin3" , "linux-kernel@vger.kernel.org" Cc: "tglx@linutronix.de" , "mingo@redhat.com" , "bp@alien8.de" , "dave.hansen@linux.intel.com" , "x86@kernel.org" , "luto@kernel.org" , "Shankar, Ravi V" , "andrew.cooper3@citrix.com" References: <20240127093728.1323-1-xin3.li@intel.com> <20240127093728.1323-2-xin3.li@intel.com> <49BA730F-E9A0-44AA-AB62-D2F40C5C11DD@zytor.com> From: "H. Peter Anvin" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 1/27/24 11:46, Li, Xin3 wrote: >>> diff --git a/arch/x86/entry/entry_64_fred.S >>> b/arch/x86/entry/entry_64_fred.S index eedf98de7538..5427e0da190d >>> 100644 >>> --- a/arch/x86/entry/entry_64_fred.S >>> +++ b/arch/x86/entry/entry_64_fred.S >>> @@ -43,13 +43,12 @@ SYM_INNER_LABEL(asm_fred_exit_user, >> SYM_L_GLOBAL) >>> _ASM_EXTABLE_TYPE(1b, asm_fred_entrypoint_user, EX_TYPE_ERETU) >>> SYM_CODE_END(asm_fred_entrypoint_user) >>> >>> -.fill asm_fred_entrypoint_kernel - ., 1, 0xcc >>> - >>> /* >>> * The new RIP value that FRED event delivery establishes is >>> * (IA32_FRED_CONFIG & ~FFFH) + 256 for events that occur in >>> * ring 0, i.e., asm_fred_entrypoint_user + 256. >>> */ >>> + .fill asm_fred_entrypoint_user + 256 - ., 1, 0xcc >>> .org asm_fred_entrypoint_user + 256 >>> SYM_CODE_START_NOALIGN(asm_fred_entrypoint_kernel) >>> FRED_ENTER >> >> .fill and .org here are redundant; in fact, there two directives mean exactly the >> same thing except that .org implicitly subtracts the current offset. > > Ah, right, .fill already does the job! > > I will remove .org. > Incidentally, was there a problem with .org ..., 0xcc? Not a criticism, I just want to know to better understand current binutils limitations. -hpa