Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp840085imu; Tue, 11 Dec 2018 08:21:02 -0800 (PST) X-Google-Smtp-Source: AFSGD/XPJhW5FqVJYv1oTWLSKhWVoOpUDdO8nmvD9kz6cZxKJyicrdj1QHnNJz24fPj9F2TSoKMh X-Received: by 2002:a63:5252:: with SMTP id s18mr15118487pgl.326.1544545262036; Tue, 11 Dec 2018 08:21:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544545262; cv=none; d=google.com; s=arc-20160816; b=iCM8t8I1xWetfDaDqgCqDuZhXoZUeRGTlyD9YgERagWhEQgvY9NbqNA/C/KBeTs7/l HUmI2cZVZAHM0F12eblHQNR8wjgIq60tWOM2HeeQWpLfWvKPPqClNS2C1f75S3IB2m8X 7GNQvP8Vq6b/W2HqtpXKZLaaKU9DUa58/RsXkIhkN9npPv9QfG0QztXTfmhyixzElIP0 /WhiEfbiM7Y3TBeEaxucDB0SBbTPbYpfWHZnLM8DnlW44VWk1W2/2IA/BJDPwJdTlHc6 YinM1Q61kUPEOcI+jKY/axal/ws2r+mxchiQyVQT2sDjiAg2uWRRE/sifc2ewm/4XnAj 1o8A== 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=tFmcRQhzA649lZEjl/H9u8Nfr20c5EqnM6GxEENzfYo=; b=Z84vDe00JO27cpMYB5hDlwBiM7lBBHFusYj05DALmkuWCgTtEt/GWuLVh3fAB/fjYZ rwTXjbd6KQYPsUQCFce/kCQo2zD4nxnGXJaxPCCu82S8YAh9oW1iml+7cVBXiLWUivzY Vg6vKYV/rUubjeAqug1OOS26NnQm0LbbFYApAi+kf/WHENldnt/G3hDQsF8vawvosA6B DrQBerEokLkS84XhD9SqWRoIQGjXqC9Nk83SUv+VPUC7SPmPs3Mqznio+LiIia7jiL/J ww4pxMHSOc4Yn2QQQzqKCRgyy18jfba8iPwqg8ZUrEb4u+2qQfDy1wo3ovuuQFjC4bCk voYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vwbTPmc0; 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 e7si11786942pgv.499.2018.12.11.08.20.46; Tue, 11 Dec 2018 08:21:01 -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=vwbTPmc0; 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 S1728581AbeLKQTN (ORCPT + 99 others); Tue, 11 Dec 2018 11:19:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:34426 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728242AbeLKPqB (ORCPT ); Tue, 11 Dec 2018 10:46:01 -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 9D43A208E7; Tue, 11 Dec 2018 15:46:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544543161; bh=LkuNzJ63dQb1wCaeaAUvHZyBEG+X+EefA+H+kZxqOkQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vwbTPmc0AxwMSc3HWAGDSyY6WNEp97HTQK7Hj+6wZQ7U5lpFfN4P1L2xwpMjRcD8Q KQ2VAif0jzTXCVPK5EiEoOV3tmLXY5YWi/l7ITeFrsa9HDtwlNdCzuXVSgbopOKhSA vtUlxN+e8t2hmEYMTVgsE0FhkumS6jLLi1w//p0Q= 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 4.4 35/91] mips: fix mips_get_syscall_arg o32 check Date: Tue, 11 Dec 2018 16:40:54 +0100 Message-Id: <20181211151608.638513924@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181211151606.026852373@linuxfoundation.org> References: <20181211151606.026852373@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 4.4-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 @@ -51,7 +51,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