From: Michal Simek <monstr@monstr.eu>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>,
LTP <ltp-list@lists.sourceforge.net>
Subject: Re: access_ok macor
Date: Tue, 14 Jul 2009 17:06:12 +0200 [thread overview]
Message-ID: <4A5C9EE4.4040101@monstr.eu> (raw)
In-Reply-To: <200907141645.48833.arnd@arndb.de>
Arnd Bergmann wrote:
> 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;" \
yes,
>
> 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?
yes, it should bri-d meant branch with delay slot and addik is in delay.
>
> I would guess that some of the logic in do_page_fault might be
> broken and does not actually call the fixup.
ok.
Michal
>
> Arnd <><
--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
next prev parent reply other threads:[~2009-07-14 15:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-14 12:56 access_ok macor Michal Simek
2009-07-14 13:21 ` Arnd Bergmann
2009-07-14 13:45 ` Michal Simek
2009-07-14 14:45 ` Arnd Bergmann
2009-07-14 15:06 ` Michal Simek [this message]
[not found] ` <200907141652.59049.arnd@arndb.de>
[not found] ` <4A5CAEFF.9080206@monstr.eu>
2009-07-14 16:43 ` Arnd Bergmann
2009-07-14 16:56 ` Michal Simek
2009-07-14 17:13 ` Arnd Bergmann
2009-07-14 17:45 ` Michal Simek
2009-07-15 9:21 ` Paul Mundt
2009-07-15 10:03 ` Michal Simek
[not found] ` <9e6f3dfd0907141811p512b4edp3f9dd0fdeae1123e@mail.gmail.com>
2009-07-15 10:14 ` Arnd Bergmann
2009-07-15 11:39 ` Michal Simek
2009-07-15 12:05 ` Ralf Baechle
2009-07-15 13:27 ` Arnd Bergmann
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=4A5C9EE4.4040101@monstr.eu \
--to=monstr@monstr.eu \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=ltp-list@lists.sourceforge.net \
/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