From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 F164E1DD525 for ; Sat, 20 Dec 2025 00:24:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766190270; cv=none; b=YkblK9e3tGWortUtUtvXTN0Fw30CJKZcUKnhia/PEXRE9v91DhlDRQBGegjrvK9BdoYKwPa5eKt5MlNIuLuz/leXBv6hdlDL5ItLMWoMnaZ69lXnklFxpNeZ4kA02MVmPKYNb4XYHzyOtM2qJlX2Jxs/VNrya/vTqUhvceYbVu0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766190270; c=relaxed/simple; bh=syNL3IBccYpgM4XQa579S4q5e5i0YdbZQrxYq0grD9M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RxG8LAOM8lITrGBc02uQ4AaE73HBMN3LiVWIk89EK0gRAD0WFVWVt3X6vHWAXzaLVjAHd4aIcKfbvCh+QLKsMXa58uajfb5rC7MUWmMw1w33oCAIJbSYzQttI4OQLgnq0kboEpkWPqMa9HTVtqkAeslgltviv8gUG2i2Br8d5IE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FcXPpM0S; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FcXPpM0S" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E5FFC4CEF1; Sat, 20 Dec 2025 00:24:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1766190269; bh=syNL3IBccYpgM4XQa579S4q5e5i0YdbZQrxYq0grD9M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FcXPpM0S4Yo1n9iJZpa7Gp4UnfkCSBL/fuAjasmxrO7X+kvz37WiqbaAQm8uL7I2h KQqjTNv1DPbNPbt+wV1mKBeJDb25lqsBW+r8Zcb6xxP6BLIFBAx4c8v86opN/OXsvB DLcwe1cPIHd2u1xPEMpEB9sPx3f0aaWZvxMMeDMHIVO+yHEY3d0kBgOgdjXEEspltP oFHjKUBpCfZNr8oaTP9rzpe+Rh0Dn4E6u11QhHH0IK29oUqPRkqXTRsqQAJoy89oup 3RzrE2p1cCg5jvaaFUyxqvWfnCsef/Yv+xFI9aqe1ON2qqkx1QYHFXSIaCgiucN3g3 Br9tmO6dT1YyA== Date: Fri, 19 Dec 2025 17:24:24 -0700 From: Nathan Chancellor To: "H. Peter Anvin" Cc: Uros Bizjak , Nick Desaulniers , Bill Wendling , Justin Stitt , "x86@kernel.org" , LKML , Andrew Morton Subject: Re: Do we still care about compilers without __seg_fs and __seg_gs support?? Message-ID: <20251220002424.GA3998744@ax162> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Dec 19, 2025 at 03:24:21PM -0800, H. Peter Anvin wrote: > As of Linux 6.16, we require: > > gcc 8.1 or higher > clang 15.0.0 or higher > > If my reading of the release notes is correct, then both versions *should* > supported __seg_fs and __seg_gs, but we have: > > config CC_HAS_NAMED_AS > def_bool $(success,echo 'int __seg_fs fs; int __seg_gs gs;' | $(CC) -x > c - -S -o /dev/null) > depends on CC_IS_GCC > > We don't even try on clang. > > Being able to actually rely on the compiler for this would make a lot of > things cleaner. For one thing, I'm trying to untangle a bunch of ugliness in > the code sharing between realmode and proper flat mode code... > > Uros, you seem to have touched this code as recently as earlier this year; any > thoughts? > > What about the LLVM people, any insights? Trying to use __seg_fs or __seg_gs in certain cases crashes the X86 backend. https://github.com/llvm/llvm-project/issues/93449 Is there anyone on AMD or Intel's LLVM teams that could look into solving that? Nick pinged a couple of Intel's folks but it does not look Cheers, Nathan