Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1047324iob; Fri, 13 May 2022 21:00:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/lAz64bs/t5qULm9xV5eM1fEX+iTbfCT/0AlWXeZ5wUR0+doLCoTWsm7DuhDJF8qKV176 X-Received: by 2002:a5d:64ad:0:b0:20c:565d:ca19 with SMTP id m13-20020a5d64ad000000b0020c565dca19mr6062054wrp.634.1652500854943; Fri, 13 May 2022 21:00:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652500854; cv=none; d=google.com; s=arc-20160816; b=Ee4EiEewx5YQm/qHSjITyF31b6qmZCEOMDM9wXzAruO/MPdQGb18YwwhA73tbeq1dB IgwlnC8ZneKP3sl8qYXXsUYc5mte4LOJU6oRPmqXnmM/XMcxtUxnm7eaQBaQC9ikPA4A dN6bMPJLDIuPsQJ046/v1s+tZ/rOP4TzkcMwpES9QPZ/nr0NJrB5HA9j6NNbxpj3ivG3 nnp71pd72NGOd4H+96yYZo3DrMWOFMjbrPUlq1kW4NHSlIeOueGhMcoDzK0HYUjlZZcI QJl9gSwrkisEfCQIDjXF2rVSW55IWkcI9hopyO5sO2TumL3xPTipmZLYOHw0q8yPa8EL InQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=iuo7gXVWTj6TmRuI7XRm6SFteZRKqvV099wooRzLD/8=; b=g4SH6Nun89FLUVgWQdyOlC8rIz8VqEymJul/vLaQQwRIwH9oqgG49iBlMKMbME2P57 JxaoE8IDEptzEzRMXfO5j7yTyjTR4JEbhRfJpV+lOcBqyRuPdllGAozEu28IcLVGOqhC 3QuYdgcnMKube1Cv/A6BKn1pJuUxYF0WwT1j/JRFJNEKatPJFlEW9S6hp9MjjCh0syqf KoGkb97fFYJtqvVBPfu6CV5sxEGdYvrLm13XT8LRkzW4N7zB4i3tA1+69I0CMHJFaG29 ++vV0kn3Xt3/Ry5MQOw726i56m6oU/o+974cc2O9kEbS1DnrzxHS5Lf7mCWIp5YZqMSF kk0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=EYv5HC9L; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 13-20020a056000154d00b0020ad9b931aesi5390311wry.1054.2022.05.13.21.00.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 21:00:54 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=EYv5HC9L; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4EAD8317F09; Fri, 13 May 2022 17:32:10 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1383984AbiEMT4T (ORCPT + 99 others); Fri, 13 May 2022 15:56:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1383958AbiEMT4I (ORCPT ); Fri, 13 May 2022 15:56:08 -0400 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3568030F7F for ; Fri, 13 May 2022 12:56:07 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id y41so8541913pfw.12 for ; Fri, 13 May 2022 12:56:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=iuo7gXVWTj6TmRuI7XRm6SFteZRKqvV099wooRzLD/8=; b=EYv5HC9LkFEq/NZojuo2wu55KVQPtFmnGqq5cZz9W4Q0R08EZl97jy1wkAgbn6/UZu 6d1yVwUZsI09he4XDAjC0TqMYEeBQOBYB4+j5lHDvVRe8V9cA80k5qYPX46dDdJT3MGV w0VsAW0MBS7KyHTEMG7GhQK09vdoYuP1Tydz5AMnmWVs+h3A9qbwK/qRr5uZ59qN2rmt 3TN3F0OmnG7cZn5XZtSAlJrqOg6BcBw761xuv7IaWSV+Ae+9D8GZfVxTfztjn73WVEme hL2zubNUlhSZetS1sSxsXpVJ8b2q08rBF1QNllPPp0TCxJLRbPXESAdUwgIBJj/ROtvQ +nyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=iuo7gXVWTj6TmRuI7XRm6SFteZRKqvV099wooRzLD/8=; b=gCBQ0iZDy/KUnCVjWtKIOTDbEu6+sFUCTvyMiNjDQgdzwxdvXfssmDj2RaBJQP0bIE UHM7IifwVPALk+KaRqygeYhuG0+VcDIIg1edbJ5QYqhe3jYSVy0s5XBzgExaV8zM2LiO c0qhvqoPKhBP5RwPpMzZq/ZlBfLS22YtqoGF0xngMdQN65s3LpIqK8DEansANquqJvAh JqYvkFwmYuqapFAOpL+X+kskovnu/A9CLLJceeE8ZM6u1ptofroVQ6ow5UgDZpDztcLP MZhkwKgZIsSupvP4VQTjv3R83IqbLAU4Yf5yfUCAbDs2RTajoYJCmHUrWSqBaQMVjkmN Azog== X-Gm-Message-State: AOAM530yNKJljHix1jA1oyPqHw1D8TeouQwmzYPVZYKUHE0ZnhqFtZ2F /tghWrKW6aKVmvG1o5S2Jdcj9A== X-Received: by 2002:a63:1d26:0:b0:3c1:eb3f:9daf with SMTP id d38-20020a631d26000000b003c1eb3f9dafmr5220746pgd.284.1652471766565; Fri, 13 May 2022 12:56:06 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id x5-20020a63cc05000000b003dafd8f0760sm2011593pgf.28.2022.05.13.12.56.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 12:56:05 -0700 (PDT) Date: Fri, 13 May 2022 19:56:01 +0000 From: Sean Christopherson To: Ashish Kalra Cc: Peter Gonda , Ashish Kalra , Paolo Bonzini , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Joerg Roedel , "Lendacky, Thomas" , Borislav Petkov , the arch/x86 maintainers , kvm list , LKML , Andy Nguyen , David Rientjes , John Allen Subject: Re: [PATCH] KVM: SVM: Use kzalloc for sev ioctl interfaces to prevent kernel memory leak. Message-ID: References: <20220512202328.2453895-1-Ashish.Kalra@amd.com> <51219031-935d-8da4-7d8f-80073a79f794@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51219031-935d-8da4-7d8f-80073a79f794@amd.com> X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 13, 2022, Ashish Kalra wrote: > Hello Sean & Peter, > > Looking through other copy_to_user() calls: > > > > - "blob" in sev_ioctl_do_pek_csr() > > - "id_blob" in sev_ioctl_do_get_id2() > > - "pdh_blob" and "cert_blob" in sev_ioctl_do_pdh_export() > > These functions are part of the ccp driver and a fix for them has already > been sent upstream to linux-crypto@vger.kernel.org and > linux-kernel@vger.kernel.org: > > [PATCH] crypto: ccp - Use kzalloc for sev ioctl interfaces to prevent kernel > memory leak Ha, that's why I was getting a bit of deja vu. I saw that fly by and then got it confused with this patch.