Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Joel Soete <soete.joel@tiscali.be>
To: Mike Frysinger <vapier@gentoo.org>
Cc: parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] confirme: bug in arg checking in clone.S
Date: Sat, 04 Mar 2006 20:00:17 +0000	[thread overview]
Message-ID: <4409F1D1.70605@tiscali.be> (raw)
In-Reply-To: <200601080241.07960.vapier@gentoo.org>

Hello Mike and list,

Mike Frysinger wrote:
> for some reason the attached test case (originally from LTP) segfaults on 
> glibc/hppa systems ... every other arch ive tested on works fine ...
> 
Ok I find this LTP Stuff.
# ./clone04
clone04     1  BROK  :  Unexpected signal 11 received.


Effectively, as the comment said:
  * DESCRIPTION
  *      Verify that,
  *      clone(2) returns -1 and sets errno to EINVAL if
  *      child stack is set to a zero value(NULL)

Also as your subject better explain, the hppa implementation didn't do a "Sanity check arguments" (as other arch does).

Can somebody could check this patch proposal:
--- ./sysdeps/unix/sysv/linux/hppa/clone.S.Orig 2006-01-14 17:48:33.000000000 +0000
+++ ./sysdeps/unix/sysv/linux/hppa/clone.S      2006-03-04 19:46:03.000000000 +0000
@@ -46,6 +46,11 @@
          .text
  ENTRY(__clone)

+       /* Sanity check arguments.  */
+       ldi     -EINVAL, %ret0
+       comib,=,n       0,%r26,.Lerror  /* no NULL function pointers */
+       comib,=,n       0,%r25,.Lerror  /* no NULL stack pointers */
+
         /* Save the fn ptr and arg on the new stack.  */
         stwm    %r26,64(%r25)
         stw     %r23,-60(%r25)
====<>====

(Not sure I didn't miss some nop in delay slot on comib?)

Thanks in advance,
	Joel
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

  reply	other threads:[~2006-03-04 20:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-08  7:41 [parisc-linux] bug in arg checking in clone.S ? Mike Frysinger
2006-03-04 20:00 ` Joel Soete [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-03-17  9:08 [parisc-linux] confirme: bug in arg checking in clone.S Joel Soete

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=4409F1D1.70605@tiscali.be \
    --to=soete.joel@tiscali.be \
    --cc=parisc-linux@lists.parisc-linux.org \
    --cc=vapier@gentoo.org \
    /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