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-Status: No, score=-4.6 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 04F591F5AE for ; Thu, 30 Jul 2020 12:34:11 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 12E28386F83C; Thu, 30 Jul 2020 12:34:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 12E28386F83C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1596112450; bh=xbXQKAx9fVfDmKgpK2Xb7iUIJMQ1reKl7gz8RhxHsxg=; h=To:References:Subject:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=oLuzOPqOhcympZyWWQZIgWqE1URwhEIjrXA3CR21BiEUp5KF57i6YNa+X30kz52Fs RcEN2A+NXA7ttPFKHeWScIJD+jHSTRHPSCRR/zrYc6PnCKITO67+hK8l4ejEc2dwog sVKcM/80UcXm6ErjFaTDbqy35KupBMZOwUj6Xqyo= Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by sourceware.org (Postfix) with ESMTPS id BEF8F3857C61 for ; Thu, 30 Jul 2020 12:34:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BEF8F3857C61 Received: by mail-qt1-x844.google.com with SMTP id 6so20174291qtt.0 for ; Thu, 30 Jul 2020 05:34:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:references:from:autocrypt:subject :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=xbXQKAx9fVfDmKgpK2Xb7iUIJMQ1reKl7gz8RhxHsxg=; b=YPqRWR6BlCrdK8W7VPApvtrSQv7FkmLIwz7v9ymVCn2iNlPbrUZ+uo3EhaFvBdKIHW ar/WVhkeWcafjH7LOCnJUre9b8cOeXnNOBqDwJTswUVGw0JZqIWG0m7/dXvsBJFnpQtw edcfoxkvKh2e5aeksv4FYnZsAAXzpp807rFZhU5Rs7ibvr6sRHvfxcHJ9GJ0KFHF28LV LS/OizTPoNzg8PmgyLtm5KcRvREfl3tsY1BBQ/XCOedcpaefu7VANLtRi8K2D9Bae8vK JdDsq2BmXp1Y2fjSnCp13RRRa8UZM3VMJjhGhnYJ2VC2gqOMaoA5WTRjhC3K5xaVfqvZ 0/EA== X-Gm-Message-State: AOAM533WZioLEeGsqPMc3t04aYqcgQF92LMIUXudTvI3FKivOVEzlX2t na8CKbBbUbSnA+6DNmyrgpmI21cAV5o= X-Google-Smtp-Source: ABdhPJxrCM9+0eiasRTqC/wf4K6f+ZaOgTMI2DG2rHAYLjUJWt3svKvWRMq6Rz0CJe7oUdcp1dSNtg== X-Received: by 2002:aed:364a:: with SMTP id e68mr2647743qtb.260.1596112446215; Thu, 30 Jul 2020 05:34:06 -0700 (PDT) Received: from [192.168.1.4] ([177.194.48.209]) by smtp.googlemail.com with ESMTPSA id n184sm4021783qkn.49.2020.07.30.05.34.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Jul 2020 05:34:05 -0700 (PDT) To: Joseph Myers References: <20200729205117.2925113-1-adhemerval.zanella@linaro.org> <20200729205117.2925113-3-adhemerval.zanella@linaro.org> Autocrypt: addr=adhemerval.zanella@linaro.org; prefer-encrypt=mutual; keydata= mQINBFcVGkoBEADiQU2x/cBBmAVf5C2d1xgz6zCnlCefbqaflUBw4hB/bEME40QsrVzWZ5Nq 8kxkEczZzAOKkkvv4pRVLlLn/zDtFXhlcvQRJ3yFMGqzBjofucOrmdYkOGo0uCaoJKPT186L NWp53SACXguFJpnw4ODI64ziInzXQs/rUJqrFoVIlrPDmNv/LUv1OVPKz20ETjgfpg8MNwG6 iMizMefCl+RbtXbIEZ3TE/IaDT/jcOirjv96lBKrc/pAL0h/O71Kwbbp43fimW80GhjiaN2y WGByepnkAVP7FyNarhdDpJhoDmUk9yfwNuIuESaCQtfd3vgKKuo6grcKZ8bHy7IXX1XJj2X/ BgRVhVgMHAnDPFIkXtP+SiarkUaLjGzCz7XkUn4XAGDskBNfbizFqYUQCaL2FdbW3DeZqNIa nSzKAZK7Dm9+0VVSRZXP89w71Y7JUV56xL/PlOE+YKKFdEw+gQjQi0e+DZILAtFjJLoCrkEX w4LluMhYX/X8XP6/C3xW0yOZhvHYyn72sV4yJ1uyc/qz3OY32CRy+bwPzAMAkhdwcORA3JPb kPTlimhQqVgvca8m+MQ/JFZ6D+K7QPyvEv7bQ7M+IzFmTkOCwCJ3xqOD6GjX3aphk8Sr0dq3 4Awlf5xFDAG8dn8Uuutb7naGBd/fEv6t8dfkNyzj6yvc4jpVxwARAQABtElBZGhlbWVydmFs IFphbmVsbGEgTmV0dG8gKExpbmFybyBWUE4gS2V5KSA8YWRoZW1lcnZhbC56YW5lbGxhQGxp bmFyby5vcmc+iQI3BBMBCAAhBQJXFRpKAhsDBQsJCAcDBRUKCQgLBRYCAwEAAh4BAheAAAoJ EKqx7BSnlIjv0e8P/1YOYoNkvJ+AJcNUaM5a2SA9oAKjSJ/M/EN4Id5Ow41ZJS4lUA0apSXW NjQg3VeVc2RiHab2LIB4MxdJhaWTuzfLkYnBeoy4u6njY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iUgDV5mlNef77lWE8vxmlY0FBWIXuZ yv0XYxf1WF6dRizwFFbxvUZzIJp3spAao7jLsQj1DbD2s5+S1BW09A0mI/1DjB6EhNN+4bDB SJCOv/ReK3tFJXuj/HbyDrOdoMt8aIFbe7YFLEExHpSk+HgN05Lg5TyTro8oW7TSMTk+8a5M kzaH4UGXTTBDP/g5cfL3RFPl79ubXwARAQABiQIfBBgBCAAJBQJXFRpKAhsMAAoJEKqx7BSn lIjvI/8P/jg0jl4Tbvg3B5kT6PxJOXHYu9OoyaHLcay6Cd+ZrOd1VQQCbOcgLFbf4Yr+rE9l mYsY67AUgq2QKmVVbn9pjvGsEaz8UmfDnz5epUhDxC6yRRvY4hreMXZhPZ1pbMa6A0a/WOSt AgFj5V6Z4dXGTM/lNManr0HjXxbUYv2WfbNt3/07Db9T+GZkpUotC6iknsTA4rJi6u2ls0W9 1UIvW4o01vb4nZRCj4rni0g6eWoQCGoVDk/xFfy7ZliR5B+3Z3EWRJcQskip/QAHjbLa3pml xAZ484fVxgeESOoaeC9TiBIp0NfH8akWOI0HpBCiBD5xaCTvR7ujUWMvhsX2n881r/hNlR9g fcE6q00qHSPAEgGr1bnFv74/1vbKtjeXLCcRKk3Ulw0bY1OoDxWQr86T2fZGJ/HIZuVVBf3+ gaYJF92GXFynHnea14nFFuFgOni0Mi1zDxYH/8yGGBXvo14KWd8JOW0NJPaCDFJkdS5hu0VY 7vJwKcyHJGxsCLU+Et0mryX8qZwqibJIzu7kUJQdQDljbRPDFd/xmGUFCQiQAncSilYOcxNU EMVCXPAQTteqkvA+gNqSaK1NM9tY0eQ4iJpo+aoX8HAcn4sZzt2pfUB9vQMTBJ2d4+m/qO6+ cFTAceXmIoFsN8+gFN3i8Is3u12u8xGudcBPvpoy4OoG Subject: Re: [PATCH 3/5] login: Add 64-bit time support Message-ID: <47eaf2e2-5912-bb69-6489-6215213add58@linaro.org> Date: Thu, 30 Jul 2020 09:34:02 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Adhemerval Zanella via Libc-alpha Reply-To: Adhemerval Zanella Cc: Alistair Francis , libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" On 29/07/2020 18:17, Joseph Myers wrote: > On Wed, 29 Jul 2020, Adhemerval Zanella via Libc-alpha wrote: > >> New symbols for getutent, getutent_r, getutid, getutid_r, getutline, >> getutline_r, getutmp, getutmpx, getutxent, getutxid. getutxline, >> pututline, pututxline, updwtmp, updwtmpx, and login are added to >> all architecture but s390-32 (which already added 64-bit time support >> on 32-bit ABI on glibc 2.9). > > I thought those structures appeared in external files (/var/run/utmp, > /var/log/wtmp, /var/log/lastlog), which means changing them is problematic > even with symbol versioning. Do the files keep their existing formats > with the new versions of the functions translating to and from the 64-bit > format when reading / writing those files? Do they get new formats with > the old versions of the functions instead being the ones that translate > (if so, what is the process distributions are expected to use to convert > existing files on upgrade / enable old wtmp files in the old format to > continue to be read by new code)? I think a detailed description of the > overall strategy for maintaining compatibility with existing data in files > is needed, both in the patch / patch series description and in the NEWS > file describing anything required to be done on upgrade to avoid losing or > corrupting data. > The strategy I used was the same done by s390-32 some time ago, where the var/run/utmp, /var/log/wtmp, /var/log/lastlog would use the new 64-bit time regardless and the 32-bit compat symbols convert the 32-bit entries to the internal 64-bit ones. Afaik there is not conversion tool to handle that, so the system administration was supposed to reset such files in a glibc upgrade. I thought about the underlying issuesand another strategy I considered was to use new register types for 64-bit time symbols (by mapping the RUN_LVL, etc. to internal types). The 32-bit time compat symbols would then write the entries as-is. There are some issues with this approach: how compat symbols would handle 64-bit time entries? Would them be just ignored (as the current semantic for other 64-bit symbols which return EOVERFLOW) or the entry would be converted and the time clamped (and thus returning potentially invalid/misleading time results)? Another issue is extra code complexity, it requires routines to convert to 64-bit entries from 32-bit entries and the 32-bit compat symbols won't be based on exported ABI (which requires to add extra testing to handle the iteration between 64-bit and 32-bit entries). I am not sure if this extra complexity to handle multiple registers types does days off (and I don't know how was s390-32 transition), but if this is indeed a desirable feature I think I can spend some time to sort this out.