Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753073AbbBYR5A (ORCPT ); Wed, 25 Feb 2015 12:57:00 -0500 Received: from mail.skyhub.de ([78.46.96.112]:35911 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752503AbbBYR46 (ORCPT ); Wed, 25 Feb 2015 12:56:58 -0500 Date: Wed, 25 Feb 2015 18:55:56 +0100 From: Borislav Petkov To: Quentin Casasnovas Cc: X86 ML , LKML Subject: Re: [PATCH 13/13] x86/microcode/intel: Fix printing of microcode blobs in show_saved_mc() Message-ID: <20150225175556.GK3226@pd.tnic> References: <1424774232-5981-1-git-send-email-bp@alien8.de> <1424774232-5981-14-git-send-email-bp@alien8.de> <20150224162427.GJ4565@chrystal.uk.oracle.com> <20150224164817.GF3420@pd.tnic> <20150225094125.GB30434@chrystal.uk.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150225094125.GB30434@chrystal.uk.oracle.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 Content-Length: 1985 Lines: 50 On Wed, Feb 25, 2015 at 10:41:25AM +0100, Quentin Casasnovas wrote: > Yup that's how I understood your patchset :) If I may though, I think the > issue I raised on your patch 8 is serious enough to get a fix before you > merge this patchset - it should just be a matter of adding some parentheses > at the correct place, and should be a good candidate for -stable. Right, so ext_sig is already correct because (void *) arithmetic is a gnu extension and works as expected when doing char ptr arithmetic. So the minimal fix should be this: --- diff --git a/arch/x86/kernel/cpu/microcode/intel_early.c b/arch/x86/kernel/cpu/microcode/intel_early.c index 079d8d41fba3..860006e3b5c1 100644 --- a/arch/x86/kernel/cpu/microcode/intel_early.c +++ b/arch/x86/kernel/cpu/microcode/intel_early.c @@ -158,7 +158,7 @@ matching_model_microcode(struct microcode_header_intel *mc_header, if (total_size <= data_size + MC_HEADER_SIZE) return UCODE_NFOUND; - ext_header = (struct extended_sigtable *)mc_header + data_size + MC_HEADER_SIZE; + ext_header = (void *)mc_header + data_size + MC_HEADER_SIZE; ext_sig = (void *)ext_header + EXT_HEADER_SIZE; ext_sigcount = ext_header->count; --- Now, since you spotted it, if you sent me a patch *not* ontop of my patchset but ontop of 4.0-rc1, I'll gladly take it and prepend my patchset with it. > I have also very limited time to allocate for this, but I can surely > help with reviewing. If I manage to get some spare time, I'll make > sure to try to contribute as well, no guarantee for now though! Ok, sure, absolutely. I'm already happy with people even looking at it and poking holes. :-) Thanks. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- -- 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/