Received: by 10.213.65.68 with SMTP id h4csp1317869imn; Wed, 14 Mar 2018 16:59:54 -0700 (PDT) X-Google-Smtp-Source: AG47ELvBf+5ZUT6H5RHgPJjAqzLUT5g/bRtNLp9Vh8nFgoCrxtxvGgb6S/DPJnaPgU7/fSKoavoA X-Received: by 2002:a17:902:8c93:: with SMTP id t19-v6mr5656067plo.304.1521071993998; Wed, 14 Mar 2018 16:59:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521071993; cv=none; d=google.com; s=arc-20160816; b=P0AYvTVyn/St6VUJzDE1fz1CfBmHCqIlkb96P1wS9ZxWoVFqqmhvqaTvEN5dQKo0ix eT/M2hFMOYgkpQ2yjfTxBWsXvGPiA9VbWP0gxfLgSeAf0HpOCHTSFgg9mQWMLzBSfdRR V+M4zcrl2pY3dZx2+ixV6h8bUGoL+2RVgoUsFUlnceC703/4hSRPpeCg70uZezkXFb0+ E6B6OUsrJD1TK7OXDIMand0XYs7USG0zCqrNe8rltjI90l1ZcHc2u9yIURjYNgGHPqKE nqarJ3YIr0Qrc7F/2gGW6M7mi8MBVR6LkR/XrsOIFpAWw3Tse0v9pLhper7yqUfq6k0+ r3Ww== 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=yLHS7ju3Ewf/vVWXe3IFOv7tcOjnfkRYeorBXcEVx48=; b=Blwy8sX4M6YFqSbtjmA/L+QQAmxpoMXVPvLNW9x66vOY4eUTyULOQm/dttDUlC4/fn CNiZbTdeVNsh4i0Pq2Bb9VnUoCXLCWpazpEhc3D1Cjq/GfkqGhIc7I+vet+MEXIM0JCh HMl5ebNf0Qj6Ri3Z9OzZ25Kn1HUimPtFj/qZdZcUFSRrn6fSqgXv2jrrvs4yhOdIvXUA WrhXbNyE9r7p4iTtdrTem3qdv12tAO+FXH2kOyGlmyATXUDgcAfSteLwAcrSz1BghxkT tDzBtuPHqJfqYlq8+dXptlftZmf4jFHF2e3bNIiEvHeP23lv0+4Lfhr5ytPleQ7ANClI ByIQ== 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 m5si2552990pgv.487.2018.03.14.16.59.39; Wed, 14 Mar 2018 16:59:53 -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 S1751666AbeCNX6v (ORCPT + 99 others); Wed, 14 Mar 2018 19:58:51 -0400 Received: from mail.skyhub.de ([5.9.137.197]:59014 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751426AbeCNX6u (ORCPT ); Wed, 14 Mar 2018 19:58:50 -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 iGqVKx9V61yL; Thu, 15 Mar 2018 00:58:34 +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 EB3CC1EC0328; Thu, 15 Mar 2018 00:58:33 +0100 (CET) Date: Thu, 15 Mar 2018 00:58:12 +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: <20180314235812.GB11061@pd.tnic> References: <20180314175824.GG16605@pd.tnic> 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 Thu, Mar 15, 2018 at 12:46:05AM +0100, Maciej S. Szmigiero wrote: > The maximum possible value returned by install_equiv_cpu_table() of > UINT_MAX + CONTAINER_HDR_SZ comes from the maximum value of this 'size' > variable (that is UINT_MAX) plus the header length of CONTAINER_HDR_SZ. > This won't fit in 'int' type, hence this patch. So make it fit by returning an unsigned int. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.