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 X-Patchwork-Id: 824695 Delivered-To: patch@linaro.org Received: by 2002:a5d:48c1:0:b0:367:895a:4699 with SMTP id p1csp2099213wrs; Mon, 2 Sep 2024 12:59:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUa8tHvz78cEu3kCFsh0KyWdVe8p6vdxG3QvSI75lDlNVTCEXSl4vEMVotWD6UA6RsjV2Y53w==@linaro.org X-Google-Smtp-Source: AGHT+IE/aLrg6kz6ab38f+5SOJMZi9UKU9zFcl6ZEofRw4njkMtrmElTEe/SH5DGqZhl8BArrauq X-Received: by 2002:a05:622a:1dce:b0:445:397:e629 with SMTP id d75a77b69052e-45696662e9emr101023611cf.45.1725307154283; Mon, 02 Sep 2024 12:59:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1725307154; cv=pass; d=google.com; s=arc-20160816; b=ol1pwKCpEN4t9cyFOPmesIA7OPmtop43op0l1Y4rprhOD7BGcnr83KTjanO/ucbstt 5Ar51D+7lmypXdbQWv9NVPA/1LIghm4i3UCtDEbwaLVKev/JhoowswEA4u/zSQ8i3ASw KKNEKiVCUht42LKRceLBto7mC0ixAc5H0iUH1Jb+pEihYa4+Mb0CGS+2Pmi2j2Xj99zh FDGexP2Teexx8H84p30IwwMvZ/mqAdDqDzJkd5WycMoGOHdUklSoyl2f1uBItPzfUkVp VzkrTTIF0uIlEY931LEYNRLHUz/7GZsA58hBUfL1zdDo9Ygm8n63Z/v0671cM6588hjE Mljw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=TDanTPZZr6sf8v0ptERkQLME9vJa2gorkgBMxqaqZ5I=; fh=yhgXGVPNhljh7euVmfLkaJrVSd6EcwAGzd5MQHYzmGE=; b=h3TjXt6sU3xcN6887Lj5O33tqgxG07CHvENt8b89JYFflvO5hxeRn+fHr/fm92nj/j p53amHVyY/lTV4ujTaAb2vH4iOeZ8vKatpSC4MniB4K8+bUSj7m11eLLPJMhl38N5jyW M9xQgsuYAroAcEcM88JveoKsehxrOMzAD+8zCSHGtSeTy3TMgpd5aIdjn+NH02q57cI1 c2UK0i3UYSogtoHTjRQPGLLYJMGC71kEmZ6zL3HWNQ9V5TEPy6MictcX35jZAVQnsHtS VK6mg2MALKoxbxXuTYK8WsB/VIfwpZqa/UQP3coDxt3riXJvjRlJZSzbe26DpcLo8SkQ H14A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cjPzQnne; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id d75a77b69052e-45682d8cfc9si112048361cf.467.2024.09.02.12.59.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2024 12:59:14 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cjPzQnne; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E1156385EC23 for ; Mon, 2 Sep 2024 19:59:13 +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-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~patch=linaro.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. --- 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