Received: by 10.213.65.68 with SMTP id h4csp1148065imn; Wed, 14 Mar 2018 11:00:17 -0700 (PDT) X-Google-Smtp-Source: AG47ELs37GR+3vdH/IGHDgPBGXCCuq+0zp3D2bm4SdhFJ5k3XnDD1CnN1heg6j51RmYEatVrMb2O X-Received: by 10.99.43.67 with SMTP id r64mr4382916pgr.403.1521050417636; Wed, 14 Mar 2018 11:00:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521050417; cv=none; d=google.com; s=arc-20160816; b=pX3YIW0LvF7Pt6kJKgmP/EwVvap13HJaZJSC7zV7KAmZMgaAnWAxWhr3sfopsdCqDI bqqnYGaYNhrFVNpapfd13nCecuQ2oi8XamolYv2hJ6llGH7v43huTqFPgpjRZqr1ZsDZ LDLlzeHTnjdF1jRLEvR0JLTMOQlA2M/JMbKYl2P2wz46d3MW+9HiByscu64O/d1aW0KU LJE5XnCr4vveTgQbwhO8+ku+uyVA4ZIWqEJFLQDRDSdhGcX0QOK7VmukPRR1XJFAMINY H7X+fSlRXTF6AH7189i3Jc/5mY3sqsEIDS76JUYCkQYNC1eUkPuLUwgYfZWUJiCyfzW9 FxbQ== 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=YRzKBm6E8X6HrnT0BoEj/Cg6GMR+dTEUNtiG3Hww9oE=; b=eVIGSiuMR5BatkbJ7pXQTxLlD2dANswFX2Poo2lxhtuIqEbIB0o9Rl7EgaqlvRHLIm J3FXhsJbuAe5Xl5aM9lv9NTX7KPQZnm57aHqRdZWdfGB/iksDaAd1+rcBxWiTn9nYEZr inhNoB6EvA97SqrIFOMpPPwvaLxiryhZTHZOqvoh9wOnnu6cyImvsuDSjD8NhigQPdmo KaSmSUDrJPUEyoyJChufWRldt9lCF/KKdSKoOlE82k3mILOXih+D6bWfQbSrQufio0ma YzdWI2/eVUWHXTvIxFu5JondgbE1qsFhFiIdab+xesj6I6Z+2/93jVsubYLYz1GVAhmd WApA== 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 j11-v6si2276344plt.722.2018.03.14.11.00.02; Wed, 14 Mar 2018 11:00:17 -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 S1752003AbeCNR7D (ORCPT + 99 others); Wed, 14 Mar 2018 13:59:03 -0400 Received: from mail.skyhub.de ([5.9.137.197]:37040 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751428AbeCNR7C (ORCPT ); Wed, 14 Mar 2018 13:59:02 -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 oG34Fh1oya9j; Wed, 14 Mar 2018 18:58:45 +0100 (CET) Received: from pd.tnic (p200300EC2BC98E000DB0D181F40EDD09.dip0.t-ipconnect.de [IPv6:2003:ec:2bc9:8e00:db0:d181:f40e:dd09]) (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 6AD7D1EC05F5; Wed, 14 Mar 2018 18:58:45 +0100 (CET) Date: Wed, 14 Mar 2018 18:58:24 +0100 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 v3 3/9] x86/microcode/AMD: install_equiv_cpu_table() should not return (signed) int Message-ID: <20180314175824.GG16605@pd.tnic> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 13, 2018 at 10:06:34PM +0100, Maciej S. Szmigiero wrote: > The maximum possible value returned by install_equiv_cpu_table() is > UINT_MAX + CONTAINER_HDR_SZ (on a 64-bit kernel). > This is more than (signed) int type currently returned by this function can > hold so this function will need to return a size_t instead. I'm trying to parse this but I'm not really sure. All I know is: unsigned int size = ibuf[2]; and that is really a 4-byte unsigned quantity so anything less is an arbitrary limitation. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.