From nobody Thu Oct 31 00:21:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1694892865; cv=none; d=zohomail.com; s=zohoarc; b=OIfexlYfzxG6nidkT06jJg2GHJT3a+ozPkvdzo52ACVVt7XL3GuQXDFVtVxdP8E7Fm+WlE9avQVqn2bG5oFOtbq5O7cfpre32hPJ8yrDfQjYc4eKexbOzDpXyjx8Ti+EHK/I1OXKCxbGxmOF9aiFr1ocSL5UH4EdFfIk7wV7I18= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1694892865; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Nzqj6C0VQlY2yN8x1n/HIf5A6+c1lazVToEB14pN3+E=; b=N1+26EyTewYC4AUlqCE3T/agTOXOCuV4EmLrMWP4AQ+SP4uzSX8XseZV5o4E6PPzXh0z40MY7ugjhjhkpc0mFEuUqWqsps78jIBh5cYuSga8LPDx1aaz3L4NNX3buRa0zJVvc7hrfbVaqfMm0ZMQjLqlQmymrB2c/uSQk2Wepkc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1694892865281749.2781836673126; Sat, 16 Sep 2023 12:34:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qhb2H-00024A-35; Sat, 16 Sep 2023 15:32:57 -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 1qhb2F-00023G-Na; Sat, 16 Sep 2023 15:32:55 -0400 Received: from dfw.source.kernel.org ([139.178.84.217]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qhb2E-0001wR-CC; Sat, 16 Sep 2023 15:32:55 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3ADE360FE2; Sat, 16 Sep 2023 19:32:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1436AC433C7; Sat, 16 Sep 2023 19:32:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694892772; bh=J5VDXnfGUZvK4hLnh4py748vturUYsSJflWPNbJhQno=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UkNbRBXzu3NVRey9XpqkHMY3QJ26VQiyNRhZ9dwi7mHLwnKsY/ifB1iR1+ezx11nE 1XfaOJlaCXg+s9TpQikxlzBKfkBi19zEQldPbTsh0f3Thh97Dh6ebRck/u0uzXG8Am hjY4fsBLOiuth1FQOzpuWzurI6nhBoUmLzqAuk8i9tYyCjihtMGxXznmqkTnm4Bm+c FeWmkNR7++IuDAuwKDcmwOyTzNxmAm/lAxbeocsyYXFZIUlLpjADHcweuhASbAcrU1 FhHi+aTS2RhNMqBn7tXG5ojnrWyDGsZoJJQQD3NoEdYIoXtieMGgmGMrhUiIMQKxm8 Dr6XRIkiBZPBQ== From: deller@kernel.org To: qemu-devel@nongnu.org Cc: Helge Deller , Richard Henderson , Laurent Vivier , Mikulas Patocka , qemu-stable@nongnu.org Subject: [PULL 8/8] linux-user/hppa: lock both words of function descriptor Date: Sat, 16 Sep 2023 21:32:34 +0200 Message-ID: <20230916193235.169988-9-deller@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230916193235.169988-1-deller@kernel.org> References: <20230916193235.169988-1-deller@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=139.178.84.217; envelope-from=deller@kernel.org; helo=dfw.source.kernel.org X-Spam_score_int: -70 X-Spam_score: -7.1 X-Spam_bar: ------- X-Spam_report: (-7.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_HI=-5, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @kernel.org) X-ZM-MESSAGEID: 1694892865823100003 Content-Type: text/plain; charset="utf-8" From: Mikulas Patocka The code in setup_rt_frame reads two words at haddr, but locks only one. This patch fixes it to lock both. Signed-off-by: Mikulas Patocka Acked-by: Helge Deller Cc: qemu-stable@nongnu.org Signed-off-by: Helge Deller --- linux-user/hppa/signal.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/linux-user/hppa/signal.c b/linux-user/hppa/signal.c index 3a976ac693..bda6e54655 100644 --- a/linux-user/hppa/signal.c +++ b/linux-user/hppa/signal.c @@ -149,12 +149,13 @@ void setup_rt_frame(int sig, struct target_sigaction = *ka, target_ulong *fdesc, dest; =20 haddr &=3D -4; - if (!lock_user_struct(VERIFY_READ, fdesc, haddr, 1)) { + fdesc =3D lock_user(VERIFY_READ, haddr, 2 * sizeof(target_ulong), = 1); + if (!fdesc) { goto give_sigsegv; } __get_user(dest, fdesc); __get_user(env->gr[19], fdesc + 1); - unlock_user_struct(fdesc, haddr, 1); + unlock_user(fdesc, haddr, 0); haddr =3D dest; } env->iaoq_f =3D haddr; --=20 2.41.0