From mboxrd@z Thu Jan 1 00:00:00 1970 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 4C3801E5724 for ; Sun, 16 Aug 2026 21:16:11 +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=1786914972; cv=none; b=Qvl9Q4u3P92LMiRs0aRFlRiPx2KsvT3bWIl50gUtIAG2R8fpKsQ4AK3RaPDy7/3Mp55Rb4KjjkrFNwWALX8eg+7wyRnT0P9gmbzhYtSf4fl6pPpuGwEtUdOLqLgLlOO4aynj4a18nlyKV8em7h7dOpGC006W3vsWArIjfrO9MxU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786914972; c=relaxed/simple; bh=CIghsGfXfXLj6m4hDdKUwOlXEJI2FT5sUiLHqhq9bZc=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=pX4+O8ua2j0MLUCKYqLrS1ZqvonE4WMRS4GaQrC7ypFbONk6ry5uxi7UdjWcBot7qZC3D2eqdu5X/lr4Mr1OrQczxvZpildRM0+JYPdfv9qw5MCd3x3gSvVHL6KOR3pRlEX7fFJxy/z/cRS9RW+W5ew/w+4nbHsji01yJtiAT5w= 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=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b=Y8njSBlD; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="Y8njSBlD" Received: from [IPV6:2601:646:8081:8d71:1832:d005:9e73:5869] ([IPv6:2601:646:8081:8d71:1832:d005:9e73:5869]) (authenticated bits=0) by mail.zytor.com (8.18.1/8.17.1) with ESMTPSA id 67GLFgo13877416 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Sun, 16 Aug 2026 14:15:44 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 67GLFgo13877416 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2026072801; t=1786914944; bh=XcG8Ue0DL11cprjh25e61xnm9MdnBRV2Vk+bV++MhOk=; h=Date:Subject:From:To:Cc:References:In-Reply-To:From; b=Y8njSBlDweh3WhT090reaPuRv2sb1vIUVzV+CUrfyR98ZeupQ8fhaikxfbOX5a+aC BqvC/JN1SLynvQkRdAqcQrEpYl1cUcUsaY4Sy1/RwDGNR8ETT2AgOie9oyo1/7n1fa aQVZday2icJ68raGfuseHDek2QV75GubglEU77kDLjS++MqiR5WSyVXv42WGujcrRa rBrQjU5H6g/jqxaU9si/DKAkuBM0MQUbKkvP73OU5/wonEY7zDCTwSqGkrFku1/5X9 0Ifob6WwcuKVBy7tsNPR5dxYgC7iEnUSYe9V/3b662KXtz6zt5y2cbVHs3+3nMjKRW 0dJeGpEQ+KZIw== Message-ID: Date: Sun, 16 Aug 2026 14:15:36 -0700 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: X86: Question about GDT loading From: "H. Peter Anvin" To: Alexandre , x86@kernel.org Cc: tglx@kernel.org, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, linux-kernel@vger.kernel.org References: <84120379-65b4-4251-9e09-1672e6bc8d79@zytor.com> Content-Language: en-US, sv-SE In-Reply-To: <84120379-65b4-4251-9e09-1672e6bc8d79@zytor.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2026-08-16 14:12, H. Peter Anvin wrote: > > For 32 bits that is perfectly safe. On 64 bits, it ends up taking up slot 1 as > well; this is *not* safe for a kernel address as it would be interpreted as a > user-space code descriptor for a single-byte code segment somewhere in the low > 16 MB of memory, addressable as 0x13:0. This could be used to derive bits > [55:32] of the kernel GDT base from user space. Corrected: addressable as 0xb:0. > Therefore this must NOT be done in 64-bit mode. Formally speaking: long mode. -hpa