From patchwork Tue Jul 19 12:11:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 591656 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5817:0:0:0:0 with SMTP id j23csp3902288max; Tue, 19 Jul 2022 05:16:42 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t77tuIGtlB7Ew+dJhPIrMqmAxovxXFehQuunwKmcy2uSTaqele5/awNBq6TdxBQBU7LuZS X-Received: by 2002:a05:6214:4113:b0:473:74dd:de77 with SMTP id kc19-20020a056214411300b0047374ddde77mr25062539qvb.84.1658233002372; Tue, 19 Jul 2022 05:16:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658233002; cv=none; d=google.com; s=arc-20160816; b=zDgMEeNkwpdmKKkd9ntvscJ+xKFqfAQhVj3mXwA5h8TClleaMpJr1TnihaV96IaDry 2d9ILISkzcVLyjCU4zfDXaQcv+s2vBTBzfxKOeNVVNZA71mX4MpAvYWEpDPdhczXo9oI kbbPVK0LyfeFnXigovr6GAJYtU6xNgGkvZ6MkBRkB8OBwd4gYY8SHbLhEXaSKi7nZGVQ 7MaZ43ArhLlBL9KpdXm/EnJWQB9f/XvzWq5mN9ksYE1+wX5yRzwPqfYj657KrPPCs8GH zuOQdKlLpAzBMHxKDdGDKKTdKE1M42o8+KwxdlNGo/bHQdhLSk1iNuvDR8fpfUf1EiXn LJLA== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=u68i7l6LoLPzaJZNvDnI+Rk0ofCSnN4zy3MvwflhHVE=; b=knJsOVqMnG9RAwHFLlUiUm/C7Pk2qJntvk0Qo6S7cHGYfk6BCbpJpmRWgtcBLrvk5J 5jYDlvDQ0Hpjvb0iuXnI67IhtPkhXFk1PapfRaVO+7iFrgC4UO+Q15zlogb4jHn4xUb+ Zn59xbgGCge5G2k5SjGkl35sWOAn8RVula5XV61OtQGgAdakisYnUk12FAd1GOae6Cnz 5Dw/itVA/EFZuqsHi4g7d7sUJTPXS4uIgUeynr+7lmvF0DdBNp58dhI9eGR8/vkeJNup poadA3jCgepPKrakRwnSlDdooYH/ei/6buizrcH7ZSigkgm6Hh00j4LYlHzcwOpeI7xd +XGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AQcs0Im3; 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 r21-20020a05622a035500b00304f55bd3ffsi8039680qtw.480.2022.07.19.05.16.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Jul 2022 05:16:42 -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=AQcs0Im3; 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]:57842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oDm9Y-0002no-Sn for patch@linaro.org; Tue, 19 Jul 2022 08:16:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51884) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDm4O-0004wl-AB for qemu-devel@nongnu.org; Tue, 19 Jul 2022 08:11:20 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:44782) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oDm4J-0001lJ-3Y for qemu-devel@nongnu.org; Tue, 19 Jul 2022 08:11:19 -0400 Received: by mail-wr1-x42a.google.com with SMTP id bk26so21274585wrb.11 for ; Tue, 19 Jul 2022 05:11:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=u68i7l6LoLPzaJZNvDnI+Rk0ofCSnN4zy3MvwflhHVE=; b=AQcs0Im3A+qMjHje+LgeIQD7hcWX1X0VKQs6SBY2RhYGhe3sDZAAYMWU7O7egeuKCf 0ByMddSf231axMUQqSV5y57Lzufh3vqLOzFK5V180sBquPaxurpK5po5tzofgwyNqvHC 2Y26m3Mxqf8A7PmaQHadilkM3F0EkvojY8owccctlgGgs0nn0uidNdNsRHVRfxsyh5aH lkHigagKqLnwvRvx81dexGl1GvFIeqYzOiw1hZ9k4gE6Y4KM7sfz+TFAVtlIAPuOM7B0 BXaQYgTfGr0uosYQZTG+P9U4FB6yGxLdCJtvY8gFUmWWf49KCNmeG+T2ovllB93v5ZIB JdAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=u68i7l6LoLPzaJZNvDnI+Rk0ofCSnN4zy3MvwflhHVE=; b=BBiAjiwqhiRnAhYy7YbnECtIgKvb9iE+M2C1z6cFmD1/nPSkq1gCb8FIVKrxFRvOkv en3dbTGci0C4x/exW8UgyGz2J4FB39J8B8iPazRtuP+W7+h/8BnZcibAGYPaTCVkLIY3 N4lQ16wLYyf0ey0/qlm+1QZXWl1lA7Ki+Hcyd6gM1CYqEB3OlQSjsluG90RKaNbh6v0y tUbzRlNfN78Yv8KpW44vZUUmO/rRfqxEkzT3d+aut477jcUO68YvqRow5+tB35NT1sZI R1mOziFP9F+F+6PgeUHv5JXKE4YiwyX3V5Nai6GAQ/P9PbeTZuUAiPzX3760lngkj8r4 4Qow== X-Gm-Message-State: AJIora+138JnNsFGu7xGjvlLBixwlKl8KX21DGgQN0rrOVBHhfLTnpfi 8Fk0AUMbTUIvRcGTxZkSyxXTb4z5Dlf0GQ== X-Received: by 2002:a5d:44d1:0:b0:21d:7471:2094 with SMTP id z17-20020a5d44d1000000b0021d74712094mr26773966wrr.374.1658232673483; Tue, 19 Jul 2022 05:11:13 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id m21-20020a05600c4f5500b0039c5ab7167dsm22111287wmq.48.2022.07.19.05.11.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jul 2022 05:11:13 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH 0/4] semihosting: fix various coverity issues Date: Tue, 19 Jul 2022 13:11:06 +0100 Message-Id: <20220719121110.225657-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.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, T_SCC_BODY_TEXT_LINE=-0.01 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" This patchset fixes a handful of bugs in the semihosting code noticed by Coverity. thanks -- PMM Peter Maydell (4): semihosting: Don't return negative values on qemu_semihosting_console_write() failure semihosting: Don't copy buffer after console_write() semihosting: Check for errors on SET_ARG() semihosting: Fix handling of buffer in TARGET_SYS_TMPNAM semihosting/arm-compat-semi.c | 29 ++++++++++++++++++++++++----- semihosting/console.c | 3 ++- semihosting/syscalls.c | 2 +- 3 files changed, 27 insertions(+), 7 deletions(-)