Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp2232548rwe; Sat, 15 Apr 2023 14:47:24 -0700 (PDT) X-Google-Smtp-Source: AKy350aWr5bkUFnBmSTrpplScBUv7JQMJ9BnfsktNTIDDvlzSJOSQLK/oTBrPv/JUflkEEjuGtvy X-Received: by 2002:a05:6a00:1955:b0:63b:2102:a1d4 with SMTP id s21-20020a056a00195500b0063b2102a1d4mr13358573pfk.13.1681595244580; Sat, 15 Apr 2023 14:47:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681595244; cv=none; d=google.com; s=arc-20160816; b=OGPFT1jiZnFfR+sKiTrzVIEj+auCOgHlscuuxlIx+6x4D/u7L2AIkmzBgmFAMtyx8L Ae5OFaviMAUykvowYuwkslauRMraHrk6ySvmD8DuDmw4Q652pr6cewNCbXhJ+yzRzmqc +1fYavfdeHbO5cTLApXJ6kUH1fcFYizMNE5RoZYD/THs5XCr+bEmDHKc4WSB7llgwVYv NCHtYHuv4iqD1+GsazaJyPTP7n6Iw04ZfIJenHECKZ2XQ57uq8QQhpreRSIKXLXE7s7E +tICFAIU1DakKZxXj/dzAProtWs242hLCg5/Ug+QqT8wcgsPvb7DLraUX2OPY5f8z6W/ g7aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:dkim-signature:from; bh=BEL0CBfR9QPRVoS/KikS/bYTieh7jif6oEwZhZCzxac=; b=MxxgHrp58G2/JSp3TU2lj81i2RfHSizG/+O1w0CmWttxb75lHSi2Sq54Q+QPJp9P9L WSh6RBL6w+lKe5jNAvyV6gqIIuDh4DEqS/DrccpGIBNB5rce8PWqO+CEDwqCqG3hPSad GlA+qrpexBY5oc/dB6wgKRzVIRjmabztPaLqa5c3vmCF8Rq5Ya08aOJnbrGza9MRxoYN 6ayweth/VbRqx8GCDFAYNwYggun3K+XPko1oohULfrs8FBKbXbICAyVKB56KxYQhLwZ+ O9Q+X0O5VzImBItA+ah1uByvOVToP2pCOMV1mdPP+8RbnOAl7ucBwhi5uCFVImhp2ect 30LQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=JQ91D5LO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i20-20020aa796f4000000b0063b59a25a0asi6618456pfq.134.2023.04.15.14.47.06; Sat, 15 Apr 2023 14:47:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=JQ91D5LO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229541AbjDOV26 (ORCPT + 99 others); Sat, 15 Apr 2023 17:28:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229803AbjDOV2w (ORCPT ); Sat, 15 Apr 2023 17:28:52 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7762430D8; Sat, 15 Apr 2023 14:28:50 -0700 (PDT) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1681594128; bh=ffuzWbsBT4I0Dzm1ac4bREAFCsDITc0shbz2IoN6G7s=; h=From:Subject:Date:To:Cc:From; b=JQ91D5LOfZi7AADvHsorsBSrap9gQCs8WEn0nMe8bBwPKEMCzeBDCX6OKzrKIRpwt xUynC+oE2TFmFmP9/5/2YCcvi7szYJv52lxYwCqzHrYvd+pP8OeOD/lpBii3kO/uaj agOxYkduxAOiU+wS4nrfXQDiMUcwL8KNBxewqJq0= Subject: [PATCH 0/2] tools/nolibc: fork: fix on s390 and add test Date: Sat, 15 Apr 2023 23:28:46 +0200 Message-Id: <20230415-nolibc-fork-v1-0-9747c73651c5@weissschuh.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-B4-Tracking: v=1; b=H4sIAA4XO2QC/x2NSQrDMAwAvxJ0rsDOTr5SerBdpRExcpBpKYT8v aLHGRjmhErKVGFpTlD6cOUiBv7WQNqCvAj5aQytazvX+wGlZI4J16I7xsnNU+j6wY8jWBFDJYw aJG3WyDtnk4fSyt//4v64rh8WSOKecgAAAA== To: Willy Tarreau , Shuah Khan Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1681594127; l=927; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=ffuzWbsBT4I0Dzm1ac4bREAFCsDITc0shbz2IoN6G7s=; b=NT6hmRBQG7jQ+hw3g97sTAG6HwkeHoAj7Vr246YpEyxNiOXxpnKGk8rbLG7vK6UPH9v6ByOiZ R9vZTgycSdFAY3WiAD5lubtvCE2s1Z96Pu93wFWFKPmTPxnBg1I37Ok X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The generic fork() implementation in nolibc falls back to the clone() syscall. On s390 the first two arguments to clone() are swapped compared to other architectures, breaking the implementation in nolibc. Add a custom implementation of fork() to s390 that works. While at it also add a testcase for fork(). Signed-off-by: Thomas Weißschuh --- Thomas Weißschuh (2): tools/nolibc: s390: provide custom implementation for sys_fork tools/nolibc: add testcase for fork()/waitpid() tools/include/nolibc/arch-s390.h | 8 ++++++++ tools/include/nolibc/sys.h | 2 ++ tools/testing/selftests/nolibc/nolibc-test.c | 20 ++++++++++++++++++++ 3 files changed, 30 insertions(+) --- base-commit: c1c4f33b6be9b3412d9e0ba01b367f4ffe47c379 change-id: 20230415-nolibc-fork-b7087a345166 Best regards, -- Thomas Weißschuh