From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751728AbbH1FZH (ORCPT ); Fri, 28 Aug 2015 01:25:07 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:35377 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751005AbbH1FZF (ORCPT ); Fri, 28 Aug 2015 01:25:05 -0400 Date: Fri, 28 Aug 2015 07:25:00 +0200 From: Ingo Molnar To: Dave Hansen Cc: dave.hansen@linux.intel.com, mingo@redhat.com, x86@kernel.org, bp@alien8.de, fenghua.yu@intel.com, tim.c.chen@linux.intel.com, linux-kernel@vger.kernel.org, Linus Torvalds Subject: Re: [PATCH 11/11] x86, fpu: check CPU-provided sizes against struct declarations Message-ID: <20150828052500.GH25556@gmail.com> References: <20150827171102.1BDF27E5@viggo.jf.intel.com> <20150827171111.0552D053@viggo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150827171111.0552D053@viggo.jf.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Dave Hansen wrote: > @@ -447,6 +492,14 @@ static void do_extra_xstate_size_checks( > paranoid_xstate_size += xfeature_size(i); > } > XSTATE_WARN_ON(paranoid_xstate_size != xstate_size); > + /* > + * Basically, make sure that XSTATE_RESERVE has forced > + * xregs_state to be large enough. This is not fatal > + * because we reserve a *lot* of extra room in the init > + * task struct, but we should at least know we got it > + * wrong. > + */ > + XSTATE_WARN_ON(xstate_size > sizeof(struct xregs_state)); So do we need to warn about this? arch_task_struct_size is already dynamic today. The only problem would be the init task, which is allocated statically - can we fix that? Thanks, Ingo