Received: by 10.192.165.148 with SMTP id m20csp3284778imm; Mon, 7 May 2018 09:36:43 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpdJXEa7xHMZ0Hb1Qr5IiXOYj4XNBbFsy1SphAxEfx98FGTPs5J6uWNWtdfKDYBHwflAq/5 X-Received: by 2002:a6b:bcc5:: with SMTP id m188-v6mr44096707iof.292.1525711003487; Mon, 07 May 2018 09:36:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525711003; cv=none; d=google.com; s=arc-20160816; b=wt2BddiXRTq6l70t//PfgA3VoTeOIg0B3eIX+08cqqiO1uXg2+w8sR+4FF6ewxvXA9 IaB0ASfyoT6Wf7tsmDzcU5Oo5qIjgh1iL1ZsCa80gyUePAcP3+1Zbjpa49/W3zXcjQP4 MO7dDHSopKoHZ4sCbwvvYudY4ahUG05m+2VFy2uK+B+W9bEGWkPKZ2ueuXBYgVGo8S1j /0sdFdo2HFPqf+8ymFmTk37NlElSVDg9LTSPcWvt7L5ezH7IUn1Vm1tbKgUsX2Y1YnJN K79dDXRj8o7ySR+Rm9/o8f3aCO5Y7I+3JKjIOYa1lMgNc7+Xg03IUIqMxqrMWP1a+C6v kpyQ== 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=0qdQXj0/4xje9kAgXFueMYWrF6RX2ler+HdCofo+PeQ=; b=030swH9V10wA6AlXptm07h4DVIKFEYhMcZaJ2XwUuTg8furHrdSw9u/68THv4wTZN4 ZjqGWOgmmYKDNoRIlIQRyFwcccMTvIz/LsQYQbf45WNxibCnLDD7wtQ1AIsi7BRxuOzQ J24CGPCdreCTQZJgXPu99EK5rYbmXwUDQwTuqzTLMb/mHZV2/LKIdlzljdzDZMxcduHm L8u6KiRnD8tOzcNS5AVqpYcsN5FnRAqQbCoaYq+I3/YZT/HBurqj7Dc7t/K+4DujDpc2 vsOTtb7VUTte+pbX6J6/FjLl/VBnXjrDuygDWR70ISEf6trZ+GCfO2+OM8ZNf2YMsRBY +Ztw== 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 u78-v6si20096303ioi.123.2018.05.07.09.36.29; Mon, 07 May 2018 09:36:43 -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 S1752580AbeEGQfr (ORCPT + 99 others); Mon, 7 May 2018 12:35:47 -0400 Received: from mail.skyhub.de ([5.9.137.197]:37258 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752163AbeEGQfq (ORCPT ); Mon, 7 May 2018 12:35:46 -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 pPADTXW4gI9D; Mon, 7 May 2018 18:35:29 +0200 (CEST) Received: from pd.tnic (p200300EC2BDD8A009DE1AF1CF2B6B02B.dip0.t-ipconnect.de [IPv6:2003:ec:2bdd:8a00:9de1:af1c:f2b6:b02b]) (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 EA6101EC0600; Mon, 7 May 2018 18:35:28 +0200 (CEST) Date: Mon, 7 May 2018 18:35:26 +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 v5 4/6] x86/microcode/AMD: Check microcode container data in the late loader Message-ID: <20180507163526.GC733@pd.tnic> References: <8f204a953dc4b46477e214ebd291021d7ab6fa6c.1524515406.git.mail@maciej.szmigiero.name> <20180430090527.GC6509@pd.tnic> <20180501084317.GC31863@pd.tnic> <20180501200308.GC13171@pd.tnic> <9cf234e8-4d96-46f0-70e0-7d60d49671d8@maciej.szmigiero.name> <20180503100133.GB20023@pd.tnic> <756e5bd8-6cd8-5f28-6cab-c60396dc5de4@maciej.szmigiero.name> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <756e5bd8-6cd8-5f28-6cab-c60396dc5de4@maciej.szmigiero.name> 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 Fri, May 04, 2018 at 01:26:50AM +0200, Maciej S. Szmigiero wrote: > Here we return this variable, implicitly converting it into a > (signed) int. > Any value above INT_MAX will wrap around to a negative pseudo-error > code (which might not match any actual error number). If you want to widen the return type and do proper checking then have the function return int which denotes success (0) or negative on error and then return crnt_size through an u32 * arg. All this in a separate patch with properly explained situation in the commit message. Thx. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.