From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_GMAIL_RCVD, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 24E3A1F463 for ; Mon, 30 Dec 2019 21:23:04 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-type; q=dns; s=default; b=piQy 9/ZAbpc2eWyGBs1Be1qMakYm1+bquPAzPq9pkOYR4jBO5/MJzxZcdsds8rYvMbCz 2FgbpRNqE2Uplsfsps2K5K29tkDFgesOH7D3oNOzoyvlXrRpyLRxnTKTToir7zNK wOo5kvKN1fHBxZTSxwY0JdyUdnzz4cXcz0RuRdk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-type; s=default; bh=IIAx/jfbI8 AjUVG/PUrZYTuv/Iw=; b=EWL+abF1inUwwAPtmoy9ZNkz+BG4KFazhBDeKasnQA g1jW8JgDuz7A4S2nOkR8UNgI8Fw2Vi1Xi2VpXu076LIjZ2VHJ4weIBcC6upIkxAv jSh4RSohGpvMRQGImMcGVg9rI2Mdqvf1ydx42C2TbOQdWoTQJeSmC9TH70BKaMxM A= Received: (qmail 87064 invoked by alias); 30 Dec 2019 21:23:01 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 87055 invoked by uid 89); 30 Dec 2019 21:23:01 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-lj1-f175.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VZw7ru0werAo+vXbeE2Q2JseZtq5/UnQW6r5Ww57ms0=; b=bRp76/wDg/WI4mLq0Oz9wEZpTFn6Ub5BQyUu9ROSAD7ApZef8Kyi6ET68FtrFps/5a lr7NbI9iA4MkkB5aI0pkmtOQxiKjTtp2sN2d1jaGCbEibVRJywzOlVubZl0U0uSE+Ts+ SLghva6D1bdWKj3sLtIyCeXl+hhnLLrHyAXFC3rAT2VelI/vkVvNCuBIej/tge8ej5Kg a26T3q8uqgV1otyfSZccBMAb6ygcwh7obVRuhyOanrTlxYtLjt7Kg4LBVT4xqN2AZ2mT MZXpNna8jytstkQI3jbmET4CRA+ytBB+sOF/vBhgw21h3wtTFf8FFUnM4sJYtOKLHb7v S7BQ== MIME-Version: 1.0 References: In-Reply-To: From: Alistair Francis Date: Mon, 30 Dec 2019 13:16:23 -0800 Message-ID: Subject: Re: 32-bit time_t inside itimerval To: Arnd Bergmann Cc: GNU C Library , Alistair Francis , Lukasz Majewski Content-Type: text/plain; charset="UTF-8" On Mon, Dec 30, 2019 at 12:11 PM Arnd Bergmann wrote: > > On Mon, Dec 30, 2019 at 8:57 PM Alistair Francis wrote: > > On Mon, Dec 30, 2019 at 2:02 AM Arnd Bergmann wrote: > > > On Sat, Dec 21, 2019 at 6:19 PM Alistair Francis wrote: > > > > For the glibc people, can we do something like this? > > > > > > > > 1. Add a __old_timeval struct used by the itimerval and rusage structs > > > > 2. Make __old_timeval use __old_time_t that is always a long (no > > > > matter what time_t really is) > > > > > > If you have linux-5.1 kernel headers, there is already __kernel_old_timeval > > > that is defined specifically for this purpose. Not sure if you can use those > > > given the state of the kernel headers overall. > > > > > > > Then the question becomes do we expose __old_timeval (with 32-bit > > > > time_t) or the real timeval (64-bit time_t) to callers of the > > > > functions? > > > > > > I would think this has to be the actual timeval, there is no point in > > > changing the API now. > > > > Yeah, agreed. I have updated the RV32 port to internally convert > > between 32/64-bit. > > Any chance of making this the default implementation for 32-bit > rather than RV32 specific? The code should be the same for any > time64 user space regardless of the architecture. I was thinking about this. I don't know of a good way to make it apply only to 32-bit archs with a 64-bit time_t.This could actually just apply to all 32-bit archs. That way ones that are 64-bit time_t are covered and ones that aren't will just do an extra conversion with no effect. Making it 32-bit in general seems reasonable to me, I just have to figure out a way to test it though. Alistair > > Arnd