Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3425911pxf; Mon, 22 Mar 2021 06:16:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSvsc7duJLDYy8d0LJy46zFz2u+xZUX02GnFb8oVqCBRip8FMQQBxiR2GGnZJmdqCkxP6V X-Received: by 2002:a05:6402:26c9:: with SMTP id x9mr25359121edd.322.1616418992542; Mon, 22 Mar 2021 06:16:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616418992; cv=none; d=google.com; s=arc-20160816; b=OZA1o4iRfaX01ephvysF1AMc6V7kqDtAbvhPo0RuFeVJxkKumMx4k05NoYbsfQjDu9 6cac+g+zTzGYhvg2mn8+btCbynfHIbf/9kYG5osNtR55rU6kN9W0z5gKEO3Gv1NirMbl HcAJIaYIKPD5d02r/Rm/Ww8L5LzpeJwoW8F8cAgufb2Yr849tNonsd/qFdnEDw0R8ms2 it3UiW2vLpji0/9iYwwbQVLB6x9AyL5SyKitYsKFkpuM+4Tpnk+8YS273wSUHhso73cx 0KN3LquSRFV+puPZOrEdFITsrNzxW2f9ss2U1zAid8KSyp39On0FYMMCThMoGBU4Ab5R Ay6A== 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=UEV2tUpKJAl+IprjRGBKO8++9kFpb+eqw/CleLYXhSY=; b=ITwyh8qno/tiS+4bn9y/i9xjb0LLemyOAXRoxUBSSW1Bu4BxliP2EWBXQXPt97+F+N fvqSFS5Tb6cznlf8h2rcrB+52qtjECImFv8vmnE3edJycJybSGRnqBzY8L1OsLvw+jdr riJWJSpKRJnH8QIJ6XrEae0LtEsUnE+kOs2tbGYvVVkT5HOa9Ftd/b+XdOyxLiQjA9yy 1sRxUbWXhVV7mS6NZTKbb1UgOISNnNsxaLW39s8ZLtumSjjXBe6Fuq81x7ukQsMMLwed aWjAWuei3tzh9EnZR59uSHQTHtHtZDVRhxqZZaTGMbqWISvPfZAfRh0s1tBOcWUR6GkR Mhag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=V3Yez7cE; 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 n23si11064801ejs.705.2021.03.22.06.15.59; Mon, 22 Mar 2021 06:16:32 -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=V3Yez7cE; 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 S231636AbhCVNLs (ORCPT + 99 others); Mon, 22 Mar 2021 09:11:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:51112 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232395AbhCVM5A (ORCPT ); Mon, 22 Mar 2021 08:57:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F28CF61A43; Mon, 22 Mar 2021 12:49:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1616417345; bh=gb4jHTXsVwMzTQ/u3yzOWzTn1m80SlvBJa4XX531drg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V3Yez7cE0gBbWhgqWWbcagBWfDyTXigKERMIdWsOyQ2g1AY3Dto+KZ2x/yzuZWHRw tG/VTaZmI2srqmX9GlN1z/h1pwTmRV8Q+LqoEa2K2MXN+pLg85eraWYvE8eKhjxKIR zjgoEkuukUpeumWZxQHQaMwxmwaA7qHDjz72eAp0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Oleg Nesterov , Thomas Gleixner Subject: [PATCH 4.14 38/43] x86: Move TS_COMPAT back to asm/thread_info.h Date: Mon, 22 Mar 2021 13:29:19 +0100 Message-Id: <20210322121921.252134818@linuxfoundation.org> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210322121920.053255560@linuxfoundation.org> References: <20210322121920.053255560@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 @@ -512,15 +512,6 @@ struct thread_struct { }; /* - * 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)*/ - -/* * Set IOPL bits in EFLAGS from given mask */ static inline void native_set_iopl_mask(unsigned mask) --- a/arch/x86/include/asm/thread_info.h +++ b/arch/x86/include/asm/thread_info.h @@ -229,6 +229,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