Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1013162imm; Wed, 23 May 2018 08:57:15 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrZMAfBpXya+ltz+1gRFb1w472p7UtV20JHIBYPHT8PtOfZiu0fA3z/bMFDkDPJGYsX2R9d X-Received: by 2002:a17:902:264:: with SMTP id 91-v6mr3476076plc.341.1527091035914; Wed, 23 May 2018 08:57:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527091035; cv=none; d=google.com; s=arc-20160816; b=IX861Kj7NBi0qiIWgYPdLnZGsONQ6i206WhZ0+wNqxBugjRoc2NHNhJD8DIidSAIqK 0y73/UP6hS2g/3L1uwd1WCsMHjrIkyqkH9F3F1fThLO+fPnRDp9syo8u1kjFUs7scEJ2 TKOyHN1TM9KjZTHfqyMBnTefhomyotA6p8blwtv4spZGRhGXBG1I/YJY8vHt0SLto1Zr FxsXYc3CsHn/7Vf0qMOC5TbOVczBltHS4YNhxOSb7MRJB2jgcrnzrq/rBuaS3pxMeG/4 kHZFDKMRcFdQvJFWyT4HUNM0Oleyy5+XSaCCAaEaA60zUZmxl/6cfccOl9HuvPfSLADs LQjQ== 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 :arc-authentication-results; bh=Hx5I3lORi/XSc8fEpiN5ydGLZueEvZlLg/qI+GiGL8M=; b=pechXQ5wjpgY8mkflqLUw4Lv5kGPIlLxNBLgNmUKWAhd/ugyx9UrriHwE+FPt3bCsz mGg2auJz3HezoGDu/GKOABxbsv7CsDd2LOi3C9k8uO/vfOrci9sRtdiGgNQsS/AkLf0u ew7nBuFcCx3vvMCbAebdeY8PsxLT8oaPcOHPHDNwRVSZiOCpMSzEEDaMoteJAae7kHaG ol7SMMpt8+uraAnfk+cqeb5lzYy8Yyp6VUjFoypl9toT7b9We3nvLDgQ04iGiRcHMtoW undBpFhZbMlwNr1XHF7QPXX6Ii9D0X10wQvZDaGOEzDSCIzArQl6orNSV7PbttBcl/Nu J2Dw== 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 5-v6si18958667pfd.73.2018.05.23.08.57.01; Wed, 23 May 2018 08:57:15 -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 S933471AbeEWP4l (ORCPT + 99 others); Wed, 23 May 2018 11:56:41 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:58836 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751201AbeEWP4i (ORCPT ); Wed, 23 May 2018 11:56:38 -0400 Received: from localhost (pool-173-77-163-54.nycmny.fios.verizon.net [173.77.163.54]) (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 2EE16144B3436; Wed, 23 May 2018 08:56:37 -0700 (PDT) Date: Wed, 23 May 2018 11:56:36 -0400 (EDT) Message-Id: <20180523.115636.2241611659399097483.davem@davemloft.net> To: g.nault@alphalink.fr Cc: ebiggers3@gmail.com, linux-ppp@vger.kernel.org, paulus@samba.org, netdev@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com, ebiggers@google.com Subject: Re: [PATCH] ppp: remove the PPPIOCDETACH ioctl From: David Miller In-Reply-To: <20180523135708.GB1569@alphalink.fr> References: <20180523032958.GE658@sol.localdomain> <20180523035952.25768-1-ebiggers3@gmail.com> <20180523135708.GB1569@alphalink.fr> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) 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, 23 May 2018 08:56:37 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Guillaume Nault Date: Wed, 23 May 2018 15:57:08 +0200 > I'd rather add > + if (cmd == PPPIOCDETACH) { > + err = -EINVAL; > + goto out; > + } > > Making PPPIOCDETACH unknown to ppp_generic means that the ioctl would > be handled by the underlying channel when pf->kind == CHANNEL (see the > chan->ops->ioctl() call further down). That shouldn't be a problem per > se, but even though PPPIOCDETACH is unsupported, I feel that it should > remain a ppp_generic thing. I don't really want its value to be reused > for other purposes in the future or have different behaviour depending > on the underlying channel. > > Also PPPIOCDETACH can already fail with -EINVAL. Therefore, if ever > there really were programs out there using this call, they'd already > have to handle this case. Unconditionally returning -EINVAL would > further minimise possibilities for breakage. I agree.