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=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham 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 8FBAFC282D7 for ; Wed, 30 Jan 2019 15:40:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6A2022084C for ; Wed, 30 Jan 2019 15:40:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731504AbfA3PkQ (ORCPT ); Wed, 30 Jan 2019 10:40:16 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:48124 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726230AbfA3PkP (ORCPT ); Wed, 30 Jan 2019 10:40:15 -0500 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.91 #2 (Red Hat Linux)) id 1goryD-00042b-R0; Wed, 30 Jan 2019 15:40:10 +0000 Date: Wed, 30 Jan 2019 15:40:09 +0000 From: Al Viro To: Johannes Berg Cc: David Miller , netdev@vger.kernel.org, robert@ocallahan.org Subject: Re: [PATCH net 0/4] various compat ioctl fixes Message-ID: <20190130154009.GJ2217@ZenIV.linux.org.uk> References: <20190125214320.17685-1-johannes@sipsolutions.net> <20190128.112256.1993605129492088954.davem@davemloft.net> <149d1ddec433d7cb766c99eeb78b220b33090287.camel@sipsolutions.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <149d1ddec433d7cb766c99eeb78b220b33090287.camel@sipsolutions.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, Jan 28, 2019 at 10:32:30PM +0100, Johannes Berg wrote: > At the same time, fixing all this _completely_ is not very realistic, it > would require passing the ifreq size through to lots of places and > making the user copy there take the size rather than sizeof(ifreq), > obviously the very least to the method decnet uses, i.e. sock->ioctl() I > think, but clearly that affects every other protocol too. > This was what my previous patch had done partially for the directly > handled ioctls (the revert of which is the first patch in this series). > > > From what I can see this looks like probably the simplest way to > > fix this in net and -stable currently. > > I tend to agree, at least to fix the regression. > > We can still deliberate separately if we want to fix decnet for compat > or if nobody cares now. But perhaps better decnet broken (quite > obviously and detectably) like it basically always was, than IP broken > (subtly, if your struct ends up landing at the end of a page). > > Al, care to speak up about this here? Umm... Short-term I don't see anything better; long-term I would really like to see compat_alloc_user_space()/copy_in_user() crap gone and copyin-copyout for anything more or less generic lifted up as far as cleanly possible, but let's not mix it with regression fixing. So for the lack of better short-term solutions, Acked-by: Al Viro on the series.