Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1467173imj; Fri, 8 Feb 2019 01:52:48 -0800 (PST) X-Google-Smtp-Source: AHgI3IZnPy+cODkFKGXzvBiTX9jgusiNQp0DDb/2FaJ/+LNroGz0BEanQ5DHBn373nPo16B2t3at X-Received: by 2002:a63:5e43:: with SMTP id s64mr19623008pgb.101.1549619568795; Fri, 08 Feb 2019 01:52:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549619568; cv=none; d=google.com; s=arc-20160816; b=TxSuuzGtvmQ8HZd9CGgwJph3WkLoPWzWlZqMJzIxKkUFLRpKd29Ptm9rnYrk8II02x LZBsUMSORY7QdEhCLJmUeMlowsTZ+x3dS/Bxz1l5fy8xJCYN/rwtS8tcJ7gXCQZQrPzd Djoapmb8lvbceSy7mXVr57mB3O2UEW1E/wp4BVn+WeWfcKkHtULvJiLplI+tyR9ozB2K 4sTnoBot0w5l52ekPEKT6/msgiTpvQoEpuD1LIjlJ7y32ttSBIJuTLyMlytga+yAp5y3 Wt+Y0zxKaC2DO8B6Z9uASjoewRBZ3kUuBiPqaPbD20nVIe8gNAhC7us/saU58lo7sD6N LL+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=GE3RPEPnLs2iMbWoVX/FgIL05SUf9tZmF0yg1gSSonA=; b=W4+dbfmg/sBdgFe3lCDadUEVRPwplVI/u63VF9osJxQQL/SVAKh9I+dh6ZAjBpj/8+ znfn/C5KkAXqyIvA6pjn/MCxmDuPneBTgw6IqyTCI2sGiZyOQc9nckVJJB+JCUoyzdFL u63dYNFtLYPjN6OwILRcv5ftNzb5Looon4bTllAlTnindsLjmAe5ovm2hdfGFZfGyhcx 9qfOYygRhzyHuTsdgpLKkgSBOu21yp++gJCDafA82mR99l3UhH//2OrbSyrn93Pn6tWl R1LAiFDayERy+COVh9D7BfHy1pCQH7lYAp2khvjVe+ZCUgsAH3pxPU3/zmiroGbt14O5 xnFg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x38si1711679pgl.419.2019.02.08.01.52.32; Fri, 08 Feb 2019 01:52:48 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727327AbfBHJwZ convert rfc822-to-8bit (ORCPT + 99 others); Fri, 8 Feb 2019 04:52:25 -0500 Received: from eu-smtp-delivery-151.mimecast.com ([146.101.78.151]:57711 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727127AbfBHJwY (ORCPT ); Fri, 8 Feb 2019 04:52:24 -0500 Received: from AcuMS.aculab.com (156.67.243.126 [156.67.243.126]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-97-BZtxAGQ3OTypNMlgcy5_9g-1; Fri, 08 Feb 2019 09:52:21 +0000 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) by AcuMS.aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Fri, 8 Feb 2019 09:53:04 +0000 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Fri, 8 Feb 2019 09:53:04 +0000 From: David Laight To: 'Marcelo Ricardo Leitner' CC: Julien Gomes , "netdev@vger.kernel.org" , "linux-sctp@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "davem@davemloft.net" , "nhorman@tuxdriver.com" , "vyasevich@gmail.com" , "lucien.xin@gmail.com" Subject: RE: [PATCH net] sctp: make sctp_setsockopt_events() less strict about the option length Thread-Topic: [PATCH net] sctp: make sctp_setsockopt_events() less strict about the option length Thread-Index: AQHUvmASGkCaWibVqE6iK21f5qVrJKXUlzwQgAAGVoCAAQsJ0A== Date: Fri, 8 Feb 2019 09:53:03 +0000 Message-ID: <0415888f34e7494e9879a77599c618e0@AcuMS.aculab.com> References: <20190206201430.18830-1-julien@arista.com> <20190206203754.GC13621@localhost.localdomain> <20190206210723.GD13621@localhost.localdomain> <1257941619984a2a992af8d801855c04@AcuMS.aculab.com> <20190207174715.GF13621@localhost.localdomain> In-Reply-To: <20190207174715.GF13621@localhost.localdomain> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-MC-Unique: BZtxAGQ3OTypNMlgcy5_9g-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: 'Marcelo Ricardo Leitner' > Sent: 07 February 2019 17:47 ... > > > Maybe what we want(ed) here then is explicit versioning, to have the 3 > > > definitions available. Then the application is able to use, say struct > > > sctp_event_subscribe, and be happy with it, while there is struct > > > sctp_event_subscribe_v2 and struct sctp_event_subscribe_v3 there too. > > > > > > But it's too late for that now because that would break applications > > > already using the new fields in sctp_event_subscribe. > > > > It is probably better to break the recompilation of the few programs > > that use the new fields (and have them not work on old kernels) > > than to stop recompilations of old programs stop working on old > > kernels or have requested new options silently ignored. > > I got confused here, not sure what you mean. Seems there is one "stop" > word too many. More confusing than I intended... With the current kernel and headers a 'new program' (one that needs the new options) will fail to run on an old kernel - which is good. However a recompilation of an 'old program' (that doesn't use the new options) will also fail to run on an old kernel - which is bad. Changing the kernel to ignore extra events flags breaks the 'new' program. Versioning the structure now (even though it should have been done earlier) won't change the behaviour of existing binaries. However a recompilation of an 'old' program would use the 'old' structure and work on old kernels. Attempts to recompile a 'new' program will fail - until the structure name (or some #define to enable the extra fields) is changed. Breaking compilations is much better than unexpected run-time behaviour. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)