Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751557AbdIKPPb (ORCPT ); Mon, 11 Sep 2017 11:15:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36036 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751497AbdIKPP2 (ORCPT ); Mon, 11 Sep 2017 11:15:28 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 146CB90918 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=oleg@redhat.com Date: Mon, 11 Sep 2017 17:15:26 +0200 From: Oleg Nesterov To: Rob Landley Cc: Alan Cox , Geert Uytterhoeven , Linux Embedded , dalias@libc.org, "linux-kernel@vger.kernel.org" Subject: Re: execve(NULL, argv, envp) for nommu? Message-ID: <20170911151526.GA4126@redhat.com> References: <324c00d9-06a6-1fc5-83fe-5bd36d874501@landley.net> <20170905142436.262ed118@alans-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 11 Sep 2017 15:15:28 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 671 Lines: 23 On 09/08, Rob Landley wrote: > > So is exec(NULL, argv, envp) a reasonable thing to want? I think that something like prctl(PR_OPEN_EXE_FILE) which does dentry_open(current->mm->exe_file->path, O_PATH) and returns fd make more sense. Then you can do execveat(fd, "", ..., AT_EMPTY_PATH). But to be honest, I can't understand the problem, because I know nothing about nommu. You need to unblock parent sleeping in vfork(), and you can't do another fork (I don't undestand why). Perhaps the child can create another thread? The main thread can exit after that and unblock the parent. Or perhaps even something like clone(CLONE_VM | CLONE_PARENT), I dunno... Oleg.