Message ID | 20210924165926.752809-21-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp1680835jao; Fri, 24 Sep 2021 10:07:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxk49kfafngGbqXuKhnYJ4AU3eruEXTGSDft+Vm8dT4V15UvSFHs4ZduZIAoKKDYj8fZO/h X-Received: by 2002:a37:a413:: with SMTP id n19mr11533694qke.461.1632503274816; Fri, 24 Sep 2021 10:07:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632503274; cv=none; d=google.com; s=arc-20160816; b=ejXyG0nqHhxjR95dCHXhatlvKEV7Ofddq4YzpqkYVoft/qOeL7IyAKTixTiSTlxYat Xx4aTCeJqAXJ0oV8zyWI+PVcH9/oxmdC4v7fV9O6ep/w9swlEyYzO/CqestE5CMFUv0X PX4iLtbnLQYcW8vRHNYyrBg728ZYNcmrAoK7pMl/vlbVdjQ1D0/X2dVMO3luA/UB/coM aYpAxoamze887LXBHaHKc9rPCJl+2BZeCGeTjuDkMffe+uznxX6P5xxryowfCEzozd8O EzU8DJoPFXxX5BqUiAB0GP9IAgaEdnRT0TlvrhYRYblBg3+nz+wRH9laXVIP55M9RfJq I/FA== 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=rvAlqQQaMJOEemK1f4c76TW1TW8p9KSzHxLmC3ERHiU=; b=oHihGzIw9AnNQmZEPn3B8Dmdqz7RbkOo3Wf+DQEHHpu2buFtAgQb17whUyFpP6aeMp 5nyMOFy9v6DoKyX9jzwurnxlCnMkIWtVbQ+IjzhjTq3OLm5/qP4jUJQZPSuJ4wzeZ7RK Ex4QhinnKRvOYVpCKXKW+tKcmZ8lSvOrCsZ7ut4BIJnWVMq5dpNLA5DkABFJ9DvjYa2s GvsLV5gDVLS9jPdMHRV1LIvWZnJAsUvlemH6NBzCQRkeCBHG+aevdEtqtWCo9J+vDG/M v6W1ynjAH199NgkH118vRqVL8GERIQfOQtUSLc8Wo3NQ9Isx2vQ8sxDWF1Vwx54ZQIxX 0oQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=fU77HVUZ; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f6si6311719qte.318.2021.09.24.10.07.54 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 24 Sep 2021 10:07:54 -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=fail header.i=@linaro.org header.s=google header.b=fU77HVUZ; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:43860 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1mTofy-0006D9-Bg for patch@linaro.org; Fri, 24 Sep 2021 13:07:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1mToY6-0002mt-Pl for qemu-devel@nongnu.org; Fri, 24 Sep 2021 12:59:46 -0400 Received: from mail-qt1-x82a.google.com ([2607:f8b0:4864:20::82a]:44741) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1mToY4-00072J-Jw for qemu-devel@nongnu.org; Fri, 24 Sep 2021 12:59:46 -0400 Received: by mail-qt1-x82a.google.com with SMTP id r16so10014639qtw.11 for <qemu-devel@nongnu.org>; Fri, 24 Sep 2021 09:59:43 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=rvAlqQQaMJOEemK1f4c76TW1TW8p9KSzHxLmC3ERHiU=; b=fU77HVUZPzfIQjoQJUr0pIf9YHhi/E5OVVhAfXGjRwlE3gdqRrrn3ZOmnQeMffvmQA GNKV7kuuPMLbNbiGBZIGGkRuDsZ+mnRYndT4PDJ54zR4KppaXidApaBEsheLjJiRYwW0 ZYXPiJsx/VkkFfNnkBoPMsbGo2b8MZHEDIamL8WstPH2bEro0GF7d/MyK1e23hQP8XHs fkMqDJJFbX0De/UAzI0ieSDWz2eG3c/LWiopYyl8/fPH3ifJLZS0WlfP3kAluJm23CIU eXBibC2Th8hhyv1iE+/6KTuI9v/ZIt0z1ZQPq9ZNn/iV14pbSePG9omWspN0V80P0aPt 8VYw== 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=rvAlqQQaMJOEemK1f4c76TW1TW8p9KSzHxLmC3ERHiU=; b=3thep9HwZLL0+mwDx0zq2y7NFNTr8Ks9issXG5JAonPsn6AXcdCdEnrxnB/yXg70K8 mPH6yMwr0v5iCJqq3AhDlSMTHq1LSGpafICKczZnofhBJfpmQrarYJCK2aZAvKs1AQaq 3kfZvIZEzWpsR2imqX9x9c6sC+8u5+0SoG/o4Cog8ntzCwVYsl6lWlRpVoi4qfGfo0xC bTEwvHm/8LP3XoIyLLNh2hTpOguY2sT3ai0St/V9trheZJCBgX7MUfwuLbA9GUTyfg8A G5reEkLb+b5YZaIFtZ3BSKOr58tdOdCM5FBwFifrdk/4unzR3tXu+y1qd30zzsA0rVaf JhhQ== X-Gm-Message-State: AOAM53349ZIuwMC2TeZBzIMf4LsM7cTq89QbEh3r3iXKNWSZEpZe/qQd AcnPzbKtsCzCxWOqxmfJpRtc13hs0poV2A== X-Received: by 2002:ac8:7143:: with SMTP id h3mr5378609qtp.242.1632502783131; Fri, 24 Sep 2021 09:59:43 -0700 (PDT) Received: from localhost.localdomain (cpe-24-74-129-96.carolina.res.rr.com. [24.74.129.96]) by smtp.gmail.com with ESMTPSA id r13sm7141104qkk.73.2021.09.24.09.59.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Sep 2021 09:59:42 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Subject: [PATCH v3 20/27] linux-user/ppc: Simplify encode_trampoline Date: Fri, 24 Sep 2021 12:59:19 -0400 Message-Id: <20210924165926.752809-21-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210924165926.752809-1-richard.henderson@linaro.org> References: <20210924165926.752809-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::82a; envelope-from=richard.henderson@linaro.org; helo=mail-qt1-x82a.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.23 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: peter.maydell@linaro.org, laurent@vivier.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
linux-user: Move signal trampolines to new page
|
expand
|
On 9/24/21 18:59, Richard Henderson wrote: > The sigret parameter is never 0, and even if it was the encoding > of the LI instruction would still work. > > Reported-by: Peter Maydell <peter.maydell@linaro.org> > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- > linux-user/ppc/signal.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
diff --git a/linux-user/ppc/signal.c b/linux-user/ppc/signal.c index e4d0dfa3bf..77f37b9f01 100644 --- a/linux-user/ppc/signal.c +++ b/linux-user/ppc/signal.c @@ -309,10 +309,8 @@ static void save_user_regs(CPUPPCState *env, struct target_mcontext *frame) static void encode_trampoline(int sigret, uint32_t *tramp) { /* Set up the sigreturn trampoline: li r0,sigret; sc. */ - if (sigret) { - __put_user(0x38000000 | sigret, &tramp[0]); - __put_user(0x44000002, &tramp[1]); - } + __put_user(0x38000000 | sigret, &tramp[0]); + __put_user(0x44000002, &tramp[1]); } static void restore_user_regs(CPUPPCState *env,
The sigret parameter is never 0, and even if it was the encoding of the LI instruction would still work. Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- linux-user/ppc/signal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.25.1