Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3411175pxf; Mon, 22 Mar 2021 05:59:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBKVrseFv3rqZ/wjtvlb2cwSg/9UxtSyrndLpYXbgCgjYkMtL+uCd/lWrG2FTWwzKYikZW X-Received: by 2002:a17:906:f01:: with SMTP id z1mr19843506eji.235.1616417987118; Mon, 22 Mar 2021 05:59:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616417987; cv=none; d=google.com; s=arc-20160816; b=E7Fm8v5mORoZZR6cTYqDwzeEwF3dh2smN4XIfpzbBG4X/FxvjfxmSWCtGDYQsKneUZ E9O87pHOUYsJRT9CVppMUuMSKQ6Vw2T7hmjmsoxx0Xlwrh21eHYvcAPUrxMrtlRBwZ/y fzPukvBLtJSyCDeGHZPOi9+7xC3HKSmDNiyCRjqYWq2HbohnruCuKoJCTiUIGY8ACu0l OSL8aUbf7ecYIAWBMmddJsghLtYMfSj/3oulmeG8BMvG6B1i6dSD0PrkeL5LBVQ9d+7y Y/u5rHWI3osBzTERdq360lWzbMyWpza5dKH8LtfSkMiKTTXkaD3xcD1ZUVkbd5j6TAqa sJEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ZvirpSS2l808DEwDXiUDiPGlNgOKxvbVOeu/Xb+K3YI=; b=Jwx0tI/j4SoE5A5us4RFP4pogFQT21g5tVw9LpHGyL2xL2oxa2umTawsYnMW0mjh6I vKlJuFdYf/fBfdjuDIzQFqZY5xAjJNWjGdkbloqL5ULs1fHFizGCrXq1Qi7tpXLiH55w kOp/HqkkWyco/tfwBp/Fn9rE8vQWym+mqn3EXMb+nHZtFyNPe3rYf0iQmRVowmOG7vuf E6vBFgMWQ4MY7WXq/d6TYLxoh5znlCKilMsw65uluJS0Eox3pYdoqaV4yTboWyNR/x0r lBMG7YnAOGR6bGcfj/DG4Fq03AdwgCCbFkqhiAkC27ceicS5Vw3eYLWnGSNxUh2CkNqP ejJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RJfbDPmZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n20si11173479ejx.104.2021.03.22.05.59.24; Mon, 22 Mar 2021 05:59:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RJfbDPmZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232445AbhCVMy5 (ORCPT + 99 others); Mon, 22 Mar 2021 08:54:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:35426 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231855AbhCVMoN (ORCPT ); Mon, 22 Mar 2021 08:44:13 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 187E3619B7; Mon, 22 Mar 2021 12:41:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1616416897; bh=ZZGbIeYCHVqzpPhPvB6JeWh0T7dZgJfWJB7XjPxWgsM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RJfbDPmZmE9l1nmNXskaGk8oqoeXAzVCqXGcrC9FgDek0mWptj/dEv0/z3aJWmooG 9rTH0OvD+wy8/ei3gyK/OREo4JEY/MAgMGz7VKSD1xgGbgaziWwo3QA1x4wkX6j5xA cxbld6+Wvtp5LW1gjOg22DTotFew4WETHuY7E8aM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Oleg Nesterov , Thomas Gleixner Subject: [PATCH 5.10 142/157] x86: Move TS_COMPAT back to asm/thread_info.h Date: Mon, 22 Mar 2021 13:28:19 +0100 Message-Id: <20210322121938.251129219@linuxfoundation.org> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210322121933.746237845@linuxfoundation.org> References: <20210322121933.746237845@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Oleg Nesterov commit 66c1b6d74cd7035e85c426f0af4aede19e805c8a upstream. Move TS_COMPAT back to asm/thread_info.h, close to TS_I386_REGS_POKED. It was moved to asm/processor.h by b9d989c7218a ("x86/asm: Move the thread_info::status field to thread_struct"), then later 37a8f7c38339 ("x86/asm: Move 'status' from thread_struct to thread_info") moved the 'status' field back but TS_COMPAT was forgotten. Preparatory patch to fix the COMPAT case for get_nr_restart_syscall() Fixes: 609c19a385c8 ("x86/ptrace: Stop setting TS_COMPAT in ptrace code") Signed-off-by: Oleg Nesterov Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210201174649.GA17880@redhat.com Signed-off-by: Greg Kroah-Hartman --- arch/x86/include/asm/processor.h | 9 --------- arch/x86/include/asm/thread_info.h | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h @@ -552,15 +552,6 @@ static inline void arch_thread_struct_wh *size = fpu_kernel_xstate_size; } -/* - * Thread-synchronous status. - * - * This is different from the flags in that nobody else - * ever touches our thread-synchronous status, so we don't - * have to worry about atomic accesses. - */ -#define TS_COMPAT 0x0002 /* 32bit syscall active (64BIT)*/ - static inline void native_load_sp0(unsigned long sp0) { --- a/arch/x86/include/asm/thread_info.h +++ b/arch/x86/include/asm/thread_info.h @@ -216,6 +216,15 @@ static inline int arch_within_stack_fram #endif +/* + * Thread-synchronous status. + * + * This is different from the flags in that nobody else + * ever touches our thread-synchronous status, so we don't + * have to worry about atomic accesses. + */ +#define TS_COMPAT 0x0002 /* 32bit syscall active (64BIT)*/ + #ifdef CONFIG_COMPAT #define TS_I386_REGS_POKED 0x0004 /* regs poked by 32-bit ptracer */ #endif