From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by sourceware.org (Postfix) with ESMTPS id 048F7385B83D for ; Mon, 5 Jul 2021 12:44:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 048F7385B83D Received: by mail-pj1-x102f.google.com with SMTP id h1-20020a17090a3d01b0290172d33bb8bcso2269847pjc.0 for ; Mon, 05 Jul 2021 05:44:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=8750K1+z17bREqoHxvbWMCGv32UroM8XuG/qXqqF1EQ=; b=cCswHPkKO+5xKMOQl2JaaaP7OYvLO+V1tGnUA6x3RqeiRh4+7b2xA+x3lOa7ACB9+D HtAYIChkA/7J20QRgxnLvvbOsMu7cHqeH8oD881oUOWp07YDt90cqfueiHcWeHsrT/Wp bho4AI4/U+5/0ltZuVP2p+F7XP59CxwF3NyfdO9zsEl21OCdmp2TRobOu1luKHttMa5v DkuH84KwTgJhpG5wvGbmxfRvi/iH1LGNSuHhqwf6+61+FVjP2Z9WLw549JPXDMe77IWw fjY7VuO5THKojcIPv3b18edDSGYvLUk3gfSewVT+4xorYQIMTwzSTBiwXK4QiVJTfScv kiYg== X-Gm-Message-State: AOAM5319GMNzzIgcM91bTvDuX3laFgT5TTcAAprChEhYMXp2zCVHlB20 j6dstd99nBOCrun6/9deV9wtiQ== X-Google-Smtp-Source: ABdhPJwpronxLQ+MGtk2+lCyzMRVTLh/RIplW8WmxVFtU5czFxU5DNZ4n3716gxpdzzzJp8RsvbjgA== X-Received: by 2002:a17:902:7108:b029:129:5858:b388 with SMTP id a8-20020a1709027108b02901295858b388mr12336238pll.37.1625489080997; Mon, 05 Jul 2021 05:44:40 -0700 (PDT) Received: from [192.168.1.108] ([177.194.59.218]) by smtp.gmail.com with ESMTPSA id 75sm13070077pfx.71.2021.07.05.05.44.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 05 Jul 2021 05:44:40 -0700 (PDT) Subject: Re: Missing time64 prototypes for !__REDIRECT compilers To: Florian Weimer Cc: libc-alpha@sourceware.org, Lukasz Majewski References: <87h7h9ozvs.fsf@oldenburg.str.redhat.com> <878s2lot1z.fsf@oldenburg.str.redhat.com> <874kd9ortn.fsf@oldenburg.str.redhat.com> From: Adhemerval Zanella Message-ID: <35e8be18-b7ad-e2bd-691e-94a4b6663377@linaro.org> Date: Mon, 5 Jul 2021 09:44:38 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <874kd9ortn.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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: , X-List-Received-Date: Mon, 05 Jul 2021 12:44:43 -0000 On 05/07/2021 09:42, Florian Weimer wrote: > * Adhemerval Zanella: > >> On 05/07/2021 09:15, Florian Weimer wrote: >>> * Adhemerval Zanella: >>> >>>> On 05/07/2021 06:48, Florian Weimer wrote: >>>>> This pattern looks incorrect to me: >>>>> >>>>> #ifdef __USE_GNU >>>>> /* Receive up to VLEN messages as described by VMESSAGES from socket FD. >>>>> Returns the number of messages received or -1 for errors. >>>>> >>>>> This function is a cancellation point and therefore not marked with >>>>> __THROW. */ >>>>> # ifndef __USE_TIME_BITS64 >>>>> extern int recvmmsg (int __fd, struct mmsghdr *__vmessages, >>>>> unsigned int __vlen, int __flags, >>>>> struct timespec *__tmo); >>>>> # else >>>>> # ifdef __REDIRECT >>>>> extern int __REDIRECT (recvmmsg, (int __fd, struct mmsghdr *__vmessages, >>>>> unsigned int __vlen, int __flags, >>>>> struct timespec *__tmo), >>>>> __recvmmsg64); >>>>> # else >>>>> # define recvmmsg __recvmmsg64 >>>>> # endif >>>>> # endif >>>>> #endif >>>>> >>>>> For the !__REDIRECT case, a prototype for __recvmmsg64 is still needed. >>>> >>>> There is some fixes for recvmsg and recvmmsg that I am working on, >>>> I will add this as well. >>> >>> I'm working on adding some missing time64 aliases. I've got a >>> SCM_RIGHTS smoke test. >> >> Do you mean for recvmg/recvmmsg? If so do we really need these? I fixed >> an issue on __convert_scm_timestamps that I think it the most likely >> issue that trigger the invalid memory access on ruby testcase. > > I have identified the following system calls: > > ioctl, fcntl, prctl, sendmmsg, recvmsg, sendmsg, getsockopt, setsockopt. > > All of them are multiplexers of some kind, and we don't know if the > kernel will add different constants for different time_t sizes for > future features, given that it's more or less 64-bit time_t only these > days. But kernel afaik uses the time_t size to provide such constant, if it adds a new 64-bit time_t only it won't build for _TIME_BITS=32.