From patchwork Thu Jan 6 22:57:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 530358 Delivered-To: patch@linaro.org Received: by 2002:ad5:544f:0:0:0:0:0 with SMTP id a15csp1578789imp; Thu, 6 Jan 2022 15:01:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJwCXklMxZjy0N/r6LVATBjCMidSncz3ORs1qIpyEo9p2qPAkYleECtOUEe5torN2r4CMkMy X-Received: by 2002:a92:ac01:: with SMTP id r1mr30265190ilh.67.1641510066859; Thu, 06 Jan 2022 15:01:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1641510066; cv=none; d=google.com; s=arc-20160816; b=hg59QzzhyFnA7EQGDkBMwZKpyBNopo7b0puarNzQ2XhZUZyFmCfcPSu/igL1yhZePI 7zVek9fVH3frzeyVRPHaV+7Uf12AcoBwKuhERfPJCE1w+avRD+6mhNOIzQwvORd8cEv6 mt1AB8qzC3EedIyZ8tfKKNLKcMmh3yjsWb4Hexx0st0yt+MCycadOOmTTVOdYGOrEOMS 8Sy8ff/zu78tIP4bwGqbWMQbi0caBBg+cPbOfORl3hMX7PnjJP+QQ/FXxmULd+m1M4cI MZB6cojGhiFXEQs5B/5MUYc/wDji1p2Giu7p7HfycCsb46NqHjHmFUkzHtKmDoPYfo6L QQkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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; bh=qXmfusgryZRwHORLLj3tYYX8dUPLK+MhJ1OKc+3H5hY=; b=YfOpQ1dVdz4OmeB4zmYF1SQid+7Pt9R7yOW/CtLWeXF+ejDVY1IOVUkDxVqeqBRdJ1 DwJ4gWKuybmQ34wgtsHhHmNygskVrnyoh7Zv3ubExTvFOryeK4SLZ2MfLnKh3B6JBTaw Fgcu5bTNO1+NyPVtHGUpdw+xmRrCLKa04L0PYEhMdkPCaBhfjJQBDie0ThZ2LuvQU5vx vmarydQS5MGBesxWzBS8oMVaXw7yhR07q4DXQrzS8AjmQt7SeRQY0OJ2iNZWofCqtSZD /4rtDGkZ5dLJ5dpzNQlb0B32aJwiy6lWYkoqZ+sznSqxX02Y6TPI1WcyWPBWyU5kYoJJ wSNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aOl5wDI6; 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 r13si1823017iov.20.2022.01.06.15.01.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Jan 2022 15:01:06 -0800 (PST) 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=aOl5wDI6; 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]:57296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n5bko-0000st-D2 for patch@linaro.org; Thu, 06 Jan 2022 18:01:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n5bhY-000518-7Z for qemu-devel@nongnu.org; Thu, 06 Jan 2022 17:57:44 -0500 Received: from [2607:f8b0:4864:20::62f] (port=37804 helo=mail-pl1-x62f.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n5bhV-0000Gc-U8 for qemu-devel@nongnu.org; Thu, 06 Jan 2022 17:57:43 -0500 Received: by mail-pl1-x62f.google.com with SMTP id q14so3517777plx.4 for ; Thu, 06 Jan 2022 14:57:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qXmfusgryZRwHORLLj3tYYX8dUPLK+MhJ1OKc+3H5hY=; b=aOl5wDI6Yq24+mK8tLh+f81d6AVwUTHyOksdCqBQyfNXu0ir4o3lJt24sjcmUmVeaU 5j6Ikf5/6+m+DtqsP6PekQPLb8N/slIhVo8A4LsjdilgplCKpa3//QJqtyBmkUfCyPlE gDQ4lQl0gu9HxCn2si0f+3Kdo8TD1IsYBvflTInP8RQefiuJp2lomRGsj/2RCFjJAReD 5V6W9cORTZQjhrQisduN19Kt7q8K1K9qqJpHZhm+xosogiwrYKPU1WbILM5TzAJPGrKP 5GD98l845Y6CGn9C9MGfQJA90in7QqBQbdQ0+QVReRUS08CVTMycmPJImm3aNvQ6hvzT qEng== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=qXmfusgryZRwHORLLj3tYYX8dUPLK+MhJ1OKc+3H5hY=; b=TpbTlxh+zbFhIBbQjDjRjCa3gmfg/qhJ7UgSvpnOeTvliIEf/Ro01xylmVO/cw5QGe IzLNNySGchnTmCdgnv7L6Eb8uNlDmo53cHsKthwf1f1iDGS5516/D7GQ4hE4txyztOI8 WzBUe0IwYXEHUmrXCi007paD0WtmCJZ7ANkCBObzeGV+Q3s/3PtboFNxuKqDrYFhp7gQ D8/i4pestbuO4qRCi7pdKsBWpwwBmiVqIDzn6tbrxNZ/1upsisP9ZZnpodc32j+UNZJs 5CW1GF183byMKsyc8aa8qMUpIqUvaAZOde7/BqwYwZIuDVwAo1uvx39bo/nTNqKks+IP 9ksQ== X-Gm-Message-State: AOAM532rauyx5sON5SUu47f6EuBtoz7N4kgyDwcOTSjLd2P7m7JEGKvc Duo46NjLGJRbGaB72U91d0wSomNPwngwdw== X-Received: by 2002:a17:902:ce8d:b0:149:5e3c:34f2 with SMTP id f13-20020a170902ce8d00b001495e3c34f2mr56759836plg.147.1641509860177; Thu, 06 Jan 2022 14:57:40 -0800 (PST) Received: from localhost.localdomain (174-21-75-75.tukw.qwest.net. [174.21.75.75]) by smtp.gmail.com with ESMTPSA id rj6sm5774687pjb.50.2022.01.06.14.57.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jan 2022 14:57:39 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 1/4] linux-user: Do not special-case NULL for PR_GET_PDEATHSIG Date: Thu, 6 Jan 2022 14:57:35 -0800 Message-Id: <20220106225738.103012-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220106225738.103012-1-richard.henderson@linaro.org> References: <20220106225738.103012-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::62f (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62f.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: laurent@vivier.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The kernel does not special-case arg2 != NULL, so neither should we. Signed-off-by: Richard Henderson Reviewed-by: Laurent Vivier Reviewed-by: Laurent Vivier --- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index ce9d64896c..e8f9e0643e 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -6444,7 +6444,7 @@ static abi_long do_prctl(CPUArchState *env, abi_long option, abi_long arg2, int deathsig; ret = get_errno(prctl(PR_GET_PDEATHSIG, &deathsig, arg3, arg4, arg5)); - if (!is_error(ret) && arg2 && put_user_s32(deathsig, arg2)) { + if (!is_error(ret) && put_user_s32(deathsig, arg2)) { return -TARGET_EFAULT; } return ret;