From: Al Viro <viro@ZenIV.linux.org.uk>
To: David Miller <davem@davemloft.net>
Cc: pmoore@redhat.com, netdev@vger.kernel.org, selinux@tycho.nsa.gov,
linux-security-module@vger.kernel.org
Subject: Re: [PATCH] ipv6: avoid copy_from_user() via ipv6_renew_options_kern()
Date: Sat, 23 Jun 2018 22:26:27 +0100 [thread overview]
Message-ID: <20180623212626.GD30522@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20180623.105706.385733107379565893.davem@davemloft.net>
On Sat, Jun 23, 2018 at 10:57:06AM +0900, David Miller wrote:
> From: Paul Moore <pmoore@redhat.com>
> Date: Fri, 22 Jun 2018 17:18:20 -0400
>
> > - const mm_segment_t old_fs = get_fs();
> > -
> > - set_fs(KERNEL_DS);
> > - ret_val = ipv6_renew_options(sk, opt, newtype,
> > - (struct ipv6_opt_hdr __user *)newopt,
> > - newoptlen);
> > - set_fs(old_fs);
>
> So is it really the case that the traditional construct:
>
> set_fs(KERNEL_DS);
> ... copy_{from,to}_user(...);
> set_fs(old_fs);
>
> is no longer allowed?
s/no longer allowed/best avoided/, but IMO in this case the replacement is
too ugly to live ;-/
next prev parent reply other threads:[~2018-06-23 21:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-22 21:18 [PATCH] ipv6: avoid copy_from_user() via ipv6_renew_options_kern() Paul Moore
2018-06-23 1:57 ` David Miller
2018-06-23 21:26 ` Al Viro [this message]
2018-06-23 22:21 ` Al Viro
2018-06-24 7:48 ` David Miller
2018-06-25 14:49 ` Paul Moore
2018-06-23 12:16 ` David Miller
2018-06-23 16:15 ` Paul Moore
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=20180623212626.GD30522@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=davem@davemloft.net \
--cc=linux-security-module@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pmoore@redhat.com \
--cc=selinux@tycho.nsa.gov \
/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