From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 540913858D32 for ; Fri, 11 Aug 2023 14:21:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 540913858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1691763667; 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: in-reply-to:in-reply-to:references:references; bh=HxgP291MiOx7ODA8dUNg96QQa+CahRqKT21DxtEjgPg=; b=UUVa2CSNAcVgm4Kbr0yVMn0Qbs+iQmmUAtPLubBhy/glfXTnBK0Hl5mMXyctl3c9EUi1bv Uy/Pocg5fg0G4pKgS/sN0S/9bisXdpDjbMwTqA1Z8SYmz2/nPzEjIayq5f5ZSMpZSytHIL TneIGd1X0zQ5VXzfG9IuFaj9sRGTWU0= 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-31-EvD6sKBoO4-zcuOdYeADSQ-1; Fri, 11 Aug 2023 10:21:04 -0400 X-MC-Unique: EvD6sKBoO4-zcuOdYeADSQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F3A61185A78F; Fri, 11 Aug 2023 14:21:03 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.14]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 429C51121315; Fri, 11 Aug 2023 14:21:03 +0000 (UTC) From: Florian Weimer To: Adhemerval Zanella Netto Cc: Adhemerval Zanella via Libc-alpha Subject: Re: [PATCH v7 1/8] arm: Add the clone3 wrapper References: <20230803163558.991832-1-adhemerval.zanella@linaro.org> <20230803163558.991832-2-adhemerval.zanella@linaro.org> <878rahx4r5.fsf@oldenburg.str.redhat.com> Date: Fri, 11 Aug 2023 16:21:01 +0200 In-Reply-To: (Adhemerval Zanella Netto's message of "Fri, 11 Aug 2023 11:12:33 -0300") Message-ID: <87o7jdu0c2.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: * Adhemerval Zanella Netto: > On 11/08/23 07:17, Florian Weimer wrote: >> * Adhemerval Zanella via Libc-alpha: >> >>> + /* Do the syscall, the kernel expects: >>> + r7: system call number: >>> + r0: cl_args >>> + r1: size */ >>> + push { r7 } >>> + cfi_adjust_cfa_offset (4) >>> + cfi_rel_offset (r7, 0) >>> + ldr r7, =SYS_ify(clone3) >>> + swi 0x0 >>> + cfi_endproc >>> + >>> + cmp r0, #0 >>> + beq 1f >>> + pop {r7} >> >>> +1: >>> + .fnstart >>> + .cantunwind >>> + mov r0, r3 >>> + mov ip, r2 >>> + BLX (ip) >> >> I think the stack is misaligned at the BNLX call because only one 4-byte >> register is pushed. > > It should not matter because the stack is defined by the cl_args::stack > argument. We might add a alignment check on clone-internal.c, but I > think since it uses solely on internal usage, it should be required. You are right, my mistake. Thanks, Florian