Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp841183imu; Tue, 11 Dec 2018 08:21:57 -0800 (PST) X-Google-Smtp-Source: AFSGD/VxwjWrE6B8+sn+pUWVBe3OmRZhh9juN1oBr8QoU4kdt/B/ytfoWi6BZhaiwhsYb7dlcyuw X-Received: by 2002:a62:ea09:: with SMTP id t9mr17823553pfh.228.1544545317630; Tue, 11 Dec 2018 08:21:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544545317; cv=none; d=google.com; s=arc-20160816; b=XZ+KcZPblNPf2ZKRaRXetw2/BpBlSa0qkbLkgGE57BArTHfyCJECMsAcRx2uKbkrxL +LiOECMJL3Wbs0Bu5csdgHr8MgwdT7J7sui8tPLpqk3iw7YfBohL0TuSelYmU9Nu+Nav s04jzqpCNZmv+9z0ZnCl1V1gjx4/GDDHCbPIF5KQuhb24XfjS4blrbZ2vqTp5jrKSy8/ BtkUTP4a+ttTmCNuKCEA6KNMuXw3XNzu61FpERlocEKNtEJ7eBJ+Rry/6XwQ+pVeUZWW b8NBF2rTloF+eJKOq/nSYs98ciiwswcH5KJCc9g7Z7vgms7lixUtuJtSS49E+17krd0x UOiQ== 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=gNwTuYiGwIeZtV2rxTrxtFZ5yK8iC/Gss6eZJ0TJCQ8=; b=dZxEbsLlBfu0TO9RSPu1CM1EdrU+onVFFBqR9OcGm6Urr383asLUoUudEfwsTsZLkb fLyWbrddr4Dejgsmp0JVhz6ugkErhqpvqbBGLfN76G5hDktIoa+RTaBJ950QIpEhprXo XUbempmqQnQCoUXdPFv2VoIwjmB0O2UpQ1gQ07SfBzVK7z9zrp4uunapQBJ5649oWc/X 0xyGMLDXRQzdRCYHP4b4pao9/vr3qO7Jc/c19LnUPOicPu4sABro9XURaBXGC8bkWcs2 VIEoruEAjJ3suWHepR2+7Om69jK3r4V67xtduz4DyvCbEXpDg/uGYVjo8m51gL43GhCI XgGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f8nMlw0R; 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 q14si12123048pgq.197.2018.12.11.08.21.42; Tue, 11 Dec 2018 08:21:57 -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=f8nMlw0R; 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 S1728067AbeLKPpT (ORCPT + 99 others); Tue, 11 Dec 2018 10:45:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:33698 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728041AbeLKPpR (ORCPT ); Tue, 11 Dec 2018 10:45:17 -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 08D6720870; Tue, 11 Dec 2018 15:45:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544543116; bh=Bvvz+2sDgQg6qRUwUeEBxJmK8dQo18w8/NBrGFjTiaI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f8nMlw0RVsn6S1IeOX9YjLFYcLJ5epKKAvzwe7UbA0DyN9XcNyneRbV70h4TRM24q Iw7W/n69VRO+T/a67DrcIRqCm3Kmu0iENGby5exv5YmPHy4W/cDT/CzLjtI3Yt5acm e4rSyhyMwNeJr8S464D/flKmoi2k0YS/iJ9BCWCc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Max Filippov Subject: [PATCH 4.4 08/91] xtensa: fix coprocessor context offset definitions Date: Tue, 11 Dec 2018 16:40:27 +0100 Message-Id: <20181211151606.672799924@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: Max Filippov commit 03bc996af0cc71c7f30c384d8ce7260172423b34 upstream. Coprocessor context offsets are used by the assembly code that moves coprocessor context between the individual fields of the thread_info::xtregs_cp structure and coprocessor registers. This fixes coprocessor context clobbering on flushing and reloading during normal user code execution and user process debugging in the presence of more than one coprocessor in the core configuration. Cc: stable@vger.kernel.org Signed-off-by: Max Filippov Signed-off-by: Greg Kroah-Hartman --- arch/xtensa/kernel/asm-offsets.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) --- a/arch/xtensa/kernel/asm-offsets.c +++ b/arch/xtensa/kernel/asm-offsets.c @@ -90,14 +90,14 @@ int main(void) DEFINE(THREAD_SP, offsetof (struct task_struct, thread.sp)); DEFINE(THREAD_CPENABLE, offsetof (struct thread_info, cpenable)); #if XTENSA_HAVE_COPROCESSORS - DEFINE(THREAD_XTREGS_CP0, offsetof (struct thread_info, xtregs_cp)); - DEFINE(THREAD_XTREGS_CP1, offsetof (struct thread_info, xtregs_cp)); - DEFINE(THREAD_XTREGS_CP2, offsetof (struct thread_info, xtregs_cp)); - DEFINE(THREAD_XTREGS_CP3, offsetof (struct thread_info, xtregs_cp)); - DEFINE(THREAD_XTREGS_CP4, offsetof (struct thread_info, xtregs_cp)); - DEFINE(THREAD_XTREGS_CP5, offsetof (struct thread_info, xtregs_cp)); - DEFINE(THREAD_XTREGS_CP6, offsetof (struct thread_info, xtregs_cp)); - DEFINE(THREAD_XTREGS_CP7, offsetof (struct thread_info, xtregs_cp)); + DEFINE(THREAD_XTREGS_CP0, offsetof(struct thread_info, xtregs_cp.cp0)); + DEFINE(THREAD_XTREGS_CP1, offsetof(struct thread_info, xtregs_cp.cp1)); + DEFINE(THREAD_XTREGS_CP2, offsetof(struct thread_info, xtregs_cp.cp2)); + DEFINE(THREAD_XTREGS_CP3, offsetof(struct thread_info, xtregs_cp.cp3)); + DEFINE(THREAD_XTREGS_CP4, offsetof(struct thread_info, xtregs_cp.cp4)); + DEFINE(THREAD_XTREGS_CP5, offsetof(struct thread_info, xtregs_cp.cp5)); + DEFINE(THREAD_XTREGS_CP6, offsetof(struct thread_info, xtregs_cp.cp6)); + DEFINE(THREAD_XTREGS_CP7, offsetof(struct thread_info, xtregs_cp.cp7)); #endif DEFINE(THREAD_XTREGS_USER, offsetof (struct thread_info, xtregs_user)); DEFINE(XTREGS_USER_SIZE, sizeof(xtregs_user_t));