Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp31735imm; Mon, 4 Jun 2018 12:28:02 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLrwf4sihmJxujKASNwHAjoaUT3nMcGX8vQZKkEQZ5qJyWLaIXziJc9PMw9luyio7nmB8VN X-Received: by 2002:a62:190d:: with SMTP id 13-v6mr5735999pfz.103.1528140481931; Mon, 04 Jun 2018 12:28:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528140481; cv=none; d=google.com; s=arc-20160816; b=tLh3IqqBXJG6YVWuIYb2yI4jXa3AjeN3YTIDnRORp2o600oLjWOxD5C9nc0fHT3jqd f/PJaxvbUA6yINu+NtLIkWVGRAjSSbs/p5m3TotyU8RrkL5HU0bxC8LYbKTwOQh+k6JD 8pCbF5siJ1uG97QflGyfTrfIth5DB+zKB4uOR3cyWb63FBW0kXbKBZl0JYO0J+tBN6WF fTamDwmzR8+uliPpnj21U76/7ukRnaGwIfBgct9PEOcUva800MgvxTPxQGxnFK/hJnqn 3pXhEaoaavppcNKBAW9TtScs40HB0EG4FP99ock9ExyHLGl2JYc9LbmGRhhtdLq8k3mw P05Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=qlOuwyfNrz/Yoh6894oySKfCDCQYslv0TXlXbuJjfQM=; b=0g4SbRVFC32vZ8BGjsPnTfxNnzQiOi1O1nDQr8LHj46jL8NrVg4WWP6+o5YCQG3AMv YK+N3YwwHWceMCmFEdGfYThSJKMVA5LueePfW9VO1GIzXVVn2oNWvO7+RG9Fp8EeOPf0 WcwPnvscCC4jGkUpM18KfPAsXU6iN3gBEe8cKBT4BnHs7woOa486zV729Nm2jBV7ajdu FypLUEyZqBjHBrENGQxh28cYxiBTB7b6nuZ0JBE5hYL/V+c92yrl3dQhxrFSWWj4J+0V udxn2yPtu3Z9Jz7o0JNdtn17Tsx5KCGOxqALDSl5SYcJMlOAdQ/DA+SMHmwiUNgZLd9v c4oQ== 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 g7-v6si7064606plj.146.2018.06.04.12.27.47; Mon, 04 Jun 2018 12:28:01 -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 S1751194AbeFDTYq (ORCPT + 99 others); Mon, 4 Jun 2018 15:24:46 -0400 Received: from mga05.intel.com ([192.55.52.43]:40503 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750879AbeFDTYp (ORCPT ); Mon, 4 Jun 2018 15:24:45 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Jun 2018 12:24:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,476,1520924400"; d="scan'208";a="64240672" Received: from chang-linux-2.sc.intel.com ([10.3.52.139]) by orsmga002.jf.intel.com with ESMTP; 04 Jun 2018 12:24:44 -0700 From: "Chang S. Bae" To: Andy Lutomirski , "H . Peter Anvin" , Thomas Gleixner , Ingo Molnar Cc: Andi Kleen , Dave Hansen , Markus T Metzger , "Ravi V . Shankar" , "Chang S . Bae" , LKML Subject: [PATCH 0/6] x86: infrastructure to enable FSGSBASE Date: Mon, 4 Jun 2018 12:24:23 -0700 Message-Id: <1528140269-26205-1-git-send-email-chang.seok.bae@intel.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Given feedbacks from [1], it was asked to make first a few patches ready as soon as possible. To make FSGSBASE facilitated, some helper functions and refactoring work are incorporated. Besides that, it includes Andy's fix for accurate FS/GS base read and cleanup for the vDSO initialization. [1] FSGSBASE patch set V2: https://lkml.org/lkml/2018/5/31/686 Andy Lutomirski (1): x86/fsgsbase/64: Make ptrace read FS/GS base accurately Chang S. Bae (5): x86/fsgsbase/64: Introduce FS/GS base helper functions x86/fsgsbase/64: Use FS/GS base helpers in core dump x86/fsgsbase/64: Factor out load FS/GS segments from __switch_to x86/msr: write_rdtscp_aux() to use wrmsr_safe() x86/vdso: Move out the CPU number store arch/x86/entry/vdso/vgetcpu.c | 4 +- arch/x86/entry/vdso/vma.c | 38 +-------- arch/x86/include/asm/elf.h | 6 +- arch/x86/include/asm/fsgsbase.h | 47 +++++++++++ arch/x86/include/asm/msr.h | 2 +- arch/x86/include/asm/segment.h | 29 ++++++- arch/x86/include/asm/vgtod.h | 2 - arch/x86/kernel/cpu/common.c | 5 ++ arch/x86/kernel/process_64.c | 181 +++++++++++++++++++++++++++++++--------- arch/x86/kernel/ptrace.c | 28 ++----- arch/x86/kernel/setup_percpu.c | 17 +++- 11 files changed, 250 insertions(+), 109 deletions(-) create mode 100644 arch/x86/include/asm/fsgsbase.h -- 2.7.4