Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp687506imm; Fri, 15 Jun 2018 04:47:57 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJBbpcRXK0bTEZBwpXhlzpd8P1lM9vB/tu80awP6vHNBCSVVE+50+S8x9Fnov4Fym/jNwWg X-Received: by 2002:a65:5ac9:: with SMTP id d9-v6mr1296593pgt.238.1529063277366; Fri, 15 Jun 2018 04:47:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529063277; cv=none; d=google.com; s=arc-20160816; b=s5f6Eh0BKHIajfor2x+g2pyZ1bEdKkg5P0CE1KVqj6QEt9fFRfU9U8jp8whxgXFsty urW2Zsef3TAX65Pr424d6RpE1mveJCKDX/Z798PvbOwTaK5Tg6YHoWmIh86LRhIGnEx1 AZxERlCJnFgw4q27fHQ6bX9P5xZI5YZ41iSSjqrLhbmbRKZcnod9h3fzkMFbPPhjaXYr EHhniEljg9GR4pJHYd2QNjR8Mu5VVK3U1KdQeicWWJGKOvt7CuZCWJOJF+Q07s3RuEEH Y6ePr1CuniXMrSzLKu+W2fheNsVgtmx11m8h+t4qN5+1R088Vjh8egGSdBN3jmKLZsCx udlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=rUNwGTxKiZeWJkTzmt+rFgLwxsqnkg32lMDagaEeUOA=; b=AuXOCHWnfSMPPEufluOrUKVtrHL3+4AkTRxQfVubmH5H4ki+JIWDkq7FsI84EYwU30 hZCLCaS14W4jflejGxbOQMuvW1ciRDxCCdN3xcX86HhRIL+Ce5kvcXjAu6aLtDO38MMl M/FX82fSfkTrCaeYfQX+ZL0DQAS7yYnKRV2JFxkaf6lFO1B5LxPVw8BELVJu7aUCW7ME EmzrDmpYxevff30CqiExtiwSmMA6qWIRemtBamEwyAkO80lmllFX/ppgBNPRmi+qq1/U oaTblrrK3SGx/GX5o29ddmtgyZa4c0RpFTT+95Int9jWfO+zsu94mB63qr0bejTp2nni 3Jsw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z14-v6si6392473pgz.264.2018.06.15.04.47.12; Fri, 15 Jun 2018 04:47:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756016AbeFOLnB (ORCPT + 99 others); Fri, 15 Jun 2018 07:43:01 -0400 Received: from mail.skyhub.de ([5.9.137.197]:51410 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755651AbeFOLnA (ORCPT ); Fri, 15 Jun 2018 07:43:00 -0400 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de Received: from mail.skyhub.de ([127.0.0.1]) by localhost (blast.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id mmmz4Uu-fi9j; Fri, 15 Jun 2018 13:42:59 +0200 (CEST) Received: from zn.tnic (p200300EC2BCDD600329C23FFFEA6A903.dip0.t-ipconnect.de [IPv6:2003:ec:2bcd:d600:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 1F0F61EC0299; Fri, 15 Jun 2018 13:42:59 +0200 (CEST) Date: Fri, 15 Jun 2018 13:42:54 +0200 From: Borislav Petkov To: "Maciej S. Szmigiero" Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 3/8] x86/microcode/AMD: Check microcode container data in the early loader Message-ID: <20180615114253.GD25559@zn.tnic> References: <0c53181bd5eb4e172407d9fde534cedb12e19b98.1526767245.git.mail@maciej.szmigiero.name> <20180605085427.GB1617@zn.tnic> <7c47bfe2-3293-2973-d9bb-daa218d5751b@maciej.szmigiero.name> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <7c47bfe2-3293-2973-d9bb-daa218d5751b@maciej.szmigiero.name> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 14, 2018 at 10:56:07PM +0200, Maciej S. Szmigiero wrote: > At this point we don't know the CPU family the particular patch is for > since the patch header contains only CPU rev_id, not an explicit family > number. patch_fam = 0xf + (mc->processor_rev_id >> 12); which means, you can do if (patch_fam != family) return 0; like verify_and_add_patch() does before calling verify_patch() with the correct family of the current CPU. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.