Received: by 2002:a05:7412:8d11:b0:fa:4934:9f with SMTP id bj17csp626447rdb; Mon, 15 Jan 2024 08:15:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IEoRY3AA7w/IWZu5MRWEaSqYbyR6jcRg3a1I6bDNro6n5HCLbuuzDGoGWvDDZnHk+UEcuSP X-Received: by 2002:a17:903:11c9:b0:1d5:5984:df52 with SMTP id q9-20020a17090311c900b001d55984df52mr3392365plh.60.1705335320691; Mon, 15 Jan 2024 08:15:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705335320; cv=none; d=google.com; s=arc-20160816; b=hl7N5oUZt82B0wa49ZYocbOu9a8vny6NnWEke877OwBB6X438uOSZwybbtwcbnqIbO qy81v24minX72Qm8S4S7JGcwLxrBiBQY+fMEmpbx3vwsD8dXenyLLAKHjLkigM3zkNNP SD8Zy/fROO7/hfk9MEy1jNzSjU2jmBJDNwRhoHVPINzVXri2eCVf3MVnFWNFj0en1m7y ANTbuBqJb6SLKwfOxCpKsH3x7X1zl7F5vSlle1zp8PEBVDChAwoG7q0Esh6EBWkmaGqq 2Q5OnIQQerHT8ErRfGdxGccutK4gYsiZ+IlhqMLU1WD3UsuJQCWxGcgiHXXv/rrCoIL3 WVtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:cc:to:from:date:references:in-reply-to:message-id :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:feedback-id:dkim-signature:dkim-signature; bh=OwwV079+Ib4EhCbveDYoIfXqeXgw7sWlHiHGG0LHoH0=; fh=u31YFGCuU994I7FCTODmkMsL1X/U4Nj1t1cLXC/dTgk=; b=jsa8tLniP8zfKcFeTRhrWI9hF7JcPK4m2WM3I1n7ww6rz1i60o2/0WyLZFV8ArNUP+ VO5ED6YEAv4UtXpSfH7zy6A3H/+V/T5U2T4Uh7g4o2DmXE5EDQ9vW3xUib8w/rMJgvLn 91/+DKfQ8Wy5/7VEjwd6TLYLQ/eTulg5jLmwbiUOLeYQeQ7We35hLiXBELjqsB0C0IwY TkXrguXZZ+fMFYu2d8Iq3XYkCNMzwPDtob8us3rb9ISmMK1lMVr7+0pudmvm0ner6nZe YRJmghytd+FbFnzH4wKKJVwwDSHzOlcz2IquHCOQT7hY33KiflOMk5LCuDceEkdx8YJa cu8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=iY3DUK4+; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=eybOU38d; spf=pass (google.com: domain of linux-kernel+bounces-26232-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26232-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id kh4-20020a170903064400b001d508d39757si8897892plb.550.2024.01.15.08.15.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 08:15:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-26232-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=iY3DUK4+; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=eybOU38d; spf=pass (google.com: domain of linux-kernel+bounces-26232-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26232-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 5A10428460E for ; Mon, 15 Jan 2024 16:15:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 41C6417BA5; Mon, 15 Jan 2024 16:15:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="iY3DUK4+"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="eybOU38d" Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) (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 C644F17BA1; Mon, 15 Jan 2024 16:15:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 317F13200A24; Mon, 15 Jan 2024 11:15:07 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Mon, 15 Jan 2024 11:15:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1705335306; x=1705421706; bh=OwwV079+Ib 4EhCbveDYoIfXqeXgw7sWlHiHGG0LHoH0=; b=iY3DUK4+l4x1zKVZt/k7PFIF2T 9GDD31aL2Nj9MbIq/iW7zEJNz9xwhZSOc8HNPXnB4499+tAIHkyhQOxRcdkA8UI0 6bZrxDFvUpAuE5HvEcMDHuRRQKMgpwH5AHEiMEYz2eHblWWvEnRxz/RI+nal6KfK qiLKDTtWqA/mJxfiuoW0YMRibjnO67CI0PTGamje4QsXWuD8pjxM7cuJapiZwzYr 8VL49wvb+zmV7024PyQn/cl/SjVr1H5v49CHj5RY739qeryfkqHOmQf9F6DJcoM9 UndCI49i5EKETL7YRzJ0AP1oejWlcO2XEt/dkkVgMoto8/eQ2qrBYjJizW3g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1705335306; x=1705421706; bh=OwwV079+Ib4EhCbveDYoIfXqeXgw 7sWlHiHGG0LHoH0=; b=eybOU38d2C55AfxnNCB5YYoTKubKkcYLl1HuKNMxsaAE CYwHMEPVdF+HoQWWmEp7ZfUhPy55abq7fsr82qLxEE35BLgUxAn0LylyfO0Y5xlT VxhrN1ddFTZa5mDYp5WDc8qS/z8MW5I5nbxWi0XMcp2fEVpAo+bBm0cZGEteVLBH /YLr6Cuwubvtb+4b1aO2JSI9PqTtkMZfFg9LpKiB77EaXO+4VND95uwRZep+Vr5J pAj5l/2q245PGZPp0bgzDAY8f2dnfaqp+5dDT3AWjLkby0x2mKpFgH80tRLSTyxj v+HL0W/cPsVxVZ+ZRFR3nJuL/29wIUoq0gfi8qXBtQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdejuddgkeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepkeehtefguddvleejvdeileeifffhueevgedvheeiudfhueevgfehkeeitedu keeknecuffhomhgrihhnpehsohhurhgtvgifrghrvgdrohhrghenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrrhhnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 58AA2B6008D; Mon, 15 Jan 2024 11:15:06 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1374-gc37f3abe3d-fm-20240102.001-gc37f3abe Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: In-Reply-To: <20be7b9d5b8c0bef2a35da3d207c15eae75bfd4d.camel@mwa.re> References: <9e97eb50-f9a6-4655-9422-fa1106fff97a@app.fastmail.com> <491250ba57be2ab983048ffcf5ffd2aec2bedb9e.camel@mwa.re> <1a528414-f193-4ac0-a911-af426bb48d64@app.fastmail.com> <20be7b9d5b8c0bef2a35da3d207c15eae75bfd4d.camel@mwa.re> Date: Mon, 15 Jan 2024 17:11:50 +0100 From: "Arnd Bergmann" To: "Antonios Salios" , "Dmitry Torokhov" , "Deepa Dinamani" Cc: rydberg@bitmath.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, "Jan Henrik Weinstock" , =?UTF-8?Q?Lukas_J=C3=BCnger?= Subject: Re: element sizes in input_event struct on riscv32 Content-Type: text/plain On Mon, Jan 15, 2024, at 16:46, Antonios Salios wrote: > On Thu, 2023-12-21 at 14:38 +0100, Antonios Salios wrote: >> On Thu, 2023-12-21 at 12:28 +0000, Arnd Bergmann wrote: >> > On Thu, Dec 21, 2023, at 08:56, Antonios Salios wrote: >> > > On Tue, 2023-12-19 at 13:53 +0000, Arnd Bergmann wrote: >> > > > On Tue, Dec 19, 2023, at 02:50, Dmitry Torokhov wrote: >> > >> > I don't know what __TIMESIZE is, this is not part of the kernel ABI >> > as far as I can tell. __USE_TIME_BITS64 should be set by any 32-bit >> > architecture if the C library defines a 64-bit time_t, otherwise >> > the >> > kernel headers have no way of picking the correct definitions based >> > on preprocessor logic. >> >> Okay, I agree that this might be a libc problem then. I'll ask the >> glibc maintainers. >> > > According to a glibc maintainer, __USE_TIME_BITS64 is not set on > architectures that use 64-bit time_t as default such as riscv32. > This can also be seen here [1]. > > Perhaps the kernel header needs to check the size of time_t in some > other way? > > [1] > https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/features-time64.h;hb=glibc-2.37 I don't see any better way, the kernel headers started using this in 2018 based on the glibc design documents and discussions with glibc maintainers, see the section on ioctls in https://sourceware.org/glibc/wiki/Y2038ProofnessDesign The kernel only relies on this macro for the sound and input subsystem, but there are numerous applications and libraries that copied the kernel definition because that was defined as the only reliable method. Maybe you can work around by patching the glibc sources yourself? Arnd