Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8098618imu; Tue, 4 Dec 2018 02:59:51 -0800 (PST) X-Google-Smtp-Source: AFSGD/UaLP/4g5y10N81BRrsW4jPoHf/qCUXRlAMXxj6WcFYKnmi2miTHxpMGhmjd/v3Owp4urID X-Received: by 2002:a17:902:ba89:: with SMTP id k9mr19827239pls.189.1543921191497; Tue, 04 Dec 2018 02:59:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543921191; cv=none; d=google.com; s=arc-20160816; b=VFKi6ah2FzJSPPByAuruT09AAIvvwYuGRIlgdGv/JV5T0L9cc0jVrbRxEP58Sxubmy yUXuP6ik2tEOKkhwQauQGmAK7OB0a1K/6aF2mttsm9pATkxfNFy5RDGtZkj6N1q9kSnG pl0XCKJOcrAubARlxHGN0T8WxJevR4AltCPllK349sQx6wHYGrSaUkLVBrqcJZkJKWC9 JazSX+X15Q1dUE0/jxpI+gZtihu5BXauXJr5+7FHLRuJozDyf0iUSJ7FOXYOtVNNXvTc kP9NkNKsytpT+GNMP2iFfumoUHy3FUCYjW8NYRBU5TxPjHYaoa21lm1XY1xKMQy8jd7d lyqg== 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=o8iGy3qdF76YPs06Klq38Zq533yHimAoylNlZNHo43E=; b=Fcv2aqHMQw4RDEROqYqK8lfNV7KQnTCxDJbwQKAW2zR+tsgOaRvXbS4lEfRwMkg0Nh CA+28nEymjxqij962VsN4Mf/WoXGUZ6JZZ8ugxngEOh8zOJne7rjH0Vjlk8uEd0kZQbp x2rQhoBFNt0spt/tar0Z1QeN7p11IYD8svf4G0rjmkV8t7MFpG6DvuNpIFaTRgDdrt4g ZL5s91BT5qJN0Og8TqTFWvHN8yAq/NNWkaXky6hR4LF2+Q1FemuNTm6kb1eYk6YO98Mq hEBhd56UzKCLnXSDeXVkotS1GqTRkhHbI3lgyxPLouk+zbmzZNi4ffwEPt/jryZUufOJ RKBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LX5q2iPz; 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 a3si14512276pga.297.2018.12.04.02.59.36; Tue, 04 Dec 2018 02:59:51 -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=LX5q2iPz; 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 S1726877AbeLDK6F (ORCPT + 99 others); Tue, 4 Dec 2018 05:58:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:42172 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726867AbeLDK6A (ORCPT ); Tue, 4 Dec 2018 05:58:00 -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 9A7962146D; Tue, 4 Dec 2018 10:57:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543921080; bh=x7w/mYbsmM9vM/Onz7NCL/vX5ZpMq/nAsq6dFiYT3gg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LX5q2iPzDpR4/Ubq11evTMpAU8hTGSxM36F/1ZsYf5WSS5FevdySpUmjoGc+iUjn7 /rGWU2LoREbEuOAdweMS7xuPTzYFeG5LVoY11wKsVKc6JdVLBW3kAFs7zYP8orHXqw SNxO/6D535HIHfrWv2HlZTejJ9al7Wadq9mHkElk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Max Filippov Subject: [PATCH 4.19 071/139] xtensa: fix coprocessor context offset definitions Date: Tue, 4 Dec 2018 11:49:12 +0100 Message-Id: <20181204103652.992529481@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181204103649.950154335@linuxfoundation.org> References: <20181204103649.950154335@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.19-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 @@ -94,14 +94,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));