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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS 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 C42C7C282D7 for ; Wed, 30 Jan 2019 18:20:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A033B218AC for ; Wed, 30 Jan 2019 18:20:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732950AbfA3SUF (ORCPT ); Wed, 30 Jan 2019 13:20:05 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:48126 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732938AbfA3SUF (ORCPT ); Wed, 30 Jan 2019 13:20:05 -0500 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::bf5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 4A16F14F464CE; Wed, 30 Jan 2019 10:20:04 -0800 (PST) Date: Wed, 30 Jan 2019 10:20:03 -0800 (PST) Message-Id: <20190130.102003.260311873638530415.davem@davemloft.net> To: viro@zeniv.linux.org.uk Cc: johannes@sipsolutions.net, netdev@vger.kernel.org, robert@ocallahan.org Subject: Re: [PATCH net 0/4] various compat ioctl fixes From: David Miller In-Reply-To: <20190130154009.GJ2217@ZenIV.linux.org.uk> References: <20190128.112256.1993605129492088954.davem@davemloft.net> <149d1ddec433d7cb766c99eeb78b220b33090287.camel@sipsolutions.net> <20190130154009.GJ2217@ZenIV.linux.org.uk> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 30 Jan 2019 10:20:04 -0800 (PST) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Al Viro Date: Wed, 30 Jan 2019 15:40:09 +0000 > 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. It's a real shame, I thought it was a super clever solution to that problem space at the time we added it. > So for the lack of better short-term solutions, > Acked-by: Al Viro > on the series. Ok, series applied, thanks everyone. I'll queue this up for -stable too.