Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10794023imu; Thu, 6 Dec 2018 06:56:25 -0800 (PST) X-Google-Smtp-Source: AFSGD/WhENltojXIQwOINWJZpw75eGLsABiGqC5ySS7BBtJz1q0bRkq6PaNz65m8fQmjZfCpRBI4 X-Received: by 2002:a17:902:5a0b:: with SMTP id q11mr28845169pli.186.1544108185569; Thu, 06 Dec 2018 06:56:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544108185; cv=none; d=google.com; s=arc-20160816; b=Sf3JRZkJ/sKgelzPCr/VJOLBLrAk/uW9/kVzAo6LFu9YjApg0s3V2UZztvf9teFfBx waE+lWAXv4OpnV/+bQrmhYhMlGYLBA9GCY8HiOowCNWq2T1otl4a2Ax11LgutpNwbsAe m/+ulKGFUCGksM8ax/BHUSDz2vsNcsnx9hUHUvqWsAig0/9pdGdIJnbuZzRy/DEr6O/s +Wkmfm3j4Wbkrr+2zESmxvnS93Wf2cHukFPfgowgMQmGPCmWHQaCqB2gzwadKrB/fHB7 co3rDQjcczTna4ZJx20Y0MeBu/3JW9GMcm8pU23gigS7OzVzc6X2m/3QpGjhKeHnJDYU Xggg== 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=fPTbA8O96KtYpRQWisNLEbJBia1NTY1XFveePKP5gIE=; b=rWio8zqKS6SOmigRjcm+gRFEWcjpwwzygsjkXID/AyIuL//0x/RQfyyY+eJalNQUnH gz5pUnX734HhZhbWsMDAUa2Nbv9IPKP7T6Mmz0ln8uFYh4CEuGfkzpnDNccp+eaipkd7 6isqY1juY958VRrI7qm77rOLDF4ARlKXzVWS5AwNZHuNfQ8k91i1gGakJn+vL2CptQol 7UAdcYKPFcDBEOcxc5TtzGLGBxjdQtHYsivPl+faqIcjrgPu8GmS9gQkAm9GPd6K7ton Q5ozOyrQsL7ELIolSA9sMrLJKFz2TfvMZ3MByQdB5SanmQWt7yT8FnoSsCWAb2iadThb N5GA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2Vx1xNiv; 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 g8si458260pfa.11.2018.12.06.06.56.08; Thu, 06 Dec 2018 06:56:25 -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=2Vx1xNiv; 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 S1730875AbeLFOo1 (ORCPT + 99 others); Thu, 6 Dec 2018 09:44:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:49036 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730866AbeLFOoX (ORCPT ); Thu, 6 Dec 2018 09:44:23 -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 8210320892; Thu, 6 Dec 2018 14:44:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544107463; bh=C9nYDu0poP+OSd0wIVWqjUV/eEPKM418xxQSoOcgLnQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2Vx1xNivI6+qvaw+qYpXLLUoFdTQXm9pt2b0j6ufl6PFeXk8xOZUVYQO7pxTpX9J5 nl4SN8UtwatLOTDUa03sb37hYRytFpegNlPtC0ZTFOwEbthm8joA1N/yxk99DncYxD QZ3RyVmM6t0QZJ69tL7at7jrEYf2Y2fNHXNahFEk= 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.9 016/101] mips: fix mips_get_syscall_arg o32 check Date: Thu, 6 Dec 2018 15:38:15 +0100 Message-Id: <20181206143012.488340685@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181206143011.174892052@linuxfoundation.org> References: <20181206143011.174892052@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.9-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