From nobody Wed Dec 17 11:33:41 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5415BC25B6B for ; Wed, 25 Oct 2023 21:48:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230236AbjJYVsK (ORCPT ); Wed, 25 Oct 2023 17:48:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229649AbjJYVsI (ORCPT ); Wed, 25 Oct 2023 17:48:08 -0400 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5141A3 for ; Wed, 25 Oct 2023 14:48:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1698270481; bh=OBn+A/l8SxiCM8pYkWDBMu9Vbe4Ej9dhbMErkCapgFw=; h=From:To:Cc:Subject:Date:From; b=evucBCtLcRhgzcOxhGkDUg2KZQigvdnMoGnGLRA/lXtNB4Px44KjpH5/wqK5t1qqV i9JRbGmj477Ws9acTCjwBCYgagzV7aBI2kzStfkPEd1nOKzmu0xGS+ZEOusZYPnB5r YTZPX7e7rR9hVpuSBKtp6vRaJj3wfxa+NuMKrC90QtmGgrva78UQ1iDkh6ffg192us ndevKMtGwXpayEe4dxW4t979pijO7qNTa9yFyME8JQ3Ki77VMkdd54cionaDaALXC2 Bb2P8rXFuV8cOlntv3A/PP3ZF4DS1uulwZfCPoYbU1rdCYMDUYdr7yKE2TZvzz/MCy RHrjScjSh95jw== Received: from thinkos.internal.efficios.com (unknown [IPv6:2606:6d00:100:4000:582e:ab84:d98b:7516]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4SG2bj2Hg9z1ZC5; Wed, 25 Oct 2023 17:48:01 -0400 (EDT) From: Mathieu Desnoyers To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, Mathieu Desnoyers , Steven Rostedt Subject: [PATCH] Fix: rseq uapi: Adapt header includes to follow glibc header changes Date: Wed, 25 Oct 2023 17:48:11 -0400 Message-Id: <20231025214811.2066376-1-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" With "recent" glibc headers, using with __GNU_SOURCE fails to have __u32 and others types needed by the rseq.h uapi header file. Include ctype.h and asm/types.h to fix this. Add a __KERNEL__ #ifdef to select the kernel vs userspace header includes. Also, remove the now unneeded asm/byteorder.h include, since it also causes its own build issues with "recent" glibc headers. I'm cautiously using the term "recent" glibc here because I don't know exactly in which glibc versions those changes happened. Steven reproduced this issue with glibc 2.37 on Debian. Signed-off-by: Mathieu Desnoyers Reported-by: Steven Rostedt (Google) Cc: Steven Rostedt (Google) Cc: Peter Zijlstra (Intel) Acked-by: Rik van Riel --- include/uapi/linux/rseq.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/rseq.h b/include/uapi/linux/rseq.h index c233aae5eac9..0f9cd8211ff0 100644 --- a/include/uapi/linux/rseq.h +++ b/include/uapi/linux/rseq.h @@ -10,8 +10,12 @@ * Copyright (c) 2015-2018 Mathieu Desnoyers */ =20 -#include -#include +#ifdef __KERNEL__ +# include +#else +# include +# include +#endif =20 enum rseq_cpu_id_state { RSEQ_CPU_ID_UNINITIALIZED =3D -1, --=20 2.39.2