From patchwork Mon Sep 2 19:58:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 1979752 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=cjPzQnne; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WyKMt5Z91z1ynG for ; Tue, 3 Sep 2024 05:59:22 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8A10F385DDED for ; Mon, 2 Sep 2024 19:59:20 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by sourceware.org (Postfix) with ESMTPS id 0D1DF385ED40 for ; Mon, 2 Sep 2024 19:59:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0D1DF385ED40 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0D1DF385ED40 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::631 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725307143; cv=none; b=GTtjlup1w6tf6/CTnMYeKH3YoiyPiqgXF6SSwn1zJPcwVe26pb7wwrRrnflqtaJ73UtIwNckziOY50GgHmItNFEXXghhSRdo9MaJQyoluJ31rhukFHho7D+YJ3pkkIYekAJ+q1lTcl8Ha1PjkpuUut/GZlroG/eTH5B1hWW/xcA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725307143; c=relaxed/simple; bh=c49Wp1wYh6NPcUctESNiRRD5mhV2PJbO5vC5Ela8TjM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=S+CWTU93ZJ5rvEL1U5dtmcmuoy9GIuya3kCqDK3GaO4LCrh/Ma0nDqDyH7wsFpVX7BCe5GPUfudtRGoRhSPr+m1JTklw0L6J/UYj3s1Wlj3ZcLcm1zL9jLItDSOzPUHf5SiMB4N48YqMiVbk+kLjPWMNZ8SQrZbPsPuZPKtAlTI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-20230059241so36113965ad.3 for ; Mon, 02 Sep 2024 12:59:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725307139; x=1725911939; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=TDanTPZZr6sf8v0ptERkQLME9vJa2gorkgBMxqaqZ5I=; b=cjPzQnneh+UUVjjyl6SrVMwwSSKd89TiCytUGApJULksKcXlG7K6wdHK7lB2+v2HV/ vwgbPFW58gjoNw2OmEMm2Gwm5X0aYoOwi0ozwe/U0zlwOhDSw3n8NwNDtfMeunl52zp5 cnIlj8atnph+H4sp2pZA2g4pYT+jcEyDut5aY5zrUfCsoLMt06+7CqnG7tvCkTTUw1xW ErZ06yV6uFrdrceEU6GJLdfdycUWKI+2hNj0NZxY4b/W9kKeTQbcJk9hPfeSdPAQ5eje RqV9n3ZoBHyQB2WF2N1djrj327KUUoWlDHo+vtsN6g6nSUUx2EiA19P8PZyDkDgO8i3I YBdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725307139; x=1725911939; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TDanTPZZr6sf8v0ptERkQLME9vJa2gorkgBMxqaqZ5I=; b=ekH/J933vTu24ei3zXAHkNbiC8jIB55QRtm+/7uREOrh7Qsx83GGM40tHHirMXUYt2 5ak+E9Vk2ioGDFGBtG90RGUZhSXrRkYq+tMRakZPnGkqxgI99TAraJVXa7UiDf7EYT5l sThBCAd+uhMAR2WsxgvZjPh+ZGytcFNe0OHZoEf7mToGgzLp9YwYSIBzewPTZtiBf808 s/Y2GyvOokA0vavj2NjQggdn3XQ8BF451t40epvRskwu1g+TAwAaGuBmQQppk0/kvVCe u7Bo0yAdSkU6pvlmOGOt0dZ7BgJeTXcQeIQ+pcglE9DCHhVI3ELEmpduvJofDW0UTU9O t0gg== X-Gm-Message-State: AOJu0YwmLONOcX6JZG9eZFD7hHm+zARzIhEpbnxH2eOuDzILzGKy06Lc xacqFh5NeRAMyniTrrp9eITO2nmJVLUBFg6hagWdYazscs1JIJ4DmQ3FhH5k9JeqHtlvqmT8VVX IvTE= X-Google-Smtp-Source: AGHT+IEluc8zkE3pOm4mGOZwAFZWHiCA9TaSWJzA/odOiCGoK7fQuXEDFUHptQVw0rIx/oDb4jYN4w== X-Received: by 2002:a17:902:ec86:b0:205:157d:cfe2 with SMTP id d9443c01a7336-2054c249f67mr80978245ad.42.1725307138725; Mon, 02 Sep 2024 12:58:58 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:e912:21a:cf7f:3adf:1e7f]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-205152b36bcsm69690595ad.23.2024.09.02.12.58.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2024 12:58:58 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: John Paul Adrian Glaubitz , "Michael . Karcher" Subject: [PATCH] linux: sparc: Fix clone for LEON/sparcv8 (BZ 31394) Date: Mon, 2 Sep 2024 16:58:51 -0300 Message-ID: <20240902195854.1455369-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org The sparc clone mitigation (faeaa3bc9f76030) added the use of flushw, which is not support by LEON/sparcv8. As discussed in the libc-alpha, 'ta 3' is a working alternative [1]. [1] https://sourceware.org/pipermail/libc-alpha/2024-August/158905.html Checked with a build for sparcv8-linux-gnu targetting leon. Acked-by: John Paul Adrian Glaubitz --- sysdeps/unix/sysv/linux/sparc/sparc32/clone.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S b/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S index c9cf9bb055..c84244f56b 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/clone.S @@ -29,7 +29,11 @@ ENTRY (__clone) save %sp,-96,%sp save %sp,-96,%sp +#ifdef __sparcv9 flushw +#else + ta 3 +#endif restore cfi_def_cfa_register(%fp) cfi_window_save