From patchwork Fri Nov 6 17:32:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 1395788 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=default header.b=Yt4ZdVGl; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4CSSC36kMvz9sTK for ; Sat, 7 Nov 2020 04:32:47 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727402AbgKFRco (ORCPT ); Fri, 6 Nov 2020 12:32:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:44912 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726880AbgKFRco (ORCPT ); Fri, 6 Nov 2020 12:32:44 -0500 Received: from localhost.localdomain (HSI-KBW-46-223-126-90.hsi.kabel-badenwuerttemberg.de [46.223.126.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E5BC2208C7; Fri, 6 Nov 2020 17:32:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604683963; bh=5G5/+qsfkd03dr/u9VuK6kmwlPcC74OxnFKxdHbYmIw=; h=From:To:Cc:Subject:Date:From; b=Yt4ZdVGlSocn/CabcrgBRNKDeNavDHJrSKyeYhL8BDuvg3sk4KJP/1ztC9FXS6+7a iWNr6OA3sVh2aztUxqjg9nlvGfgmALKxjMvTOnU5B7TRPkjWRYseRIe6L1loKYfM+z stBEEvQz41PmdgY89FE89Yx2yRgb4NmgnhdJCBJg= From: Arnd Bergmann To: netdev@vger.kernel.org Cc: Arnd Bergmann , "David S. Miller" , Jakub Kicinski , Christoph Hellwig , Jiri Pirko , Taehee Yoo , Eric Dumazet , Alexei Starovoitov , Andrew Lunn , linux-kernel@vger.kernel.org Subject: [PATCH net-next v3 0/4] remove compat_alloc_user_space() Date: Fri, 6 Nov 2020 18:32:27 +0100 Message-Id: <20201106173231.3031349-1-arnd@kernel.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann This is the third version of my seires, now spanning four patches instead of two, with a new approach for handling struct ifreq compatibility after I realized that my earlier approach introduces additional problems. The idea here is to always push down the compat conversion deeper into the call stack: rather than pretending to be native mode with a modified copy of the original data on the user space stack, have the code that actually works on the data understand the difference between native and compat versions. I have spent a long time looking at all drivers that implement an ndo_do_ioctl callback to verify that my assumptions are correct. This has led to a series of 29 additional patches that I am not including here but will post separately, fixing a number of bugs in SIOCDEVPRIVATE ioctls, removing dead code, and splitting ndo_do_ioctl into two new ndo callbacks for private and ethernet specific commands. Arnd Arnd Bergmann (4): ethtool: improve compat ioctl handling net: socket: rework SIOC?IFMAP ioctls net: socket: simplify dev_ifconf handling net: socket: rework compat_ifreq_ioctl() include/linux/compat.h | 18 +-- include/linux/ethtool.h | 4 - include/linux/inetdevice.h | 8 + include/linux/netdevice.h | 12 +- net/appletalk/ddp.c | 4 +- net/core/dev_ioctl.c | 156 +++++++++++--------- net/ethtool/ioctl.c | 143 ++++++++++++++++-- net/ieee802154/socket.c | 4 +- net/ipv4/af_inet.c | 6 +- net/ipv4/devinet.c | 4 +- net/qrtr/qrtr.c | 4 +- net/socket.c | 291 +++++++++---------------------------- 12 files changed, 311 insertions(+), 343 deletions(-) Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Christoph Hellwig Cc: Jiri Pirko Cc: Taehee Yoo Cc: Eric Dumazet Cc: Alexei Starovoitov Cc: Andrew Lunn Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org