From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13052 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: Wed, 18 Jul 2018 12:20:00 +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: multipart/mixed; boundary="000000000000cfffef05713cb3e0" X-Trace: blaine.gmane.org 1531880303 31957 195.159.176.226 (18 Jul 2018 02:18:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 18 Jul 2018 02:18:23 +0000 (UTC) Cc: musl@lists.openwall.com Original-X-From: musl-return-13068-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jul 18 04:18:19 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 1ffc2k-0008D8-NE for gllmg-musl@m.gmane.org; Wed, 18 Jul 2018 04:18:18 +0200 Original-Received: (qmail 4045 invoked by uid 550); 18 Jul 2018 02:20:24 -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 4027 invoked from network); 18 Jul 2018 02:20:24 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:cc; bh=MLDQ4t4a+qKcYVRj5cRxY8JtN1HheqOc52GG8ZrQ/zk=; b=i6vYhv9inB72I1vktRDIKPqMqg72qslTuuECRYJKH0RM76UXwusBw2d5V8r3uWZY1n g8ISdsVq2YIEjer+H2SdvhRxKsaMCJvmKwQmog9+IWbPe0flvsgcwOVlthHglGeTWrAa UaXPiygqDMBLa6qOYM/X8zAmA2rov6uiYVDtT6fFBJkPQ+9QEpsWs5xQj7ec2Ms8E5bx 9cnkZhAqyOLBNGIwBOiPrKtOSMPSj43YdTsBVyIgQcWyHBl9SHU8NdqaAtsaH2ylOWgT 7GXnt7X5c5Ig/5UylM+eIBm70KqCsns+IoeTW9824x8WBEHBiE1QbTsEhgq50lPBY29N cbaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:cc; bh=MLDQ4t4a+qKcYVRj5cRxY8JtN1HheqOc52GG8ZrQ/zk=; b=s329xbhBx8qpeMK+QGzpHvv2VYYs8uOetCF+GwOtslwnH6puQtjis8jUDB36DyZ2Cr sEcJ5Tu76KhHl/d5sd/u+sr3fxn2k0gOvuhGTdii6HDW3/63bpueHsMwC3niQxTXDKAP MZLhleubDFLRCsyBPvjAKzo4TEBm9xrMw5Dy8YT2Zemormk4WXumONUdZ8aKtSLJaQc8 4QuYIpI/S83BOZf/zvN0To0Z9Ne6IxtpL0RQga5W15yIHf4AP5waINlIJG+Ama/jCSDF nWb7HFYaiQjUpXbpGe0wFJyJi7rnfHd/QqPkoeJiXkJ4y7coHLw1lBuU/objY+qhDcrJ kBVQ== X-Gm-Message-State: AOUpUlFy5i23nB8u2I6iQH9qMiIhyRsdjHXvVNkrQNKNm1uSB537rUyC ENEAQlEEd7PFVS6JnxopiXGZHewAc17lxwV+kQi1wg== X-Google-Smtp-Source: AAOMgpdzR8GKFAp2VZq7nFQ0BOrgMzIPYiooVmaQ6lA8SfXbKzeAAmb/D+zggx0RYgyQd0C9GEeAEQjR4hLJ9kAR+nQ= X-Received: by 2002:a19:4e06:: with SMTP id c6-v6mr2518920lfb.30.1531880411241; Tue, 17 Jul 2018 19:20:11 -0700 (PDT) In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:13052 Archived-At: --000000000000cfffef05713cb3e0 Content-Type: text/plain; charset="UTF-8" Hi Rich, I saw another thread where it was mentioned you may be doing a 1.20 release some time soon. Is there any chance this could get merged in time? I've been running it for months without any issues now. Attached is an updated patch using svc rather than swi. Thanks, Patrick On Mon, Apr 30, 2018 at 12:32 PM Patrick Oppenlander wrote: > > 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 --000000000000cfffef05713cb3e0 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-arm-asm-for-vfork.patch" Content-Disposition: attachment; filename="0001-arm-asm-for-vfork.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jjqi15530 RnJvbSBiMGU1OWJiNjhjYjEwMmZhOGQzOTc2MjhhMzI0OGEyMDQ5MTUwZDc0IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBQYXRyaWNrIE9wcGVubGFuZGVyIDxwYXRyaWNrLm9wcGVubGFu ZGVyQGdtYWlsLmNvbT4KRGF0ZTogVHVlLCAxMCBBcHIgMjAxOCAxMTowMToyNSArMTAwMApTdWJq ZWN0OiBbUEFUQ0hdIGFybSBhc20gZm9yIHZmb3JrCgotLS0KIHNyYy9wcm9jZXNzL2FybS92Zm9y ay5zIHwgMTIgKysrKysrKysrKysrCiAxIGZpbGUgY2hhbmdlZCwgMTIgaW5zZXJ0aW9ucygrKQog Y3JlYXRlIG1vZGUgMTAwNjQ0IHNyYy9wcm9jZXNzL2FybS92Zm9yay5zCgpkaWZmIC0tZ2l0IGEv c3JjL3Byb2Nlc3MvYXJtL3Zmb3JrLnMgYi9zcmMvcHJvY2Vzcy9hcm0vdmZvcmsucwpuZXcgZmls ZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwMC4uZGI0ZTdiNDMKLS0tIC9kZXYvbnVsbAorKysg Yi9zcmMvcHJvY2Vzcy9hcm0vdmZvcmsucwpAQCAtMCwwICsxLDEyIEBACisuc3ludGF4IHVuaWZp ZWQKKy5nbG9iYWwgX192Zm9yaworLndlYWsgdmZvcmsKKy50eXBlIF9fdmZvcmssJWZ1bmN0aW9u CisudHlwZSB2Zm9yaywlZnVuY3Rpb24KK19fdmZvcms6Cit2Zm9yazoKKwltb3YgaXAsIHI3CisJ bW92IHI3LCAxOTAKKwlzdmMgMAorCW1vdiByNywgaXAKKwliIF9fc3lzY2FsbF9yZXQKLS0gCjIu MTguMAoK --000000000000cfffef05713cb3e0--