From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12777 Path: news.gmane.org!.POSTED!not-for-mail From: Patrick Oppenlander Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] arm asm for vfork Date: Mon, 30 Apr 2018 12:32:53 +1000 Message-ID: References: <20180430013622.28792-1-patrick.oppenlander@gmail.com> <20180430013622.28792-2-patrick.oppenlander@gmail.com> <20180430020944.GF1392@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1525055638 8413 195.159.176.226 (30 Apr 2018 02:33:58 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 30 Apr 2018 02:33:58 +0000 (UTC) Cc: musl@lists.openwall.com To: Rich Felker Original-X-From: musl-return-12793-gllmg-musl=m.gmane.org@lists.openwall.com Mon Apr 30 04:33:54 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1fCydV-00027B-FG for gllmg-musl@m.gmane.org; Mon, 30 Apr 2018 04:33:53 +0200 Original-Received: (qmail 20085 invoked by uid 550); 30 Apr 2018 02:36:02 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 17583 invoked from network); 30 Apr 2018 02:33:05 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=kDn3OlVn6KrZc110oz9HBQYCsnFtp8sJK80jtd60rV4=; b=U3ijZFRFf3SGE/+fnczgSepp0L3NnbYUNmQLW4Jn3inIfnxIexLGo71F3qtRWC+VQB 6Yx549YcYC2LU57b75JXrKChVMDT/KvZ8nSML9XaIlJJjQgzpsuK1miFZsANgpMA2iaI iCaFQaPmsVL//7qlGwwFsoCwWcQeLTZ+7STH3zuIublWJHn4UjQ/GQtn+70Rcd1kJbey 7dnDEtZNupGv8AgVBRAapF8whnGLO9rriByyp9j75NmRQt4saFRJmVxlmtSXLJ6B333F AFhyLN9XjoM9wLiNUWQ/t8OYsPFGtLpsKfs20jTlOsVtotlQXjZ+zxCshvQAkrdWZ2hb vX8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=kDn3OlVn6KrZc110oz9HBQYCsnFtp8sJK80jtd60rV4=; b=EQtbgzvMpdmpcdkvHPCXANewe4YDKZMUS62vXHVwsILwcteaS8UQbXmbCV4Y4D4NKQ My32RovOFU3A2zwhUv6NvwW+MsYuyLBq+7ZWX/1DREwmJB5LNlqsXBRk3sHlRqUaRd4+ l11Hu6S3ZgEAWGZTez0UQBuZWq82xY9E+o6GwbuchMzRcWok2ZLQCjQ886SEsm3iQZA8 Y0vExMFhDeTg84qExOpMewLkhdj0Ay1zdkbT8Nl07JY3vXuEdoIFCDTiPHF2hgqHgA/j lPnvuUEzjsqxporro3EIamlpHGwOgvfH8Nu5xi89Ba9gjMnArpbCssjvLcv9iHfhFCOI fFiQ== X-Gm-Message-State: ALQs6tDCus/gUKxEw8ffxKpazPgjbZeoYr6faCJKBM15BGH7OEkbHlHF jkRRT9FaDtOqg5upbvnGewqohJIzHZAPYtPBXdc= X-Google-Smtp-Source: AB8JxZqb7TYWTEEM6Op4TbwXcUYGSHYx5crlUDUJp9Kma0XvtjqAMzs3lelbg5sIo7+LCRac6mSq1X+zhkWXKt1PWAc= X-Received: by 2002:aed:3eee:: with SMTP id o43-v6mr9886882qtf.3.1525055574182; Sun, 29 Apr 2018 19:32:54 -0700 (PDT) In-Reply-To: <20180430020944.GF1392@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:12777 Archived-At: You're right, it's not particularly pleasant. I have an MIMXRT1050-EVK board which is what this is for -- it's a 600MHz Cortex-M7 with a 32MiB DRAM for about $80USD. More than enough to run my kernel and a few other bits and pieces for now even with the overhead of copying the program text. Are there plans for fdpic in musl as soon as GCC supports it? SVC is just a name change from SWI. Old habits die hard I guess. In my brain SWI makes more sense as it really is an interrupt and not a call. I won't bother resubmitting a patch for that though. Patrick On Mon, Apr 30, 2018 at 12:09 PM, Rich Felker wrote: > On Mon, Apr 30, 2018 at 11:36:22AM +1000, patrick.oppenlander@gmail.com wrote: >> From: Patrick Oppenlander >> >> --- >> src/process/arm/vfork.s | 12 ++++++++++++ >> 1 file changed, 12 insertions(+) >> create mode 100644 src/process/arm/vfork.s >> >> diff --git a/src/process/arm/vfork.s b/src/process/arm/vfork.s >> new file mode 100644 >> index 00000000..f01fe1d0 >> --- /dev/null >> +++ b/src/process/arm/vfork.s >> @@ -0,0 +1,12 @@ >> +.syntax unified >> +.global __vfork >> +.weak vfork >> +.type __vfork,%function >> +.type vfork,%function >> +__vfork: >> +vfork: >> + mov ip, r7 >> + mov r7, 190 >> + swi 0 >> + mov r7, ip >> + b __syscall_ret >> -- >> 2.17.0 > > Thanks. We'll need this for nommu users; right now that's not so > practical but it will be once we get fdpic added. > > I haven't tested, but the patch looks right. Elsewhere we use svc > instead of swi; not sure if that matters. > > Rich