Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932847AbbERUyc (ORCPT ); Mon, 18 May 2015 16:54:32 -0400 Received: from terminus.zytor.com ([198.137.202.10]:53261 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932537AbbERUyb (ORCPT ); Mon, 18 May 2015 16:54:31 -0400 Message-ID: <555A5165.8020500@zytor.com> Date: Mon, 18 May 2015 13:53:57 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Borislav Petkov , Brian Gerst CC: Prarit Bhargava , Linux Kernel Mailing List , Thomas Gleixner , Ingo Molnar , the arch/x86 maintainers , Andy Lutomirski , Denys Vlasenko , Dave Hansen , Peter P Waskiewicz Jr , Igor Mammedov , Fenghua Yu Subject: Re: [PATCH] x86, cpuinfo fix cpu_data(0) x86_model_id field truncation References: <1431973260-24617-1-git-send-email-prarit@redhat.com> <20150518194538.GD23618@pd.tnic> <20150518203600.GH23618@pd.tnic> In-Reply-To: <20150518203600.GH23618@pd.tnic> 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 Content-Length: 748 Lines: 20 On 05/18/2015 01:36 PM, Borislav Petkov wrote: > On Mon, May 18, 2015 at 04:27:02PM -0400, Brian Gerst wrote: >> The problem here is that strim() modifies the string in place, >> replacing the first trailing space with a null. I think the best >> solution is to do the trimming in get_model_name(). It already trims >> leading spaces for Intel. > > Sounds good - start from the 48th position forward to the first non \s > char. Yeah. > Yes, we should trim both leading and trailing spaces. -hpa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/