Ultralinux archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: ultralinux@vger.kernel.org
Subject: Re: [buytenh@gnu.org: [cry for advice] sparc64 bridging troubles]
Date: Fri, 11 Jan 2002 08:15:54 +0000	[thread overview]
Message-ID: <marc-linux-ultrasparc-101073703105074@msgid-missing> (raw)
In-Reply-To: <marc-linux-ultrasparc-101068859405697@msgid-missing>

   From: Lennert Buytenhek <buytenh@gnu.org>
   Date: Thu, 10 Jan 2002 13:49:20 -0500
   
   This copy_from_user invocation hangs the box solid, every single time.  The
   arguments it's called with are fffff8001395f910, 00000000effff9f8, 32.  I
   would think these look OK (and even if they wouldn't I guess they shouldn't
   hang the box).

If set_fs(KERNEL_DS) this will hang the box because that means that
both pointers need to be kernel points.  I bet that is the state
you've left it in when sys_ioctl() is invoked.

The whole gist of ioctl32.c's workings is:

1) copy user struct into kernel copy
2) translate into 64-bit kernel copy
3) orig_fs = get_fs(); set_fs(KERNEL_DS);
4) pass kernel copy to sys_ioctl()
5) set_fs(orig_fs);

The real solution is to move away from SIOCDEVPRIVATE since those
are deprecated anyways, but you appear to understand this already.
:-)

Franks a lot,
David S. Miller
davem@redhat.com

  reply	other threads:[~2002-01-11  8:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-10 18:49 [buytenh@gnu.org: [cry for advice] sparc64 bridging troubles] Lennert Buytenhek
2002-01-11  8:15 ` David S. Miller [this message]
2002-01-16 17:46 ` Lennert Buytenhek
2002-01-16 17:54 ` David S. Miller
2002-01-16 17:57 ` Lennert Buytenhek

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=marc-linux-ultrasparc-101073703105074@msgid-missing \
    --to=davem@redhat.com \
    --cc=ultralinux@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