From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759111AbbCDLjx (ORCPT ); Wed, 4 Mar 2015 06:39:53 -0500 Received: from mail.skyhub.de ([78.46.96.112]:41353 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756861AbbCDLjw (ORCPT ); Wed, 4 Mar 2015 06:39:52 -0500 Date: Wed, 4 Mar 2015 12:38:37 +0100 From: Borislav Petkov To: Oleg Nesterov Cc: Tavis Ormandy , Ingo Molnar , Rik van Riel , 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 Message-ID: <20150304113837.GC3516@pd.tnic> References: <20150301184650.GA12758@redhat.com> <20150301185943.GA14318@redhat.com> <20150302174818.GA16886@redhat.com> <20150302183210.GA23085@redhat.com> <20150302183257.GC23085@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150302183257.GC23085@redhat.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 On Mon, Mar 02, 2015 at 07:32:57PM +0100, 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 Applied, thanks. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. --