From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x112d.google.com (mail-yw1-x112d.google.com [IPv6:2607:f8b0:4864:20::112d]) by sourceware.org (Postfix) with ESMTPS id 654893858D33 for ; Fri, 3 Mar 2023 08:47:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 654893858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-536c2a1cc07so30727527b3.5 for ; Fri, 03 Mar 2023 00:47:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677833249; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=wImBookKCm16yEDALzZMByjCsDKYHInOkQTO/ixH9gY=; b=oP+psb6Q/CrE3ToL0ErF8GS5/E+sktBHxr7COdCqpuPWSRVwzi1REjajiBWWmOK33y 5yN6a32ik6qrnRhoY8IXz3hyarq24lXTpYzQHirNAOUD0d6U8qjr4rFCkSerybRUE0l8 Ww3XTQtChZPHx7DkVgxm8RT1wy4HHFlJ2tHEwFz5yJoCaBaptSo6D+SMkcuUA2m93Gnj xcnyepd1wIoX21aYOnT1bRPc5pTOrYDLmsbKmt3w7OIHGJUcdJUtzPJDqWxDQzObd0Mc 40oh6tiWlr9FLi3ax/yxGK6MnWjR6LWwMuRSUqOtWSEqmp74ITKJeMKnwbUCkX8tALaN X09Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677833249; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wImBookKCm16yEDALzZMByjCsDKYHInOkQTO/ixH9gY=; b=x70FW6G3aXWMYz6CPkJwBEGv5ADXYJO5X5gBHBljt15jYVNQvBlHsRJYfp3hypLiew DZLl600/HhY65l3qzIj/4dsamDJUbPrqWB8r3wclUeIbq8m/mM9cYQq3sM1qI9OXzfSZ zoYj9m4TrALzw6zNjvjwB01UYpy/2NhwURa1W3ZW5PVRhwAZIjqcsdCkKOU+N61kudm/ zOEF0ckMkJbwqUHMYsNw1lzhFmlIUGk+2vluvzIX6a3gHzO6tsjlS80ZJAtOXx5RAa5M SokdWD5yq7Ac56OIKMgm0t2LMR6jPpU1LqsbrRdqO3/9BJLZDfzMOYTHvOalHHD0nAfN aYEA== X-Gm-Message-State: AO0yUKU69Xz0huGOAXagZal9gslC5ahJbKnKDaofmFqx4lZwlM+NlAQA Z2xgycEX8A3V+PWKdZkEd/NsULXxfzp6xZLhozk= X-Google-Smtp-Source: AK7set9vBP1kvDiIQshU/RxDT1WBUhCYnDpTTsQubUalkiX1lBi2kg6f0GCezEp3hQzx9C4rGD3IqNZZiEM1EHlPGJM= X-Received: by 2002:a81:af1f:0:b0:536:4ad1:f71 with SMTP id n31-20020a81af1f000000b005364ad10f71mr403381ywh.9.1677833248676; Fri, 03 Mar 2023 00:47:28 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?Q?Kacper_Piwi=C5=84ski?= Date: Fri, 3 Mar 2023 09:47:17 +0100 Message-ID: Subject: Re: [PATCH] linux: fix ntp_gettime abi break To: "Carlos O'Donell" Cc: libc-alpha@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,GIT_PATCH_0,HK_RANDOM_ENVFROM,HK_RANDOM_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: czw., 2 mar 2023 o 18:47 Carlos O'Donell napisa=C5=82(a= ): > > On 2/20/23 23:04, Kacper Piwi=C5=84ski via Libc-alpha wrote: > > Between versions v2.11 and v2.12 struct ntptimeval got new fields. > > That wasn't a problem because new function ntp_gettimex was created > > (and made default) to support new struct. Old ntp_gettime was not > > using new fields so it was safe to call with old struct > > definition. Then between versions v2.31 and v2.32 when working on > > y2038 bugs, ntp_gettime start setting new fields. > > > > Sets fields manually to maintain compatibility with v2.11 struct defini= tion. > > The patch fails to apply. > > This fails pre-commit CI: > https://patchwork.sourceware.org/project/glibc/patch/CAKVti-BRav=3DmmfcQB= Ez_qpezmKfR_fFW9uihJb+QXiJazugTmA@mail.gmail.com/ > > Please have a look at: > https://sourceware.org/glibc/wiki/Contribution%20checklist > > Did you generate the patch with `git format-patch`? > Hi, yes I did but I didn't copy the whole thing. Anyway this patch is not correct. I attatched new patch here https://sourceware.org/bugzilla/show_bug.cgi?id=3D30156 > > > > > Author: Kacper Piwi=C5=84ski > > --- > > sysdeps/unix/sysv/linux/ntp_gettime.c | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/sysdeps/unix/sysv/linux/ntp_gettime.c > > b/sysdeps/unix/sysv/linux/ntp_gettime.c > > index 4879573530..3844b2e487 100644 > > --- a/sysdeps/unix/sysv/linux/ntp_gettime.c > > +++ b/sysdeps/unix/sysv/linux/ntp_gettime.c > > @@ -54,7 +54,11 @@ __ntp_gettime (struct ntptimeval *ntv) > > int result; > > > > result =3D __ntp_gettime64 (&ntv64); > > - *ntv =3D valid_ntptimeval64_to_ntptimeval (ntv64); > > + //manually update fields to maintain abi with v2.11 struct definitio= n > > + struct ntptimeval tntv =3D valid_ntptimeval64_to_ntptimeval (ntv64); > > + ntv->time =3D tntv.time; > > + ntv->maxerror =3D tntv.maxerror; > > + ntv->esterror =3D tntv.esterror; > > > > return result; > > } > > -- > > 2.38.1.windows.1 > > > > -- > Cheers, > Carlos. >