From: David Miller <davem@davemloft.net>
To: vivien.didelot@gmail.com
Cc: netdev@vger.kernel.org, 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: Wed, 29 May 2019 22:17:44 -0700 (PDT) [thread overview]
Message-ID: <20190529.221744.1136074795446305909.davem@davemloft.net> (raw)
In-Reply-To: <20190528205848.21208-1-vivien.didelot@gmail.com>
From: Vivien Didelot <vivien.didelot@gmail.com>
Date: Tue, 28 May 2019 16:58:48 -0400
> ethtool_get_regs() allocates a buffer of size reglen obtained from
> ops->get_regs_len(), thus only this value must be used when copying
> the buffer back to userspace. Also no need to check regbuf twice.
>
> Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
Hmmm, can't regs.len be modified by the driver potentially?
next prev parent reply other threads:[~2019-05-30 5:17 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 [this message]
2019-05-30 6:48 ` Michal Kubecek
2019-05-30 8:27 ` Michal Kubecek
2019-05-30 18:26 ` David Miller
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=20190529.221744.1136074795446305909.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=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®