lkml.org 
[lkml]   [2009]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: access_ok macor
Date
On Tuesday 14 July 2009, Michal Simek wrote:
> Arnd Bergmann wrote:
> Look at
> http://developer.petalogix.com/git/gitweb.cgi?p=ltp-microblaze.git;a=commitdiff;h=45f4cd783ce8b94f1267bb87c0c46e8536f62eca
>
> There are three affected tests and my quick fixes which I am trying to solve now.
>

ok, I see.

> int move_addr_to_user(struct sockaddr *kaddr, int klen, void __user *uaddr,
> int __user *ulen)
> {
> int err;
> int len;
>
> err = get_user(len, ulen);
> if (err)
> return err;
>

So the code looks something like

"1: lw %1, %2, r0; \
addk %0, r0, r0; \
2: \
.section .fixup,\"ax\"; \
3: brid 2b; \
addik %0, r0, %3; \
.previous; \
.section ,\"a\"; \
.word 1b,3b; \
.previous;" \

Not much that can go wrong there. First of all, I'd check that the
code actually looks the same in the binary. I assume that the 'addik'
gets executed when the brid branches, right?

I would guess that some of the logic in do_page_fault might be
broken and does not actually call the fixup.

Arnd <><


\
 
 \ /
  Last update: 2009-07-14 16:49    [W:0.061 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site