From patchwork Tue Jul 20 14:24:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 481513 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5184457jao; Tue, 20 Jul 2021 07:26:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzeo/XR3Oaa23BO6GeeS/HJZZSzMhTZ6xonzS/D+AAnf2+P/cbe+CjcKzNc7sEMdTFYZTE X-Received: by 2002:a92:b003:: with SMTP id x3mr20974012ilh.93.1626791166287; Tue, 20 Jul 2021 07:26:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626791166; cv=none; d=google.com; s=arc-20160816; b=o8PiIjpyRMbJEy+1n1ujJy/NIMlXEdJVsQSP84x8Ekc30VikozrRuDPVK+MrN6Cakp jMit+HdP4RVSMoQ5e+VqF2AhSDC5OKfu2fdLGun1X9jPJtDzx5LKwrbPiY9YqZ1XsPaB yqGLesprCJCuTMbFBZjpU49I/0+w+/wHSgelxogvxWtFYXIDSSP1fMhfgxB5jXF7X206 Cgp/5bgLPEP+09PrV1KiPyc5TowBk90h+rbWNoi5ARYs1PslXNC/mF6xwqY7GiSvHY0T 1GClZCRyKQozGMXukge3Y9G9deTESWPzRF7KxR9e14SX0ooNH7JUPE08DnoQvVQKEna6 PmeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=H4sQcFXKKO7lyyT6zZbPiAcPTHSFI9ZjqcegvXXN4p8=; b=KOkCWIkBVghUFpk+pKSClLzmEQeytSRZ+zRxiMIgoa3HpgyZA9wUjYeJTIzitLfS7D GmAzaiUd1XPyG2TSuo9To9NWK+I3Oo87BGHC3xi4KgVXlXB3ENW9F3amF7xrVrwcdLL4 jtzflqyjt0Jn854QGp0C7Tuid7bPrQq47rnaTlbFsogC8eFxRvoZvogwLHkKd05H9z2F AQNwdONPnpcoa+RfCW7nGuvuUxeq53s88Su43kypeJxdM6KwI7XLsZyFAtqfGT+P6xcy rgmwMe7cmQ9xnndl/eJh8HJgqdX3xsWqplL6zF5Lf+NLumhXHN5J1yf0NM8x682DDA3y r8kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="YK4PZQq/"; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w14si17538985iov.43.2021.07.20.07.26.06; Tue, 20 Jul 2021 07:26:06 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="YK4PZQq/"; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237716AbhGTNpV (ORCPT + 8 others); Tue, 20 Jul 2021 09:45:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:43902 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239219AbhGTNoC (ORCPT ); Tue, 20 Jul 2021 09:44:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id ED0CF61186; Tue, 20 Jul 2021 14:24:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626791080; bh=33FmweyIjGpVwxzS1gA3HQJS3T8GqGsOi0jCBxqYN30=; h=From:To:Cc:Subject:Date:From; b=YK4PZQq/OzfDxHeNyj17714LT48vsbniEwjfJNGXPs92nfuczOGbz/n+ah08bZbfG MpOGGYM1vqv5JXWRt359XrF8JfvHQ1GBUgsLW4b3uyZbtqV96stVh5pG9+CBTgNW6e vkX9zE/tEsMbqv40HhdMZc1hkM+9pLVld8RXoLMIFzeOMrw/U9ZYjakNdIpGLLGDH5 rmumfStwrIiWu37FSJmkl8ZeVWgw/G1dv6gLxsp2A5u7x+ePLSiKZUiPt/nlQd/mRE JV9ps9ufZ2DG7CIYNvn8EM/Yd4M4aI4OpTiCAlv2g9Al+YbZnNO2xx7S32yLtufp8a 2rftw4HYYmC8w== From: Arnd Bergmann To: netdev@vger.kernel.org Cc: Christoph Hellwig , Arnd Bergmann Subject: [PATCH net-next v5 0/4] remove compat_alloc_user_space() Date: Tue, 20 Jul 2021 16:24:32 +0200 Message-Id: <20210720142436.2096733-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Arnd Bergmann This is the fifth version of my series, 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. The patches are largely identical to v4 that I sent last November, with small fixes for issues pointed out by Jakub and my own randconfig build bot. Arnd Link: https://lore.kernel.org/netdev/20201124151828.169152-1-arnd@kernel.org/ Changes in v5: - Rebase to v5.14-rc2 - Fix a few build issues Changes in v4: - build fix without CONFIG_INET - build fix without CONFIG_COMPAT - style fixes pointed out by hch Changes in v3: - complete rewrite of the series 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 | 82 +++++------ include/linux/ethtool.h | 4 - include/linux/inetdevice.h | 9 ++ include/linux/netdevice.h | 12 +- net/appletalk/ddp.c | 4 +- net/core/dev_ioctl.c | 152 ++++++++++--------- net/ethtool/ioctl.c | 136 +++++++++++++++-- net/ieee802154/socket.c | 4 +- net/ipv4/af_inet.c | 6 +- net/ipv4/devinet.c | 4 +- net/qrtr/qrtr.c | 4 +- net/socket.c | 292 +++++++++---------------------------- 12 files changed, 333 insertions(+), 376 deletions(-) -- 2.29.2