mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: mkubecek@suse.cz
Cc: netdev@vger.kernel.org, vivien.didelot@gmail.com,
	linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com,
	linville@redhat.com, f.fainelli@gmail.com
Subject: Re: [PATCH net-next] ethtool: copy reglen to userspace
Date: Thu, 30 May 2019 11:26:30 -0700 (PDT)	[thread overview]
Message-ID: <20190530.112630.476132829981439143.davem@davemloft.net> (raw)
In-Reply-To: <20190530082722.GB27401@unicorn.suse.cz>

From: Michal Kubecek <mkubecek@suse.cz>
Date: Thu, 30 May 2019 10:27:22 +0200

> I believe this should be handled by ethtool_get_regs(), either by
> returning an error or by only copying data up to original regs.len
> passed by userspace. The former seems more correct but broken userspace
> software would suddenly start to fail where it "used to work". The
> latter would be closer to current behaviour but it would mean that
> broken userspace software might nerver notice there is something wrong.

I therefore think we need to meticulously fixup all of these adjustments
of regs.len before adjusting the copy call here in generic ethtool.

  reply	other threads:[~2019-05-30 18:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-28 20:58 Vivien Didelot
2019-05-30  5:17 ` David Miller
2019-05-30  6:48   ` Michal Kubecek
2019-05-30  8:27     ` Michal Kubecek
2019-05-30 18:26       ` David Miller [this message]
2019-05-30 23:38         ` Vivien Didelot

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=20190530.112630.476132829981439143.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=kernel@savoirfairelinux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linville@redhat.com \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@gmail.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

all inboxes | Powered by JetHome®