Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp3110637pxm; Mon, 28 Feb 2022 12:13:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJwY1RNOHnUw0nwXGgM+5c3iR0qtJT80daS/zYMP+9e/OSwUfaziOkDlqVcELjoXwE5feunD X-Received: by 2002:a63:af02:0:b0:375:57f0:8af1 with SMTP id w2-20020a63af02000000b0037557f08af1mr18586217pge.188.1646079214347; Mon, 28 Feb 2022 12:13:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646079214; cv=none; d=google.com; s=arc-20160816; b=fxL8OOCpu5Ts+P8sOPtv/lBjxItuGGfEej7RNceGqI+1vZOm6rOJB1OrEi+D2FfiTC Dof9Ncw/v9wy13QdtmqoFsZDHggI14OGZfp9G/umnMpMmMm0feeXVW6zFGVTFFQfVbfD 6Yia/dkSws/H83sZUmOMIZifvHtRBwsEo2EffJGDSiXgZLtwiG+c3Iu+r8jh5whDdx0Y PES9A9wnrV0N/jBcIXFHH8ybwSWbbKktFI7qClaqBUZmaBjV8dfKhr3F9s/9HxrYwy83 mclDteF4ZVWenGBQhB2gSzHUr5KYi8AvTUnJ39N5YP7Y7t7af9wQyFAQ49u2ihmHyuwA eGIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=RB5j9xKOf3xA/GEiBKXi707gIKFt7/UMkk1IayjwGcA=; b=SM0lli5ZEuWlZR4PcO729DvozZ/XxXnWHwqFINO9t0uQKYsepENLsF4r1n1mLq0BnU w5hb42Ki3DhOznzUNtttcxKsfcbSIXrT+n+vs/M7SQK5BgucbtOKNKyNkkW1uAGGUQ+h Zpequ5D3kybpYZKXYD9WX1PxnH4xSI84hqlX7rg9iQaErryPw75t3jHSB/nUuFcLQlSY rXFy9iWeTW+pSkeqCq3uBOXojEEFScB7zkGoFYuieIx8jmbnMbrXfOpC9z9MV2pd6pOi O7b+LiV/+3Jmk0dZt+xyadlBM9/cvOLgCrryuDBjyDykJoWXNKS2LHQvkPKg2nwDoDPy ccSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ln7aUeRH; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id b28-20020a630c1c000000b00373adabc9a3si10360022pgl.577.2022.02.28.12.13.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 12:13:34 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ln7aUeRH; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3F468161103; Mon, 28 Feb 2022 11:36:25 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231283AbiB1Rhd (ORCPT + 99 others); Mon, 28 Feb 2022 12:37:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238080AbiB1Rey (ORCPT ); Mon, 28 Feb 2022 12:34:54 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 561187E084; Mon, 28 Feb 2022 09:31:15 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 497EDB815AB; Mon, 28 Feb 2022 17:31:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0B2BC340E7; Mon, 28 Feb 2022 17:31:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1646069462; bh=InIoslegLjVX1Yt8uC/7lVQLPHklSm5DBQNu2ZKpfd0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ln7aUeRHpzN031nnkYcn+TXdzMBQ4wotRMExwqWdIdztYOq2vQP9t1c5R6tfln/55 fAHLgzLehDXEFHCQMoPfgIapIWC0+qX3sNDiFD5J6DaWTWGQp5c0hqCuRGfbV8xnBp XdZ/jAzxIDq41CAkATuh7dudWhMx0NTeAwSlwMx8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Helge Deller Subject: [PATCH 5.4 05/53] parisc/unaligned: Fix ldw() and stw() unalignment handlers Date: Mon, 28 Feb 2022 18:24:03 +0100 Message-Id: <20220228172248.682710207@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220228172248.232273337@linuxfoundation.org> References: <20220228172248.232273337@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Helge Deller commit a97279836867b1cb50a3d4f0b1bf60e0abe6d46c upstream. Fix 3 bugs: a) emulate_stw() doesn't return the error code value, so faulting instructions are not reported and aborted. b) Tell emulate_ldw() to handle fldw_l as floating point instruction c) Tell emulate_ldw() to handle ldw_m as integer instruction Signed-off-by: Helge Deller Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- arch/parisc/kernel/unaligned.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/arch/parisc/kernel/unaligned.c +++ b/arch/parisc/kernel/unaligned.c @@ -340,7 +340,7 @@ static int emulate_stw(struct pt_regs *r : "r" (val), "r" (regs->ior), "r" (regs->isr) : "r19", "r20", "r21", "r22", "r1", FIXUP_BRANCH_CLOBBER ); - return 0; + return ret; } static int emulate_std(struct pt_regs *regs, int frreg, int flop) { @@ -619,10 +619,10 @@ void handle_unaligned(struct pt_regs *re { case OPCODE_FLDW_L: flop=1; - ret = emulate_ldw(regs, R2(regs->iir),0); + ret = emulate_ldw(regs, R2(regs->iir), 1); break; case OPCODE_LDW_M: - ret = emulate_ldw(regs, R2(regs->iir),1); + ret = emulate_ldw(regs, R2(regs->iir), 0); break; case OPCODE_FSTW_L: