linux-ppp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers3@gmail.com>
To: David Miller <davem@davemloft.net>
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
Date: Wed, 23 May 2018 21:17:09 +0000	[thread overview]
Message-ID: <20180523211709.GA63112@gmail.com> (raw)
In-Reply-To: <20180523.115636.2241611659399097483.davem@davemloft.net>

On Wed, May 23, 2018 at 11:56:36AM -0400, David Miller wrote:
> From: Guillaume Nault <g.nault@alphalink.fr>
> 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

  reply	other threads:[~2018-05-23 21:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <f403043d0f18f879cc056648a875@google.com>
2018-05-14  6:11 ` KASAN: use-after-free Read in remove_wait_queue (2) Eric Biggers
2018-05-18 16:02   ` Guillaume Nault
2018-05-23  3:29     ` Eric Biggers
2018-05-23  3:59       ` [PATCH] ppp: remove the PPPIOCDETACH ioctl Eric Biggers
2018-05-23 13:57         ` Guillaume Nault
2018-05-23 15:56           ` David Miller
2018-05-23 21:17             ` Eric Biggers [this message]
2018-05-23 21:37         ` [PATCH v2] " Eric Biggers
2018-05-23 23:04           ` Paul Mackerras
2018-05-24 14:04           ` Guillaume Nault
2018-05-25  2:55           ` David Miller
2018-06-06  9:01           ` Walter Harms
2018-05-23 13:26       ` KASAN: use-after-free Read in remove_wait_queue (2) Guillaume Nault

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180523211709.GA63112@gmail.com \
    --to=ebiggers3@gmail.com \
    --cc=davem@davemloft.net \
    --cc=ebiggers@google.com \
    --cc=g.nault@alphalink.fr \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-ppp@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=paulus@samba.org \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).