Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp591175imm; Fri, 31 Aug 2018 08:10:51 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaumF4/Fr+FgBRpa8h7fXpC0Y9KzoxsZ5X+Dj4V56n3H9yM5l2BPXP8Bu3W6J1reAVsHJqE X-Received: by 2002:a17:902:8d91:: with SMTP id v17-v6mr16279448plo.9.1535728251197; Fri, 31 Aug 2018 08:10:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535728251; cv=none; d=google.com; s=arc-20160816; b=kyCODfxiH0pBo5v0yLwTbGdVOpi/6Q2Pu51C2ClwbYBRXzaWT/kT+RFJaF6O6Upzeo LEmVYiS5fcVAI+pX8ev6yD//mOSogr5wZcBnCP2ybLulpYttZds7A9Bvzh0DySQeYMhx klb4lQC1cqDQjBcVuCANwPzW5aBWKWqceVLMO366GiDz7jPcxVyKLULyVdgnrTQE3d0v o5C0fCHOq6yODZ5J9BavGGywNFzWI1cXGSuMB5NECPv9JoqGSnKGbhe6y5dQaEhgFVrR V2vNYtV6ct2vrRwEshBFHjqm+cyB4z/8kd2tfA58zwwz3ojv0njGXMhPZrqvjR4hyggP 41XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=OakFLENuwgbFbDjfQEAX9HmDNCHYIGzIDhRitMT5zYY=; b=foCwSDPrb4QhKn7kCTlPvaUfKBeNG7UTfO1dLgHHRA0gS48aj1Rqe9O1zDy+jAfpNA P2rvD5fEr37hzQPptRL0vKqgBSkB6PW4NEbnJhP8IGenobi2EOn7ttA62bliwTFpWKo8 TQXjGItylbJbd9RmTbqYAAFT5uDhx9QdXXA1kJQlV3t2+JqC+NascI8Qn30v6Qt8RxXS GWAMLWP5h2kK+TZndvyTHwwd2V51c0QARlX9HYOfRS6uXokHDRugl2A46VZsB+SQnO9g EOxq4mlvpt76S6OUfNP/Pmx9KIIeCIGCLWpuVg6qvgKYHc/jYGF3Gq9eVojKa3/yL15L 9Blw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ltto8TEt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b129-v6si9980810pfa.12.2018.08.31.08.10.36; Fri, 31 Aug 2018 08:10:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ltto8TEt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728218AbeHaTQo (ORCPT + 99 others); Fri, 31 Aug 2018 15:16:44 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:32821 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728027AbeHaTQn (ORCPT ); Fri, 31 Aug 2018 15:16:43 -0400 Received: by mail-ed1-f66.google.com with SMTP id d8-v6so1238138edv.0; Fri, 31 Aug 2018 08:08:46 -0700 (PDT) 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=OakFLENuwgbFbDjfQEAX9HmDNCHYIGzIDhRitMT5zYY=; b=Ltto8TEt5omeD5A8gFwZfNQfRqduET/fclaEV7VurgbvUWUGDz62jx4Q4OYMph6b35 5HQFybqd+66NOlJsOmJpKb5sNP/C5e0E271mZesCSQLHxtsavkd3SC7t5SZvzwrCWVg0 hFxA5Zrz+mCdKyqsPczTpR+MJQtnDo7pBXruE4XvsMy5U2rJoXY4rU6fP/WaZ+w5+4qG m9HPdENUNH3E1YcWw8QvHlPuA80MhLiN+JFPW4OQPnhDD3jGK61EwgJejKuF8eqPMXkS io4yIy+2FGP81NLMuDN+H/rGe+Z72DQbcseRntNTBI1wiVvbwWuDU0XraU2B/r3+VpoA xLHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OakFLENuwgbFbDjfQEAX9HmDNCHYIGzIDhRitMT5zYY=; b=NgM/jD3KoUCDcFA5xWHTxhJrG5oWYJ/N2KFqbBpnml1u1qlkBSA40iXaLoRiPEb8B9 v+9w/cJPqulpYDVzMoEGT0OOAmd1dARd6T3ET1s/VlZI8SZ8BSvQ+OukHdOZmg4Jgfgs CT/y7c41i7NJcYn6O52xKlaaoGbUdRbvNjQwrt7TPPYlPHjjY5WxGtzUWwpIjskXFdy8 lNIctL/xCIrGLAooV92Yfpt4J/Mehq3TPYGHb1sNySPWO9faUgXG1qnEl94IPXDb0V4Z JMpSKb0NEZO3LqWS9Tsr0pIMiQia1Vd+Zm4VgpW1/YWDMUwERwxZ5FdSxqoEArNCifGK fYug== X-Gm-Message-State: APzg51Ay6nd4CGaIlrVEx/vIuf7FJLwRA9Br329kfMy0QKSbji+s9VJo XojJyxBTkf8P1wjUd924+aagezRGqLcIL1dLs09fNQ== X-Received: by 2002:a50:fc03:: with SMTP id i3-v6mr18802924edr.85.1535728125829; Fri, 31 Aug 2018 08:08:45 -0700 (PDT) MIME-Version: 1.0 References: <20180829130308.3504560-1-arnd@arndb.de> In-Reply-To: From: Willem de Bruijn Date: Fri, 31 Aug 2018 11:08:09 -0400 Message-ID: Subject: Re: [PATCH net-next 1/3] net: rework SIOCGSTAMP ioctl handling To: Arnd Bergmann Cc: Network Development , David Miller , linux-arch@vger.kernel.org, y2038 Mailman List , Eric Dumazet , Willem de Bruijn , LKML , linux-hams@vger.kernel.org, linux-bluetooth@vger.kernel.org, linux-can@vger.kernel.org, dccp@vger.kernel.org, linux-wpan@vger.kernel.org, linux-sctp@vger.kernel.org, linux-x25@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > Looking at it again, it seems that sock_gettstamp() should > > > actually deal with this gracefully: it will return a -EINVAL > > > error condition if the timestamp remains at the > > > SK_DEFAULT_STAMP initial value, which is probably > > > just as appropriate (or better) as the current -ENOTTY > > > default, and if we are actually recording timestamps, we > > > might just as well report them. > > > > Yes, that's a nice solution. There is always some risk in changing > > error codes. But ioctl callers should be able to support newly > > implemented functionality. Even if partially implemented and > > returning ENOENT instead of ENOIOCTLCMD. > > Ok, so do you think we should stay with the current version > for now, and change the two points later, or should I rework > it to integrate the locking and removing the callback? > > I suppose the series actually gets nicer without the > callback, since I can simply add the generic timestamping > implementation first, and then remove the dead ioctl > handlers. Agreed. I would add the locks in a separate patch, if only on the off-chance that lockdep discovers something and it will be easier to bisect and revise independently. I can also follow up with that patch outside this set, of course.