lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4A5C9EE4.4040101@monstr.eu>
Date:	Tue, 14 Jul 2009 17:06:12 +0200
From:	Michal Simek <monstr@...str.eu>
To:	Arnd Bergmann <arnd@...db.de>
CC:	Linux Kernel list <linux-kernel@...r.kernel.org>,
	LTP <ltp-list@...ts.sourceforge.net>
Subject: Re: access_ok macor

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ