From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id 848135A005E for ; Thu, 17 Nov 2022 08:24:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668669894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jD9hGw3deiD1ToFxElsivwq2Ddx/INOT1vRkxOeYvQg=; b=I/asv62ZrVx00883Y2Na49r76hcpN2+E/y7aJpulGA9dvFug58sVEW3BR83mMagxbFt8uN RadF+w1UmO8Uopv/cnnYPXJjApYgGzwzUXrGrayOWfEpy7cqWqY3qIcOVALtzek8Iwy1CX viV5f63ULh8PsuXqwvPV8bWMaHSLnag= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-38-BhHDnYI1P6WrQ6MnNx_z4A-1; Thu, 17 Nov 2022 02:24:50 -0500 X-MC-Unique: BhHDnYI1P6WrQ6MnNx_z4A-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0995A811E75; Thu, 17 Nov 2022 07:24:50 +0000 (UTC) Received: from maya.cloud.tilaa.com (ovpn-208-8.brq.redhat.com [10.40.208.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C40252166B29; Thu, 17 Nov 2022 07:24:49 +0000 (UTC) Date: Thu, 17 Nov 2022 08:24:47 +0100 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH v3] util, pasta: Add do_clone() wrapper around __clone2() and clone() Message-ID: <20221117082447.7c8b787d@elisabeth> In-Reply-To: References: <20221116163057.2637847-1-sbrivio@redhat.com> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: J2R7PIAAVQ3UZN2PH43SKLMX3BFEBUH2 X-Message-ID-Hash: J2R7PIAAVQ3UZN2PH43SKLMX3BFEBUH2 X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.3 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Thu, 17 Nov 2022 10:00:32 +1100 David Gibson wrote: > On Wed, Nov 16, 2022 at 05:30:57PM +0100, Stefano Brivio wrote: > > Spotted in Debian's buildd logs: on ia64, clone(2) is not available: > > the glibc wrapper is named __clone2() and it takes, additionally, > > the size of the stack area passed by the caller. > > > > Add a do_clone() wrapper handling the different cases, and also > > taking care of pointing the child's stack in the middle of the > > allocated area: on PA-RISC (hppa), handled by clone(), the stack > > grows up, and on ia64 the stack grows down, but the register backing > > store grows up -- and I think it might be actually used here. > > > > Suggested-by: David Gibson > > Signed-off-by: Stefano Brivio > > Heh, my only comment on v2 was going to be that it's not a good idea > to name identifiers starting with _ - that's reserved for the system > library. Oops, yes, I keep forgetting about that -- and we already have other offenders in util.c, I'll try to switch them to other names at some point. -- Stefano