From patchwork Fri Mar 29 22:20:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 784083 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp3426501wrt; Fri, 29 Mar 2024 15:21:57 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVXZ1wfrAdtdBVv9cKcvsDk2a8IpS0u/SSD5IHCo49iBnoqvVWdBkobvJvcGVmVMw5jTdTPPQDxPftfsWi9yuRF X-Google-Smtp-Source: AGHT+IFqMnXLr+R9YEcxc7fDLd9hMApojZcNXiBiOXnKwVvWpl4TuWDBtkYCxvBADJNkw4q9i/eH X-Received: by 2002:a81:5257:0:b0:60a:c653:4134 with SMTP id g84-20020a815257000000b0060ac6534134mr3707325ywb.9.1711750917016; Fri, 29 Mar 2024 15:21:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711750916; cv=none; d=google.com; s=arc-20160816; b=ZCbRRjIG6iGE0jFilrmeUiiW6qhd8LjIDzzR4ao8XoqrOi/LzT8Ea/RmrxLLZfJR8F D80L20XuM8+w2u62Tltpsu+KVTIlQRFVwP/FZeRKoOVrLukDQszOExo4r5P4tSPLksZw UHSlNqzm1nlxcRH0s0ypGf0sa/wFOYrqqIJ2e0pk4vb4QZdClD/y7BEZLs1LxL3K1uq6 aedbQy7Ua1uYTRAPRWFIPruFNHxUnYeo8/j2q5Ek4ygnQbVxIPWyBMkdL7bwy8L1tRxL mRpr2jhALEbKbP/Pi6ODu2YJiIqUN1WMJwqXB9Eg1IeIsO0pwFxfgWf+15cXsR9ogpLy /mKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender: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:cc:to :from:dkim-signature; bh=vLgHs0lHF4uZkMVrK5zDEoSHxG5H5AOQOiZmQyJc1i4=; fh=o2XzhdKG+B45MJCghEfnYoypmHvLX2hd4SL6yXeiyXI=; b=MgfqzsXEYqURj0OyTLAIbS/E3/WjNfIz5EtqnFMgkjGvY9waKSLrr8F1wMTxX30wR9 +klwixI8VCEPImWHtfpJ1wYtwBzwV4puozhVNzGwmjWb4AmwlAcNYo2NKsO4Wmj+aQ+7 E5CBDod5OVVKU+AUGLn2joJEucSaA3RCMLWZ2peCGwKZBOAviwFnBkNOVoVaFQIOMx8J fXXO4GEIZzl0ATK39VvPStI+sjMfO8IFyUDDWHch72rEHwj/FKscoR/un5VH1ICmsY1s oG6q4Z1S2bI15xZkzZN6NLJQjb5w33zDto+7UTAlXT9a+qS3TAevTUYTc5H86I6UtO0g z43w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L3rbRcnR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d9-20020a05620a136900b0078a53254b31si4613370qkl.53.2024.03.29.15.21.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Mar 2024 15:21:56 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L3rbRcnR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rqKae-00055e-Cn; Fri, 29 Mar 2024 18:20:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rqKac-000555-Hl for qemu-devel@nongnu.org; Fri, 29 Mar 2024 18:20:46 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rqKab-0001oz-41 for qemu-devel@nongnu.org; Fri, 29 Mar 2024 18:20:46 -0400 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-6eaf1005fcaso340711b3a.3 for ; Fri, 29 Mar 2024 15:20:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711750844; x=1712355644; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vLgHs0lHF4uZkMVrK5zDEoSHxG5H5AOQOiZmQyJc1i4=; b=L3rbRcnRU37YopaavvC0LPVDLo74+HkRRKxSgjIyIzxLkJETfQJeqDukH+Xu+cTf2F p5HtKh3bCO7qRyMkJMHzbUmMdD8gBYMGfB6UkU4OWYgdKnuzCty4Fd7IsB6PQOVB8aYt CgDNQ2aOg1jfl0CsQUkhBA+Uh4nmOL2vN2Z4JGO75V8cc8WGfC3Baaw/eyDfJ0YxksgE +Fskm1H6/tqSj6mamxDqDZ6LuvxNgreNbNMyhmW9wGVMWfFvgGGZwp5Hd6vpcB8ctI8V qqY4aMN511OPDw2wjJKMdPvw74dV4ztuW0cWm6bXtsAlYCodR6GwCiIyHdOZWStCJQN+ 0a5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711750844; x=1712355644; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vLgHs0lHF4uZkMVrK5zDEoSHxG5H5AOQOiZmQyJc1i4=; b=f8zDPMg8WVYdh1waAvDRZU5fF8Bq09hyIjFGXmrNui5JcTQ0FyEJrnx9eI/OaJhc4N Z0lEOYIOPURUDa8IdMrra9TfHIzwh7Lxon9vrI1kJ0BaZ/COkFfhR4G3kHRb+u3OPBZz nyeBAelAXtelyRd4h7rY9PHegsiqtMEMPjw2tzPuWSJFQblS95uomChB6zYFTB2qaAEo ePIqPmcyXIX/o6EzHnYCnIoIcTmaGv/gHZSzwxcS7hFfM751BW2VEiOTcUZcgzGh7TAv 6/ra5uPJLn2fsUOa0Y9DmK/O9J7gAJ/aQ3GSZCdaghpdwxu+P+wvVE6wGL+z1eMrUMCb tQlA== X-Gm-Message-State: AOJu0YwNZJgQ5A14VLE3fGP+ytzyfnJe5oxB/7qC+xnE2snIn0UAksnd mNXKxmwuG9zzRIE+Q0FPFJJ6p36zmVmI3sPgUasR9oWeoy4LECdicbsTyU15uCA1ydPlWu9K/0k f X-Received: by 2002:a05:6a20:ae86:b0:1a3:dc19:e5a0 with SMTP id do6-20020a056a20ae8600b001a3dc19e5a0mr2851946pzb.41.1711750843638; Fri, 29 Mar 2024 15:20:43 -0700 (PDT) Received: from stoup.. (098-147-007-212.res.spectrum.com. [98.147.7.212]) by smtp.gmail.com with ESMTPSA id lc24-20020a056a004f5800b006eaacc63435sm3579811pfb.173.2024.03.29.15.20.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 15:20:43 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Ilya Leoshkevich Subject: [PULL 2/7] linux-user: Fix shmat() strace Date: Fri, 29 Mar 2024 12:20:32 -1000 Message-Id: <20240329222037.1735350-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240329222037.1735350-1-richard.henderson@linaro.org> References: <20240329222037.1735350-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Ilya Leoshkevich The indices of arguments passed to print_shmat() are all off-by-1, because arg1 is the ipc() command. Fix them. New output for linux-shmat-maps test: 3501769 shmat(4784214,0x0000000000800000,SHM_RND) = 0 Fixes: 9f7c97324c27 ("linux-user: Add strace for shmat") Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich Message-Id: <20240325192436.561154-3-iii@linux.ibm.com> Signed-off-by: Richard Henderson --- linux-user/strace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index 51a5bdd95f..b4d1098170 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -701,7 +701,7 @@ print_ipc(CPUArchState *cpu_env, const struct syscallname *name, break; case IPCOP_shmat: print_shmat(cpu_env, &(const struct syscallname){ .name = "shmat" }, - arg1, arg4, arg2, 0, 0, 0); + arg2, arg5, arg3, 0, 0, 0); break; default: qemu_log(("%s("