Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1329423imm; Wed, 23 May 2018 14:17:44 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoxlxdynKhAjp+VbhKAa+/WzCKFcUBQtaqzUuibA2OhQ4tslJnj5EIIPZ1GJ9AlEMXYSzv2 X-Received: by 2002:a17:902:3103:: with SMTP id w3-v6mr4385223plb.37.1527110264187; Wed, 23 May 2018 14:17:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527110264; cv=none; d=google.com; s=arc-20160816; b=pVT8RUnm8O4lF8XynKwW5FQEEe9QtbwHTyb7cPFQJgjdhRkS06XQYUtNnWftibETHZ VpxCXhGFCXxhQItB4y1Z1EpL5UJujMbkoMbhw+YiSFx7P+1dR5rFFFM4pXCme7LEKeSE k0oRPmUOfrbRNmxgNxyscxHpKFzkxelrGmArAk9/GxsBdOb85wmuMK5+LnIajcVkeHDP wwnh73/JlbMFqS1Aw3OOm64/Hd3SZHORl55AmD3jR6+CmXPHtVxKhKR5tBvP5eEqLCjY Cmv5xqGBZNAkd0c0zkismSd+ibUJYG7v5HYAa0z2J1dOaonSlMgaWNTokii2HllOg1xS bAmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=4pcF4hbif9MsjUC2Pv9tie7cg38WmrJovneHIDSKfnw=; b=ezbYNxPS05Az4creNIysGRdPpOCDz4RXENzQQheH/acnpjthlf7jXLE+BxYT5K1wra pljglyaeFIPxxEHiVkLPY8SiqCB8lkyTF+1yQi8Qnd6H0/dxTMT+XfY8AEK8jt4r2cXA inocWKqtr2X3ri2+Pyz971iJlatnuOfe08VTDuW00W5PYNmDOYQN3OGM3qw0cf/mZrHf bpvzaMaqmyEqw0jQBrySEYQ22hQ8pgTOWE897lUtHtOZTg6S9xDFnah3Csu98lYU1sWz 5OugDE+sD3BlBtbSM+rDpbYkX9deIIZOMaIGcYppNMNpWsh2VxczBqm5fsI/aHG1ntBp 61Ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dSXGrBtS; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31-v6si18410987plk.191.2018.05.23.14.17.29; Wed, 23 May 2018 14:17:44 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dSXGrBtS; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934330AbeEWVRQ (ORCPT + 99 others); Wed, 23 May 2018 17:17:16 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:42857 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933886AbeEWVRM (ORCPT ); Wed, 23 May 2018 17:17:12 -0400 Received: by mail-pf0-f194.google.com with SMTP id p14-v6so11102191pfh.9; Wed, 23 May 2018 14:17:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=4pcF4hbif9MsjUC2Pv9tie7cg38WmrJovneHIDSKfnw=; b=dSXGrBtSsiaFavirG1ikbU08F98sxhEuNrmHiLLKZhJxBYK+hU6jA62c64MKmWvuxp IWsNUA74QxNkjp1xHRsv2axc5BDE6kaVgRLSqisfe3jYutfnTgl/hHGNYwe8CStCwFbW JtJZhPkAfJgvx6q0r2Q5gHoRWAPauukMM8rIs9MhAD+3WVw7QA2sZV+JWzBQk4kqSINO nZ5yTXfTijLr7XFEdV4ag/nw1bT7ZlWa8X/FNiww7MkPxx1OxR9hjZzfimSchX/Eyc+1 //woGlEzc8/9S7JbtQ0Iki0IzqA07d40c+RbkiojjUaDTR/ofFXjY3VACWU/AwnTPXun 70mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=4pcF4hbif9MsjUC2Pv9tie7cg38WmrJovneHIDSKfnw=; b=jmhkRWnTVVlN61DRm4wD51vQ/Q0T0P0NMz7Ba5qvvoQ+4gSc0caOuV8M4Ng4zASwVi fs0TJYVEvXjHX8ckfp6kQHwrTvkR5gApotYdim/rXmwTvmzsx0eHUIeETK4pXLkM3qaA 2i7ygTRzYr580gUZFLbGxvjWH1EwldsFOPoAc59LgIiCmFZ/k+P2rsho9jI2oHmWgtH9 fMRZBi+XQB8zPpTOmK9kOOTZg/AXeR3iC2YTNlka8kUSAQ5PCp/Dx5HW975hpUW59hm+ FCn6jRaDO94Cgf+X2G28gDdHE89fiBlivb3oQ7hoA0jObIicy9OzGqIcxiOrM9Gop3xv bElA== X-Gm-Message-State: ALKqPwfp/uXNJ4zN/yCGyLp4FqyNcJC0ebd+cMaXYquCSTQ5ElO7I8Sf b+jhjCIQyTaT/Em+Ww8PFBc= X-Received: by 2002:a62:a89:: with SMTP id 9-v6mr4351835pfk.112.1527110232001; Wed, 23 May 2018 14:17:12 -0700 (PDT) Received: from gmail.com ([2620:15c:17:3:dc28:5c82:b905:e8a8]) by smtp.gmail.com with ESMTPSA id z13-v6sm51927723pfk.156.2018.05.23.14.17.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 May 2018 14:17:11 -0700 (PDT) Date: Wed, 23 May 2018 14:17:09 -0700 From: Eric Biggers To: David Miller Cc: g.nault@alphalink.fr, 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 Message-ID: <20180523211709.GA63112@gmail.com> References: <20180523032958.GE658@sol.localdomain> <20180523035952.25768-1-ebiggers3@gmail.com> <20180523135708.GB1569@alphalink.fr> <20180523.115636.2241611659399097483.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180523.115636.2241611659399097483.davem@davemloft.net> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 23, 2018 at 11:56:36AM -0400, David Miller wrote: > 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. Okay, I'll do that and leave the ioctl number reserved. I will add a pr_warn_once() too. Thanks, - Eric