From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10969 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Re: Need to zero pads in msghdr Date: Thu, 26 Jan 2017 10:01:26 -0500 Message-ID: <20170126150126.GG1533@brightrain.aerifal.cx> References: <20170125194023.GQ17692@port70.net> <20170125230042.GR17692@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1485442936 9113 195.159.176.226 (26 Jan 2017 15:02:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 26 Jan 2017 15:02:16 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Andrei Vagin To: musl@lists.openwall.com Original-X-From: musl-return-10984-gllmg-musl=m.gmane.org@lists.openwall.com Thu Jan 26 16:02:07 2017 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 1cWlYN-00081N-AJ for gllmg-musl@m.gmane.org; Thu, 26 Jan 2017 16:01:35 +0100 Original-Received: (qmail 17849 invoked by uid 550); 26 Jan 2017 15:01:39 -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 17831 invoked from network); 26 Jan 2017 15:01:38 -0000 Content-Disposition: inline In-Reply-To: <20170125230042.GR17692@port70.net> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:10969 Archived-At: On Thu, Jan 26, 2017 at 12:00:46AM +0100, Szabolcs Nagy wrote: > * Andrei Vagin [2017-01-25 11:46:44 -0800]: > > On Wed, Jan 25, 2017 at 11:40 AM, Szabolcs Nagy wrote: > > > why do you need a raw syscall? > > > > We inject our code into processes which are going to be dumped: > > https://criu.org/Parasite_code > > > > And on restore we have to unmap old libc to restore process mappings. > > if you static link to musl for the parasite then > i don't see why the syscalls have to be raw.. > > what you may worry about is process global > state that the libc takes control of > (libc internal signal handler, brk pointer, > doing things to fd 0/1/2, etc), but that you > cannot prevent with raw syscalls. My impression is that the parasite code does not link any libc, in which case it should be fine. On further consideration, though, it probably makes more sense to use kernel headers for the syscall-argument structure defs in the parasite code if it's making direct syscalls. Using the libc headers to get these structs will break if we ever have a musl2 abi (longterm idea, no idea if it will ever happen) that abstracts away all the linux kernel types behind clean, arch-independent, extensible definitions with translation in the libc wrapper functions. Rich