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: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 A6BA81F8C6 for ; Tue, 6 Jul 2021 13:08:03 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 930A7388883B for ; Tue, 6 Jul 2021 13:08:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 930A7388883B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1625576882; bh=UTqxi7QMxjPGb2ySBWwvUpIRF02WmOLJor26G1ARveE=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=gsInbwX5JePBKPZRVepPwldyamhy41qDI5ky6+FOY12A2QyccgjKCy/DWkn82YVOT XHVq2kkiPJ5Nq5qTD6f1q8SrDHjzHpY7nF84xXCrEglHaaHNRn11634wlyUpwdniKd JkeRgjIBwSiG+5GLz0fMbFjssIF2S7kP/rsZT7aY= Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by sourceware.org (Postfix) with ESMTPS id AA19A383A82B for ; Tue, 6 Jul 2021 13:07:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AA19A383A82B Received: by mail-pl1-x62c.google.com with SMTP id y2so1017653plc.8 for ; Tue, 06 Jul 2021 06:07:40 -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:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=UTqxi7QMxjPGb2ySBWwvUpIRF02WmOLJor26G1ARveE=; b=k6atEv1uI89M2UtlrLLJexQGz0/qP6lWlnEt3xFOSK+Q1JD7t3wAAHtQM9aVHkOGYX pEbROu8Kf+NsQMX1sxwepLDBhO06KLEcsIBg6fPrFbz0TLpoAhF3njzgKVsbOkxVfNWI qLhzH9q2ll+lVHvusKPuR+7vkocD50Py2EmZ5HsMzzNxDPXG5dQ8GTvgzejz1oRonX5l XF6ufpSN25/oXLADfzwaM3vjtFaAgsjCJm78fI6aoSEDbsbqtdP3V2OJ66yShZ3o+Dmo hw1eGldDUSbvaCBkLwBM+YgkkqgF7jJohVsJSP+l/ZkKw2PB0l6regR1+bZOyRG5Bl2h wclQ== X-Gm-Message-State: AOAM533ZtyWIU3decTMrjxQo0+6N21iXBHEQrHvDx9XyjylROQ0dMkcK /pDb5IHgJBlCiw6SNzvJ6Ouh8c7gDCSnkw== X-Google-Smtp-Source: ABdhPJzjTjwZM7k0o6W5al2iCbSwIRBduCA40OFMUNmrqYUQ4eoe8WpjiNLSCghYdugGYxSszoPbdQ== X-Received: by 2002:a17:902:e843:b029:129:acb4:2464 with SMTP id t3-20020a170902e843b0290129acb42464mr2583238plg.77.1625576859699; Tue, 06 Jul 2021 06:07:39 -0700 (PDT) Received: from [192.168.1.108] ([177.194.59.218]) by smtp.gmail.com with ESMTPSA id e24sm16738954pfn.127.2021.07.06.06.07.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 06 Jul 2021 06:07:39 -0700 (PDT) Subject: Re: [PATCH 4/7] linux: Fix setsockopt fallback To: Florian Weimer , Adhemerval Zanella via Libc-alpha References: <20210705183027.3804093-1-adhemerval.zanella@linaro.org> <20210705183027.3804093-5-adhemerval.zanella@linaro.org> <87lf6kk29h.fsf@oldenburg.str.redhat.com> Message-ID: <85497296-5bcd-aeb2-3be1-02b84543ffa7@linaro.org> Date: Tue, 6 Jul 2021 10:07:37 -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: <87lf6kk29h.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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 Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On 05/07/2021 16:07, Florian Weimer wrote: > * Adhemerval Zanella via Libc-alpha: > >> The final 2 arguments for SO_TIMESTAMP/SO_TIMESTAMPNS are being set >> wrongly. >> >> Checked on x86_64-linux-gnu and i686-linux-gnu. >> --- >> sysdeps/unix/sysv/linux/setsockopt.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/sysdeps/unix/sysv/linux/setsockopt.c b/sysdeps/unix/sysv/linux/setsockopt.c >> index a4780a9d33..fae7305c9d 100644 >> --- a/sysdeps/unix/sysv/linux/setsockopt.c >> +++ b/sysdeps/unix/sysv/linux/setsockopt.c >> @@ -78,7 +78,7 @@ setsockopt32 (int fd, int level, int optname, const void *optval, >> optname = COMPAT_SO_TIMESTAMP_OLD; >> if (optname == COMPAT_SO_TIMESTAMPNS_NEW) >> optname = COMPAT_SO_TIMESTAMPNS_OLD; >> - r = setsockopt_syscall (fd, level, optname, NULL, 0); >> + r = setsockopt_syscall (fd, level, optname, optval, len); >> } >> break; >> } > > Maybe add a comment that the recvmsg code does conversation, so the old > socket option is also acceptable? I added the following comment: /* The expected type for the option is an 'int' for both types of timestamp formats, so there is no need to convert it. */ > > The patch itself looks okay to me.