Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp129840imm; Thu, 12 Jul 2018 15:41:48 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc3Zy5AoD3rulQQvENNTo73eDZp6piZIbDsCsIngUNecS2WqKV5RUb+lAoqSUriJyftxIsj X-Received: by 2002:a63:2404:: with SMTP id k4-v6mr3676811pgk.191.1531435308709; Thu, 12 Jul 2018 15:41:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531435308; cv=none; d=google.com; s=arc-20160816; b=OzvLqRm3c5PMoe/Y0iMHpqvAlU6Mx80X9Ii2rl1mPVuY2gw0oLW7fInNikON0862We 6CW8yod7f6wazMJ3jb00gf3Fa7Vm8tp+9p+23xZfDHZGvUt7AqI7fkaMkjiRn0aPCHUI MvWWG8UyNiOlgMG9pbToCSzbcI98VF5ZQOYgEl2dWCk6VzOwQZYuXwVJidSnjIcwbiXj qPYIC+BmvnvbVfIy3YGvCiGwVi8KbnDSTuOFUvP/BoDwudP3PAcCEvN7F6xrViLW7gPd c3i9OF/W2FE5ZDuWL16o8JR0ztYot2FwL/GwTcb6Vq7BEg6cTJ98ORx5aoGZ20HdL6GH 89Yw== 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 :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=ALqoR9TX+i1DY84MQy8qStMMkQiT1/7m40tOsldZWHM=; b=BGQVr47sINjFRZPESMkAGEXufW/6iCkFMqncyi8/12fKpzslRFlFpOpTbf5OQO1bov +3Lh8KCmeee/ApKv8DG9yh75BacRJSiYCsGtPPQj2x/u+gJBvv6dOQiy/2JkSg8lQ4HJ XUtYupT/7VHIruEI2dYCrfoPLgSFrx01feOmJzeTaoFAPuSFlk65k5csLesq0v+lT7Dq /wRSz771ZJfFXpCHNFqeIOV6d9132Ua3XMaJEbxN0GaazBbafdi4O1umlgt4Et0k20bB XM+48W/DgIduVYNy9ft6Siangsm2L5hespykNNZm7VYNfo0gsDKdI/c/cuHh66XFnhkY dVxg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f28-v6si24838953pfh.33.2018.07.12.15.41.31; Thu, 12 Jul 2018 15:41:48 -0700 (PDT) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387443AbeGLWwf (ORCPT + 99 others); Thu, 12 Jul 2018 18:52:35 -0400 Received: from mga09.intel.com ([134.134.136.24]:14614 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732601AbeGLWwe (ORCPT ); Thu, 12 Jul 2018 18:52:34 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Jul 2018 15:40:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,345,1526367600"; d="scan'208";a="239911458" Received: from 2b52.sc.intel.com ([143.183.136.52]) by orsmga005.jf.intel.com with ESMTP; 12 Jul 2018 15:40:54 -0700 Message-ID: <1531435034.2965.15.camel@intel.com> Subject: Re: [RFC PATCH v2 25/27] x86/cet: Add PTRACE interface for CET From: Yu-cheng Yu To: Ingo Molnar Cc: x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Arnd Bergmann , Andy Lutomirski , Balbir Singh , Cyrill Gorcunov , Dave Hansen , Florian Weimer , "H.J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , "Ravi V. Shankar" , Vedvyas Shanbhogue Date: Thu, 12 Jul 2018 15:37:14 -0700 In-Reply-To: <20180712140327.GA7810@gmail.com> References: <20180710222639.8241-1-yu-cheng.yu@intel.com> <20180710222639.8241-26-yu-cheng.yu@intel.com> <20180711102035.GB8574@gmail.com> <1531323638.13297.24.camel@intel.com> <20180712140327.GA7810@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2-0ubuntu3.2 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2018-07-12 at 16:03 +0200, Ingo Molnar wrote: > * Yu-cheng Yu wrote: > > > > > > > > > > > > > > diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c > > > > index e2ee403865eb..ac2bc3a18427 100644 > > > > --- a/arch/x86/kernel/ptrace.c > > > > +++ b/arch/x86/kernel/ptrace.c > > > > @@ -49,7 +49,9 @@ enum x86_regset { > > > >   REGSET_IOPERM64 = REGSET_XFP, > > > >   REGSET_XSTATE, > > > >   REGSET_TLS, > > > > + REGSET_CET64 = REGSET_TLS, > > > >   REGSET_IOPERM32, > > > > + REGSET_CET32, > > > >  }; > > > Why does REGSET_CET64 alias on REGSET_TLS? > > In x86_64_regsets[], there is no [REGSET_TLS].  The core dump code > > cannot handle holes in the array. > Is there a fundamental (ABI) reason for that? What I did was, ran Linux with 'slub_debug', and forced a core dump (kill -abrt ), then there was a red zone warning in the dmesg. My feeling is there could be issues in the core dump code.  These enum's are only local to arch/x86/kernel/ptrace.c and not exported. I am not aware this is in the ABI. > > > > > > > > > to "CET" (which is a well-known acronym for "Central European Time"), > > > not to CFE? > > > > > I don't know if I can change that, will find out. > So what I'd suggest is something pretty simple: to use CFT/cft in kernel internal  > names, except for the Intel feature bit and any MSR enumeration which can be CET  > if Intel named it that way, and a short comment explaining the acronym difference. > > Or something like that. Ok, I will make changes in the next version and probably revise from that if still not optimal. Yu-cheng