From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754215AbdK1UCJ (ORCPT ); Tue, 28 Nov 2017 15:02:09 -0500 Received: from mail-ot0-f169.google.com ([74.125.82.169]:45992 "EHLO mail-ot0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752774AbdK1UCH (ORCPT ); Tue, 28 Nov 2017 15:02:07 -0500 X-Google-Smtp-Source: AGs4zMYuCFfPCOlqG9ktJJ25dAdtzbi6Vewf/HU02/IJNEVBtBvXz+fbcahWNTySGKJyH6op03RNDGz00iJh4I7uiJo= MIME-Version: 1.0 In-Reply-To: <20171128.100543.834604452984869251.davem@davemloft.net> References: <20171128131514.2675733-1-arnd@arndb.de> <20171128.100543.834604452984869251.davem@davemloft.net> From: Arnd Bergmann Date: Tue, 28 Nov 2017 21:02:05 +0100 X-Google-Sender-Auth: H3P7Fr1NBd9-xYvyFj-4AiEFG7s Message-ID: Subject: Re: [PATCH] [RFC v2] packet: experimental support for 64-bit timestamps To: David Miller Cc: Miroslav Lichvar , Willem de Bruijn , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , gregkh , Francis Yan , Eric Dumazet , Kees Cook , "Rosen, Rami" , Andrey Konovalov , Mike Maloney , Sowmini Varadhan , Linux Kernel Mailing List , Networking Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 28, 2017 at 4:05 PM, David Miller wrote: > From: Arnd Bergmann > Date: Tue, 28 Nov 2017 14:14:05 +0100 > >> The implementation is fairly straightforward, but I'm less sure about the >> interface. Using SOF_TIMESTAMPING_* flags in PACKET_TIMESTAMP is a bit >> odd already since most of the other flags make no sense here. Adding two >> more flags that only make sense for packet sockets but not the normal >> SO_TIMESTAMPING option on other sockets makes this even more confusing. > > We unfortunately never enforced any checking whatsoever of the > PACKET_TIMESTAMP mask the user gives us, we accept anything. > > That makes any changes in this area effectively a grenade ready to go > off potentially at any moment. > > We can't add new checks without potentially making existing apps stop > working. And at least theoretically if we add new bits it is possible > for an existing app passing those bits in by accident to start > behaving improperly. > > I know it sounds like overkill for this, but maybe we can add a new > socket option for the SKIP and 64-bit stuff. That would be %100 safe. Sure, it's easy enough to do, I'll cook something up. Does this mean you think the general idea of an extended interface for 64-bit timestamps is useful for traditional packet sockets? I think that was still an open question, though we seem to be getting closer to consensus on the implementation and the interface that it should use if we want it. Arnd