Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3175230ybd; Mon, 24 Jun 2019 21:00:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwpiNhhF6wRFlMIpVAOiKq6v8bxi2WZTQuQ4P8+G49//ZnfrtI+8oDguy+nBGpy+uw1oV7H X-Received: by 2002:a63:6a47:: with SMTP id f68mr35900799pgc.230.1561435249543; Mon, 24 Jun 2019 21:00:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561435249; cv=none; d=google.com; s=arc-20160816; b=JnR8dRGJntSGAW5nsJxVccAZ8IwpuZ3hSywYTox53kNijrJ+H8JpaMcTyTuYPPSeFT nNKXsa1MZKBW8fIOUo8NYFhYNitBCctXfVlbITHa0Ot1ZBAj4pw7wPmSxhzTlJnXxjHC DlLdCKpG/PBfGFrEJxWPY7ztFV/i5dAFwLrRFw3+ZJTs4OeIWbcr0p7yh5dBt5KLdw4s c1XNUcm4kzAOWnr876iqnkBvCW5Iqhq1dnURQdYdoQDfYc3vs4Pd2c/FxE4UzCJky6IL rTeE+vmaTk6w1cfa/UGRzGUkwa7wNJSPn73U0n6Xtqz3+ETY86jn274FSh2Bwm4RRiw0 01dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=WJB0CFLYwTIUULDoeP21WrS2Yg7QC8IxRDJ2iUsn4AI=; b=Fs4CzkLxbOD69+T2FpVh065YJivRKHamt22ZAaZPeVjUFafkrgPPMmtrihQtKD8qLA GVSDR8LwbWS6qmkxX8/4r6VTt0hImKMacSswWb1EDu0sqNHCFmjnKXdc7j/alFKl41Jp 0bjJLot800tIfXf7xPPgCI6+mHaTvxAPgpH9rBkRXXhk5KQHKWiu4mWNBPtZfYg8Rkmd rdoJ5Dkgxp7rJghLSm2BWNNYjb3Gx137jtQ9k/lIPgWe3Vj7zfYFpeI27H5Fv1Ky8YSt 3zYC+TgU4TWXjNNbUT7ng/vnqUwFbIr5bvfiXRFn+JDtp5nc6yY5tX8sOdhO+Lv0pMPG tLzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=pP5EQZ+o; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m3si2707796pgq.148.2019.06.24.21.00.33; Mon, 24 Jun 2019 21:00:49 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=pP5EQZ+o; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728874AbfFXX4z (ORCPT + 99 others); Mon, 24 Jun 2019 19:56:55 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:45213 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728671AbfFXX4y (ORCPT ); Mon, 24 Jun 2019 19:56:54 -0400 Received: by mail-ed1-f67.google.com with SMTP id a14so24183829edv.12 for ; Mon, 24 Jun 2019 16:56:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WJB0CFLYwTIUULDoeP21WrS2Yg7QC8IxRDJ2iUsn4AI=; b=pP5EQZ+oW3XstA7p2mr1uQyDkp74c9m7haJVL5BKgdFCQdkM4v1CZeppMNpJEWD4zw 5e4MyNVL/PmaHVGuOZEDUZDUJ2V56e2iePORcy4BKQC/yQzVzTErTBstR3Fl6iI3yTsQ Ro1vvAdspGw9Uwg603Al1dRYMoE3fUma8YJ7iIiQwPCPnBIh94DuyGlWBmp9LKWUiN4H 0eQk9/r5FeHZE4x+58qTbcyCoQ/WD0fkrUmGwiUj6wHakQQ3aGf8vaDbUiMFAN28J6bL iXCbtEYXZgQXWMe67RM92ZqTb44sSKxVGiggZQe9lzhdEH2ITcXxPixLXYJW3S0vbzD1 Q6eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WJB0CFLYwTIUULDoeP21WrS2Yg7QC8IxRDJ2iUsn4AI=; b=HRitBnQhioN0qPh2NRRUj10TAJq1/ddru5LFD3YNm5KFGYI1vajOfv7XrBeA0mMBVm XVQA2Ey1fER//xxJoewHTGlItQm+waIF6iqP4PhIgc4bjcGe40LXW0h2SWuyZAlmGBeY pTGnawS87rtQb+XfTe3xFmm2Q7oGoXDjs83FSiy9U2hT154MRr08sqWRNMYEXipd6Mt1 bsmH4AQZBsnwU3+xwcCh79ltA9hcw1MQelwcdEWUIFPvgmlqBc0jKzbzsqM93wJol0VC ReDniBd0qxbdkj2ht32Pb5F9nF3jtuBQD6DepRLcGPWX8n8DycBopJCnVr+T9F+qnRJr UPRw== X-Gm-Message-State: APjAAAVi1Rho5FijWFnHZr/AADKx/5E1lE1BcjQNB+fwaAwdmRyFPG84 xcILYLMrda4gQtLMF50aIVjpw5i4xYuU8xKK0aSBiQ== X-Received: by 2002:a17:906:470a:: with SMTP id y10mr76707823ejq.115.1561420612583; Mon, 24 Jun 2019 16:56:52 -0700 (PDT) MIME-Version: 1.0 References: <877e9g9lpu.fsf@firstfloor.org> In-Reply-To: <877e9g9lpu.fsf@firstfloor.org> From: Eric Hankland Date: Mon, 24 Jun 2019 16:56:41 -0700 Message-ID: Subject: Re: [PATCH v1] KVM: x86: PMU Whitelist To: Andi Kleen Cc: linux-kernel@vger.kernel.org, linux-kvm@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Consider what happens when tmp.num_events is large enough to wrap size. > I suspect that's a kernel exploit as written. Thanks for pointing this out - I'll fix it in the next iteration. > Also don't you need to copy tmp to new? Yep - somehow I accidentally deleted the lines that did this before I sent out the patch. I'll also fix this.