[Top] [All Lists]

Re: unaligned handler problem

To: Pete Popov <>
Subject: Re: unaligned handler problem
From: Ralf Baechle <>
Date: Fri, 3 Jan 2003 14:46:15 +0100
Cc: linux-mips <>
In-reply-to: <>; from on Fri, Jan 03, 2003 at 02:29:22AM -0800
Original-recipient: rfc822;
References: <>
User-agent: Mutt/
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))

        ... usual unaligned stuff goes here ...



<Prev in Thread] Current Thread [Next in Thread>