On Saturday, January 15, 2011 00:34:23 Garrett Cooper wrote:
> On Wed, Dec 29, 2010 at 8:35 AM, Mike Frysinger <[email protected]> wrote:
> > On Wednesday, December 29, 2010 04:35:29 Vivi wrote:
> >> --- testcases/kernel/syscalls/adjtimex/adjtimex02.c
> >> +++ testcases/kernel/syscalls/adjtimex/adjtimex02.c
> >> @@ -122,12 +122,7 @@
> >>         void (*cleanup) ();
> >>         int exp_errno;
> >>  } test_cases[] = {
> >> -#ifndef UCLINUX
> >> -       /* Skip since uClinux does not implement memory protection */
> >> -       {
> >> -       (struct timex *)-1, NULL, NULL, EFAULT},
> >> -#endif
> >> -       {
> >> +       { (struct timex *)-1, NULL, NULL, EFAULT},{
> >>         &buff, setup2, NULL, EINVAL}, {
> >>         &buff, setup3, NULL, EINVAL}, {
> >>         &buff, setup4, NULL, EINVAL}, {
> >> @@ -159,7 +154,18 @@
> >>                 Tst_count = 0;
> >> 
> >>                 for (i = 0; i < TST_TOTAL; ++i) {
> >> +#ifdef UCLINUX
> >>                         /*
> >> +                        * Skip first case since uClinux does not
> >> implement +                        * memory protection.
> >> +                        */
> >> +                       if (i == 0) {
> >> +                               tst_resm(TCONF, "uClinux does not
> >> implement" +                                               " memory
> >> protection."); +                               continue;
> >> +                       }
> >> +#endif
> > 
> > we should be able to handle bad pointers like -1 and NULL.  the kernel's
> > check access func should force EFAULT.  so why do we need this new if
> > code ?
> 
>     If so, then there's a lot of code in LTP that needs to be fixed.

NOMMU can handle a few "magic" bad pointers like -1 and NULL, but only in so 
much where the kernel is given the pointer via a syscall.  in the past, this 
wasnt the case, so i imagine a lot of checks have slipped in that can be 
backed out.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to