Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5243209ybi; Tue, 30 Jul 2019 16:56:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqzCrU7bpMpqS7sD30qiBbzoZA0dS6YUvCUjB/zlqvuX8LPPD334Dwb97W8CLJC3zg8OTeZa X-Received: by 2002:a17:902:b48f:: with SMTP id y15mr119899842plr.268.1564531015619; Tue, 30 Jul 2019 16:56:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564531015; cv=none; d=google.com; s=arc-20160816; b=EBlXKapiKvOvfNwOSCBxLDTOBA2ckvtYqnBer+YAxo21VrvhaksLvm/bcrS/ZHq3aK 1O04GGmMdZly073PNDJwRMMdBxin9IIX/VDF/y6+LA4UAhLXPl3Bwy0Sm9hRcZXyMWO4 QkdWMszVjJ5T8IevZMLNqj+XBkqGptZB6WkduY+qKCDyyGXjryAaYb5L4T7KeDm3UeCw EOogxwtEvbcciW5J4YecX9XFnDyou+0EyprFnXbLtalr8xkSYUYbJec8WuWq7+QUPIPL qiZJrGXbpGHiaxs5ZpH1zOK+mz1t0PBLdevzngh+eM9KjxQLvwB/zabKaOQO0JcJiJ8O MqEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=HFsovh/K0f3gkr8tWE9C52PAaana+r0YYgMQrvbrx64=; b=PEfqQ833MT/A+1UUfPcFSuzPM/I8U93LHAvJgMm/5JsneblBo9VWL04yVKfVMOdfr8 tysH38DiyJX5Hw2lk4VESxvsiexWi1sGU3ocSq6U/WDAOQEKQQTtJ+anbUU/oGA3F+2x cQXKCqDE0kDecgs0/x+Yi0N9MI23V7D5Y/MrKGLoHOjXAja2UezPtYEUz8PqgSSVTHKY vsRYwape3EXLZDXkwdiyQy5LdYicqF8f7JB0InhC1RaQQHytJrJXgcuHm/KE/h57kKwm wRiMTUIUPU4Wp8VhCiLl3xUmymQX767+O1PsDII6DUy+g+Q8JD5ZLLEdrx6ONec6eBL6 FEOA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q13si29410743pls.369.2019.07.30.16.56.39; Tue, 30 Jul 2019 16:56:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728858AbfG3Vmg (ORCPT + 99 others); Tue, 30 Jul 2019 17:42:36 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:55724 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725975AbfG3Vmg (ORCPT ); Tue, 30 Jul 2019 17:42:36 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::d71]) (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 A68DC14E7A6C2; Tue, 30 Jul 2019 14:42:35 -0700 (PDT) Date: Tue, 30 Jul 2019 14:42:35 -0700 (PDT) Message-Id: <20190730.144235.188879655867188705.davem@davemloft.net> To: arnd@arndb.de Cc: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, g.nault@alphalink.fr, mostrows@earthlink.net, xeb@mail.ru, jchapman@katalix.com, netdev@vger.kernel.org Subject: Re: [PATCH v5 09/29] compat_ioctl: pppoe: fix PPPOEIOCSFWD handling From: David Miller In-Reply-To: <20190730192552.4014288-10-arnd@arndb.de> References: <20190730192552.4014288-1-arnd@arndb.de> <20190730192552.4014288-10-arnd@arndb.de> 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]); Tue, 30 Jul 2019 14:42:36 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann Date: Tue, 30 Jul 2019 21:25:20 +0200 > Support for handling the PPPOEIOCSFWD ioctl in compat mode was added in > linux-2.5.69 along with hundreds of other commands, but was always broken > sincen only the structure is compatible, but the command number is not, > due to the size being sizeof(size_t), or at first sizeof(sizeof((struct > sockaddr_pppox)), which is different on 64-bit architectures. > > Guillaume Nault adds: > > And the implementation was broken until 2016 (see 29e73269aa4d ("pppoe: > fix reference counting in PPPoE proxy")), and nobody ever noticed. I > should probably have removed this ioctl entirely instead of fixing it. > Clearly, it has never been used. > > Fix it by adding a compat_ioctl handler for all pppoe variants that > translates the command number and then calls the regular ioctl function. > > All other ioctl commands handled by pppoe are compatible between 32-bit > and 64-bit, and require compat_ptr() conversion. > > This should apply to all stable kernels. > > Acked-by: Guillaume Nault > Signed-off-by: Arnd Bergmann Applied and queued up for -stable, thanks everyone.