linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiang Lu <lu.jiang@windriver.com>
To: <gregkh@linuxfoundation.org>, <linux-kernel@vger.kernel.org>,
	<linux-serial@vger.kernel.org>
Subject: [v2]serial_core:recognize invalid pointer from userspace
Date: Thu, 10 Mar 2016 11:17:22 +0800	[thread overview]
Message-ID: <1457579843-29676-1-git-send-email-lu.jiang@windriver.com> (raw)




Hi,
[v1 -> v2]

Fix a compile warning with data convert.

[v1 log]

When running setserial, application issue a TIOCGSERIAL iotcl to get serial setting, then update 
serial setting with TIOCSSERIAL ioctl. It always failed with TIOCSSERIAL ioctl, for application
pass 0xffffffff for iomem_base in serial_struct to kernel.

On 32bit rootfs & 64bit kernel, compat_ioctl use 0xffffffff as a magic number to mark invalid pointer
for iomem_base in serial_struct when truncating a 64bit pointer into 32bit.

Serial driver need recognize this invalid pointer when parsing serial_struct from userspace.

Thanks
Jiang Lu

             reply	other threads:[~2016-03-10  3:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-10  3:17 Jiang Lu [this message]
2016-03-10  3:17 ` [v2] serial_core:recognize invalid pointer from userspace Jiang Lu
2016-03-10  3:34   ` Greg KH
2016-03-10  4:56     ` Lu.Jiang
2016-03-10 13:46       ` One Thousand Gnomes
2016-03-11  2:30         ` Lu.Jiang

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=1457579843-29676-1-git-send-email-lu.jiang@windriver.com \
    --to=lu.jiang@windriver.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /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).