From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751625AbcEJR1E (ORCPT ); Tue, 10 May 2016 13:27:04 -0400 Received: from mx2.suse.de ([195.135.220.15]:38552 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750951AbcEJR1C (ORCPT ); Tue, 10 May 2016 13:27:02 -0400 Date: Tue, 10 May 2016 19:26:57 +0200 From: Borislav Petkov To: Dave Hansen Cc: Yu-cheng Yu , linux-kernel@vger.kernel.org, x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , Andy Lutomirski , Sai Praneeth Prakhya , "Ravi V. Shankar" , Fenghua Yu Subject: Re: [PATCH v5 02/13] x86/xsaves: Rename xstate_size to kernel_xstate_size to explicitly distinguish xstate size in kernel from user space Message-ID: <20160510172657.GF28520@pd.tnic> References: <20160510170130.GE28520@pd.tnic> <5732159C.6030202@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5732159C.6030202@linux.intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 10, 2016 at 10:08:44AM -0700, Dave Hansen wrote: > But the kernel never actually stores "user_xstate_size" anywhere or > really ever even cares about it except when copying in/out of userspace. Sounds like a reason enough to me. > "user_xstate_size" is also entirely enumerable in userspace with a > single cpuid instruction. So is a lot of other stuff we're dumping in dmesg. > It's nice to dump out interesting data in dmesg, but I'm curious why you > think it's interesting. I think it would be interesting to know what the kernel's idea is of user_xstate_size. I know, I know, one can follow the code and figure out what it is but one can say the same about a lot of other "interesting" data dumped in dmesg. And I'd like to know what fpu__init_system_xstate_size_legacy() decided. And so I know how many data is shuffled to/from userspace. And btw, this message needs more "humanization": [ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256 That doesn't tell me anything. Oh and it can be read out from CPUID too. -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --