All of lore.kernel.org
 help / color / mirror / Atom feed
From: Louis Rilling <Louis.Rilling-aw0BnHfMbSpBDgjK7y7TUQ@public.gmane.org>
To: Dave Hansen <dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: [RFC][PATCH] clone_with_pids()^w eclone() for x86_64
Date: Thu, 19 Nov 2009 22:44:34 +0100	[thread overview]
Message-ID: <20091119214433.GD4767@localdomain> (raw)
In-Reply-To: <1258666356.20093.9622.camel@nimitz>


[-- Attachment #1.1: Type: text/plain, Size: 1377 bytes --]

On Thu, Nov 19, 2009 at 01:32:36PM -0800, Dave Hansen wrote:
> On Thu, 2009-11-19 at 22:26 +0100, Louis Rilling wrote:
> > But actually this is even better :D:
> > 
> >          __asm__  __volatile__(
> >                   "movq %3, %%r10\n\t"           /* pids in r10*/
> >                   "pushq %%rbp\n\t"              /* save value of ebp */
> >                  :
> >                  :"D" (flags_low), /* rdi */
> >                   "S" (clone_args),/* rsi */
> >                   "d" (args_size), /* rdx */
> >                   "r10" (pids)     /* Linux reads its fourth arg from r10 */
> >                  );
> 
> That gives me:
> 
> clone-lib.c:28: error: matching constraint references invalid operand
> number

?? I know that this syntax works for r8, but I don't remember for r9-r15. I don't
have my handy documentation nearby, so let met check tomorrow (if nobody finds
before).

Anyway, although not optimal, even your first version should be ok with respect
to placing the fourth arg in r10 (assuming that the compiler keeps it until the
next asm statement of course, which any [future?] code instrumentation of the
compiler could break).

Louis

-- 
Dr Louis Rilling			Kerlabs
Skype: louis.rilling			Batiment Germanium
Phone: (+33|0) 6 80 89 08 23		80 avenue des Buttes de Coesmes
http://www.kerlabs.com/			35700 Rennes

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 206 bytes --]

_______________________________________________
Containers mailing list
Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
https://lists.linux-foundation.org/mailman/listinfo/containers

  reply	other threads:[~2009-11-19 21:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-19  0:48 [RFC][PATCH] clone_with_pids()^w eclone() for x86_64 Dave Hansen
2009-11-19  9:58 ` Louis Rilling
     [not found]   ` <20091119095844.GP4379-Hu8+6S1rdjywhHL9vcZdMVaTQe2KTcn/@public.gmane.org>
2009-11-19 17:48     ` Dave Hansen
2009-11-19 21:26       ` Louis Rilling
2009-11-19 21:29         ` Louis Rilling
2009-11-19 21:32         ` Dave Hansen
2009-11-19 21:44           ` Louis Rilling [this message]
2009-11-20 13:51             ` Louis Rilling
2009-11-20  7:29     ` Sukadev Bhattiprolu
     [not found]       ` <20091120072914.GA4291-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-11-20  9:31         ` Louis Rilling

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=20091119214433.GD4767@localdomain \
    --to=louis.rilling-aw0bnhfmbspbdgjk7y7tuq@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.