From: Ralf Baechle <ralf@linux-mips.org>
To: Pete Popov <ppopov@mvista.com>
Cc: linux-mips <linux-mips@linux-mips.org>
Subject: Re: unaligned handler problem
Date: Fri, 3 Jan 2003 14:46:15 +0100 [thread overview]
Message-ID: <20030103144615.A8482@linux-mips.org> (raw)
In-Reply-To: <1041589762.18883.4.camel@adsl.pacbell.net>; from ppopov@mvista.com on Fri, Jan 03, 2003 at 02:29:22AM -0800
On Fri, Jan 03, 2003 at 02:29:22AM -0800, Pete Popov wrote:
> The changes betwen rev 1.23 and 1.24 in unaligned.c, to replace
> check_axs() with verify_area(), causes any unaligned access from within
> a kernel module to crash. access_ok() returns -EFAULT as the
> __access_mask is 0xffffffff so __access_ok evaluates to > 0. It's too
> late for me to look into it any further but perhaps the problem will be
> obvious to someone else. I'm not sure what get_fs() should return in
> this case (again, the access is from within a kernel module) but it
> returns 0xffffffff.
The address error handler should do something like:
mm_segment_t seg;
seg = get_fs();
if (!user_mode(regs))
set_fs(KERNEL_DS);
... usual unaligned stuff goes here ...
set_fs(seg);
Ralf
next prev parent reply other threads:[~2003-01-03 13:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-03 10:29 unaligned handler problem Pete Popov
2003-01-03 13:46 ` Ralf Baechle [this message]
2003-01-04 20:25 ` PATCH: " Pete Popov
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=20030103144615.A8482@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=linux-mips@linux-mips.org \
--cc=ppopov@mvista.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.