Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp796881imu; Tue, 11 Dec 2018 07:44:33 -0800 (PST) X-Google-Smtp-Source: AFSGD/XFS64VkNb/xHvyPd+0+4/jFP419XsvShoFcw+VZuY6samxFBafVciMPSpjtVOImzaZO/nU X-Received: by 2002:a63:151f:: with SMTP id v31mr14779751pgl.34.1544543073577; Tue, 11 Dec 2018 07:44:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544543073; cv=none; d=google.com; s=arc-20160816; b=wZu8dpp8oCDomTs4d1aLGXTsI+es/kQc14t/uip4q28+8pYVGWXV14iaR9aJCtLRtK OHMN7YCqffFsp7/m7zuazPiVetP1f83vZjLVnHMk8T1laQKYNt0N81unJ3jhWwaaxsXL uh5khrMDs0Du/jqNoB7QsuN2ODNWm+59WdNo1el3eFqGK7+jSCSak07Ayd3DGo/ZZTi7 VXQmhkmdm7iqZidpfBeNHQaq4gsDrrUwmJGLLuHDRvSEeV9ZtexZPvo7cbuJPadyYrEv G7IN3HV2CJQH8u5CttcLJc/xqBdkxGva1rsUU9kP5SShTc7+edI0Zra/2cqXimhtkSUl cjJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Ldl5VhVRf7nP+w4pkrzxk5+M0xrzLu+gJper50Q9avo=; b=QAX+GVQPqL0xAjR0BRsuaBfODN+kWhxv7hItR51vam1oJsL3906v+eAY0GzglK8Yhe zu/n87FTtw0UMBHWJZ8FspIU1H3BS7uG5CSMrXdGpPkPcgqec/AWfPBHhk5wdam7yTpe H/o56ivo67fnK1YqTQ/rLjMoyfWtm2i0sNSNfnMFYOf2wCxSDmUaOw3efpfzaw0oM4VE EIl2jBe4NVAsap8aLHQmBBoBlNML7o54amLK/vFW2QcYlfjdrdrBhe+qRv2K1NBY1sX4 L6lAjH0Lpgy6SDAAAXAmtYf2YFBAxU9/tV+qFELFU/9XxYK9Ib/N75Z4dh9fskH2mK9p oyIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Z+WwX5ZS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d10si12714443pgf.136.2018.12.11.07.44.18; Tue, 11 Dec 2018 07:44:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Z+WwX5ZS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727442AbeLKPnI (ORCPT + 99 others); Tue, 11 Dec 2018 10:43:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:59556 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727424AbeLKPnI (ORCPT ); Tue, 11 Dec 2018 10:43:08 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D53F220870; Tue, 11 Dec 2018 15:43:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544542987; bh=hhL/76R98sHmWbd3paeuyqZ/dN5KWx69qwWTOTpvASE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z+WwX5ZSJTNXNLW5pHtsyDxapdfjcQRLBu1I+6zLe75vthbCiOkDK2jSZfcfdsrjk b3esPXXrRnpMtKRMUKd3WBFd0F0ARZ7/JVLifDxxd71Jawsj6f7g2BDWJ0a7HC64rF UGCoWA/UzgN1kgm80dSBEqCdT6/oqw8O+OIu0Lp8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Dmitry V. Levin" , Paul Burton , Elvira Khabirova , Ralf Baechle , James Hogan , linux-mips@linux-mips.org Subject: [PATCH 3.18 24/54] mips: fix mips_get_syscall_arg o32 check Date: Tue, 11 Dec 2018 16:41:12 +0100 Message-Id: <20181211151547.336853752@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181211151546.010073210@linuxfoundation.org> References: <20181211151546.010073210@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dmitry V. Levin commit c50cbd85cd7027d32ac5945bb60217936b4f7eaf upstream. When checking for TIF_32BIT_REGS flag, mips_get_syscall_arg() should use the task specified as its argument instead of the current task. This potentially affects all syscall_get_arguments() users who specify tasks different from the current. Fixes: c0ff3c53d4f99 ("MIPS: Enable HAVE_ARCH_TRACEHOOK.") Signed-off-by: Dmitry V. Levin Signed-off-by: Paul Burton Patchwork: https://patchwork.linux-mips.org/patch/21185/ Cc: Elvira Khabirova Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org # v3.13+ Signed-off-by: Greg Kroah-Hartman --- arch/mips/include/asm/syscall.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/mips/include/asm/syscall.h +++ b/arch/mips/include/asm/syscall.h @@ -57,7 +57,7 @@ static inline unsigned long mips_get_sys #ifdef CONFIG_64BIT case 4: case 5: case 6: case 7: #ifdef CONFIG_MIPS32_O32 - if (test_thread_flag(TIF_32BIT_REGS)) + if (test_tsk_thread_flag(task, TIF_32BIT_REGS)) return get_user(*arg, (int *)usp + n); else #endif