Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751909AbdIMShT (ORCPT ); Wed, 13 Sep 2017 14:37:19 -0400 Received: from mx2.suse.de ([195.135.220.15]:41776 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751148AbdIMShS (ORCPT ); Wed, 13 Sep 2017 14:37:18 -0400 Date: Wed, 13 Sep 2017 20:37:01 +0200 From: Borislav Petkov To: Brijesh Singh Cc: linux-kernel@vger.kernel.org, x86@kernel.org, kvm@vger.kernel.org, Thomas Gleixner , Joerg Roedel , "Michael S . Tsirkin" , Paolo Bonzini , =?utf-8?B?XCJSYWRpbSBLcsSNbcOhxZlcIg==?= , Tom Lendacky Subject: Re: [RFC Part2 PATCH v3 15/26] KVM: SVM: Add support for SEV LAUNCH_START command Message-ID: <20170913183701.2gxm4d4gngp4vgd2@pd.tnic> References: <20170724200303.12197-1-brijesh.singh@amd.com> <20170724200303.12197-16-brijesh.singh@amd.com> <20170913172510.azjkur3wsvat32aq@pd.tnic> <23c14fd9-f935-3bcd-412c-49889a94134a@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <23c14fd9-f935-3bcd-412c-49889a94134a@amd.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 455 Lines: 13 On Wed, Sep 13, 2017 at 01:23:08PM -0500, Brijesh Singh wrote: > Yes, I will add some upper bound check on the length field and add the > sanity-check just after copying the parameters from userspace Also, you could either fail the command if some of the reserved fields are set - picky - or zero them out - less picky :) -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --