From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 051F6C47420 for ; Tue, 29 Sep 2020 17:53:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A3336207F7 for ; Tue, 29 Sep 2020 17:53:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="OcDBYNyl" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728464AbgI2RxP (ORCPT ); Tue, 29 Sep 2020 13:53:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727941AbgI2RxK (ORCPT ); Tue, 29 Sep 2020 13:53:10 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F08E9C061755; Tue, 29 Sep 2020 10:53:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=EgLj5hBKCRRvi/jIx9GE19koP6614RQSBYAhIUkeExM=; b=OcDBYNylpQAznL+Wv6hdoNYtyw JP2fHtvHTaxif8vXslOLhnqIz1vXISUG4MWoy40A4DW41SDQy1MXWbbVhHRyyZjGy2bYxdkjnTYKA syYWMgKCiCRtTKh5u1KovMtTO+EPazCucYMLkW/H7dVcP65rdmhPKl5vNhy96pHLog0dfMbFxtx7U R7w9WCs0xnr3v1LdeU1G/Rvpyq6IryN4GKnd6EtUDgRN06emyEvAjatPJEN6B/aTpYi+h14VUCf1L R0GRbTB99f6imrQw2L7BLHpxCkkkuykWkMQ72pNCHRgMmXUjpi7EmstJb7wbzV/ejDkLymikeGfiJ EkWGrv/w==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNJo7-0000iA-4P; Tue, 29 Sep 2020 17:52:55 +0000 Date: Tue, 29 Sep 2020 18:52:55 +0100 From: Christoph Hellwig To: Arnd Bergmann Cc: Christoph Hellwig , "David S. Miller" , Jakub Kicinski , Jiri Pirko , Taehee Yoo , Eric Dumazet , Alexei Starovoitov , Andrew Lunn , Jens Axboe , Networking , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 2/2] dev_ioctl: split out SIOC?IFMAP ioctls Message-ID: <20200929175255.GA2330@infradead.org> References: <20200918120536.1464804-1-arnd@arndb.de> <20200918120536.1464804-2-arnd@arndb.de> <20200919054831.GN30063@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, Sep 25, 2020 at 02:28:29PM +0200, Arnd Bergmann wrote: > > > +++ b/include/uapi/linux/if.h > > > @@ -247,7 +247,13 @@ struct ifreq { > > > short ifru_flags; > > > int ifru_ivalue; > > > int ifru_mtu; > > > +#ifndef __KERNEL__ > > > + /* > > > + * ifru_map is rarely used but causes the incompatibility > > > + * between native and compat mode. > > > + */ > > > struct ifmap ifru_map; > > > +#endif > > > > Do we need a way to verify that this never changes the struct size? > > Not sure which way you would want to check. The point of the patch > is that it does change the struct size inside of the kernel but not > in user space. > > Do you mean we should check that the (larger) user space size > remains what it is for future changes, or that the (smaller) > kernel size remains the same on all kernels, or maybe both? I had something like: BUILD_BUG_ON(sizeof(struct ifmap) > sizeof(struct ifreq) - IFNAMSIZ); plus a suitable comment in mind.