From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 262A23858D3C; Tue, 24 Jan 2023 04:18:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 262A23858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1674533881; bh=47hh8GYXax6djXYLs/ByahZ/zRZYKAyCOT696Ch4BHQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RfPwpAu0ZpCY7QtRehtVFmiyr7y/WJsVQRZAks8EC3j2pRwJT1jzIxvSFvkTZ9w6+ z5mcEB949H8wbHjiqApEXNdhAnkNI2I60dyGbMltT+uHTW6oni9VPhUJqhCSQXlsqy T+DQwmxTUEHePDTGnwDGU2aQvGaDIn1IxZ94hbPI= From: "decui at microsoft dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/30037] glibc 2.34 and newer segfault if CPUID leaf 0x2 reports zero Date: Tue, 24 Jan 2023 04:18:00 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.36 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: decui at microsoft dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30037 --- Comment #2 from Dexuan Cui --- CPUID leaf 0x2 is emulated for a TDX guest, and currently the returned EAX/EBX/ECX/EDX are all zeros, and I see the segfault issue in recent relea= ses of glibc, including 2.36-0ubuntu4. If I change the emulation logic in Linux kernel to return 0xff01 in EAX, th= en the segfault is gone. 0xff01 in EAX means "CPUID leaf 2 does not report cache descriptor informat= ion, use CPUID leaf 4 to query cache parameters". So it looks like recent versions of glibc (2.34 and newer?) require a non-z= ero value in EAX? Please shed some light on this. Thanks! --=20 You are receiving this mail because: You are on the CC list for the bug.=