From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932550AbbCCWBe (ORCPT ); Tue, 3 Mar 2015 17:01:34 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48229 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757587AbbCCWBc (ORCPT ); Tue, 3 Mar 2015 17:01:32 -0500 Message-ID: <54F62F1D.2020905@redhat.com> Date: Tue, 03 Mar 2015 17:01:01 -0500 From: Rik van Riel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Oleg Nesterov , Tavis Ormandy , Borislav Petkov , Ingo Molnar CC: Andy Lutomirski , Linus Torvalds , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] x86/fpu: factor out memset(xstate, 0) in fpu_finit() paths References: <20150301184650.GA12758@redhat.com> <20150301185943.GA14318@redhat.com> <20150302174818.GA16886@redhat.com> <20150302183210.GA23085@redhat.com> <20150302183257.GC23085@redhat.com> In-Reply-To: <20150302183257.GC23085@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/02/2015 01:32 PM, Oleg Nesterov wrote: > fx_finit() has 2 users but only fpu_finit() needs to nullify xstate, > alloc_bootmem_align() in setup_init_fpu_buf() returns zero-filled > memory. > > And note that both memset()'s look confusing. Yes, offsetof() is 0 > for ->fxsave or ->fsave, but it would be more clean to turn them into > a single memset() which nullifies fpu->state. > > Signed-off-by: Oleg Nesterov Acked-by: Rik van Riel -- All rights reversed