From patchwork Thu Jan 18 16:02:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 763633 Delivered-To: patch@linaro.org Received: by 2002:adf:9b98:0:b0:337:d511:26d3 with SMTP id d24csp252275wrc; Thu, 18 Jan 2024 08:03:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IHeXWdjOrfjfuI4HRKVZpAuFCEwfyhKaKtlBSssFYv89wzbuwfxzSKhvbRVBZZrOnyZbtK+ X-Received: by 2002:a05:6871:722:b0:210:a3e9:3bca with SMTP id f34-20020a056871072200b00210a3e93bcamr1090115oap.98.1705593824405; Thu, 18 Jan 2024 08:03:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705593824; cv=pass; d=google.com; s=arc-20160816; b=xeSgORPykHDnV2O0ggRtQilq1RkS8c6R09zZ6DygEPvsLmBLqY4fuRZVPsOLKE8s85 +CSj+2eEwtf/tWSBDIxFubZ/vgmfidm0RzyWFYAY8YHqe5F+I10zjQ6Dx4mpErCtURpZ fJPQkMrqfaw7pqE64Lg2BAlxvFe3VAlR+TZBmdeirFoupg8KtR60oOB54cdpauxO+T23 FaT30ARAjWktg+amkY/Jw6Z+WHhDngEYIunnOTJ4WKaOsfKyARnEprM9ABJ/ASzck6YS f5a52DQtFNGlAeko+O1QfcFvVgWzzefb/KeIJ1cB2qE3tITZNyNaXv4EsemCbQPus+de l4IQ== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=OjMc5pfKDy14cEjMBGMddYbUXullRlhqFajP6iThMvw=; fh=dHLBnA+MhGtNtN2B2JMAELi4oD+gmgMg7DL8H0jYbkI=; b=OmhCtUrUcLIEF2+UioyInPCTg5L4im124YgZBbTNauMHX0x+6RG3cmp7JTDgujJF8q hxAGkGgoZb9GT7W6yeb29cJFdlhJVGsEx271s4QJ8SWPbiyN9KRxu+/OJfaixUf1kL5A AQFPM4T/ZohnbUcC8qqFZRqzdCmIkYIH2xZjlGtD+vSUqrbg39gckpRUrDHDok0dVBzz xgiJc6jJeJagb4s2aAajyiJD8nT8Yxk+DmnGDz60FnD5xNE+n8iruj7X5IXjxxNz2CsI 8DwBY3zdOuEErxn5xywuCLqWvS1Cmj/mwycMzLUMADagDcT1S7HTfh3Iw5r+onIGceBh YO9w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="FvQq/R+g"; 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 g21-20020ab00e15000000b007ce3e899235si1847808uak.186.2024.01.18.08.03.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 08:03:44 -0800 (PST) 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="FvQq/R+g"; 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 3EB613857B86 for ; Thu, 18 Jan 2024 16:03:42 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by sourceware.org (Postfix) with ESMTPS id 47E123858C2D for ; Thu, 18 Jan 2024 16:02:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 47E123858C2D 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 47E123858C2D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::42a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705593765; cv=none; b=uBTl6mCqj+bLxwnu1CNTIB/yZFGKExmz8nvipLlVsmxahfsjitzeiyH5rTwDGla2yMZt6mEMoON0jJET58XnnAA0zqFR1lr5Gt3DgfGlVK4rIQAfNEMaTXCw+65a14nVd4OlvqoTQ/qJqDEUy5RmyJWlA7bRhaN2DbW4eejMuV8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705593765; c=relaxed/simple; bh=RSSFNJkAh/cCuupPeUQ33vcUWch6jBYeXQ8nd5u9bWk=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=jBDHXK4fGQaYuowBAnS7U5NMkN9XJelLT/4hMqqS/Hqo6DSuvAGUzz2Z8dg1aBViRm/WQZHP7xP2bfBg6eyfRonC3kVAcUljbf3TjfVEVBGVM931DYrIOVtyZ3mXZRykMNjvgYtPBGyXsELJ4OA7lCZ94z8CmXEZLYf3PNK+Lh0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-6da9c834646so11021816b3a.3 for ; Thu, 18 Jan 2024 08:02:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705593759; x=1706198559; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=OjMc5pfKDy14cEjMBGMddYbUXullRlhqFajP6iThMvw=; b=FvQq/R+gs2HjOMnB30j0y57zwedHMAj7tQxNUB9MHHskvTFYo+mz+2D/kU4y+L2l64 kkzCGsE0TpdoEcKXB7k0It+daUmSaVE/OD0Sgvf1Y+h5lWj6CGyPIwbMUIwYWbb/A1oV 2EQxVn8EyDk8e0oInlj/FqftKYKp4qAZGhxoPu7zvnB+ezPi+JQxe5sHpOQZSWfSRPdy XhjqCeZnCueZpvHZb+HpMipOwg4yuZd2acmHhUNreBgpjgZeDHVfC0lps/p0s9y0wxNI xcFKPcwl3a4BHQltElyTUpAfs7hRq1ED+q80W3FHqkhG5ZFpGQBqZtEf4/LanPTBrcsd 5MnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705593759; x=1706198559; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OjMc5pfKDy14cEjMBGMddYbUXullRlhqFajP6iThMvw=; b=LA5+TfzvrfDvCy6s2d1tEgUVXfh7ZKFp1VzP+Tpk+wdiHjDTUPDnV2pco09bBJGo92 gz98apQ3pE4LjGzWCCZxEWX26nL58hhQTTQO5r7z78eyVSh+08LWeWZq8GXrcnrjX3GG diQ+A16plFhC55t54gujjAcGtTXIagcBVNBBlx77OM8nYa1tkW9STyQrRdX+nIljEF4A pdpvR381HmOxgRmMMehAZxBbBn8kA5H1Aa96d1uDwLW2SozrgHaR7jm7UqKCpUNr7Sp2 dN96IIahagUrotfINgzHYScZkVROKF4HdaZVcD235ezQ+qH5N//P4VEGE2dDMNqLahKU 4P2w== X-Gm-Message-State: AOJu0YyktjLlvZfbIMNFCSeN9FYn128axdnLaSmSmWaOHDJuy8hW3ufA qWebrpONnZBYH3WiQt6LA+tn9HKCS2e5IjE2hUIZWDsQFyau8FGnnKJB26MsX2NjWDv8Ravb/cX g X-Received: by 2002:a05:6a20:b296:b0:199:e05b:8bbc with SMTP id ei22-20020a056a20b29600b00199e05b8bbcmr879229pzb.77.1705593758112; Thu, 18 Jan 2024 08:02:38 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c2:2787:5326:ea15:1a78:7483]) by smtp.gmail.com with ESMTPSA id h20-20020a056a00231400b006dacfab07b6sm3463559pfh.121.2024.01.18.08.02.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 08:02:37 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 4/4] sparc: Fix sparc64 memmove length comparison (BZ 31266) Date: Thu, 18 Jan 2024 13:02:28 -0300 Message-Id: <20240118160228.741832-5-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240118160228.741832-1-adhemerval.zanella@linaro.org> References: <20240118160228.741832-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.5 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 small counts copy bytes comparsion should be unsigned (as the memmove size argument). It fixes string/tst-memmove-overflow on sparcv9, where the input size triggers an invalid code path. Checked on sparc64-linux-gnu and sparcv9-linux-gnu. --- sysdeps/sparc/sparc64/memmove.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/sparc/sparc64/memmove.S b/sysdeps/sparc/sparc64/memmove.S index 8803a03d4e..f14b09afaf 100644 --- a/sysdeps/sparc/sparc64/memmove.S +++ b/sysdeps/sparc/sparc64/memmove.S @@ -38,7 +38,7 @@ ENTRY(memmove) /* * normal, copy forwards */ -2: ble %XCC, .Ldbytecp +2: bleu %XCC, .Ldbytecp andcc %o1, 3, %o5 /* is src word aligned */ bz,pn %icc, .Laldst cmp %o5, 2 /* is src half-word aligned */