Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1956417lqb; Mon, 27 May 2024 03:17:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXBvCjlTwHIX0/BVpyYCqGh7wtQfU70Dy39GzxfHSSjrYXspV0ktURt9mzOEPvb+9MhKIA2Vkk5aS+V+ew6F3uCmhd+0Du/gMB0mqZFVg== X-Google-Smtp-Source: AGHT+IEpiDRbZvONFVc487z/Cn4b/96KV0LTPr8sFX/bKIwDUovmrH+4CeRJVSblqxCZtTIMeICP X-Received: by 2002:a05:6e02:18cb:b0:36a:ff3a:f135 with SMTP id e9e14a558f8ab-3737b2bcd63mr108789125ab.15.1716805056000; Mon, 27 May 2024 03:17:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716805055; cv=pass; d=google.com; s=arc-20160816; b=cHjZHgLxeUUriNc2L7NEERifPtObCnZx38HBxmUjLxiH5GJ8xlj1d7c9egfHSGddIm wlBOceq8aSsjKu9vXBsBfQSjuN9jD+I8reCh+5hMFZhEkbdt1wE0e3qEIxVGyTEU5GbK phTzZ6O3+w0qBfo9lY1SuKqA+trhZH4Zr9Kkgp2+pLu9QvmbQh+Jqs/Q9XtHfq4FlBEx FFq+HmcByZiCHovrhHeuhKMrQ118zZayxaKrwIXbkaS2mCJnwwqt/WOi68VECnUmIp4E Dxd6RU02URkYLHztFNKDOA2170s7DBp3PNiqnwhjvfWDFr2XRKTTn9tx9iOdJibXbAHi RF5Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:subject :references:in-reply-to:cc:to:from:dkim-signature; bh=6yDcJpPr0r8T0wzZ672+gWIb7iExK7jSwZsCsRqlHSo=; fh=d9bHwFW7GJjnqlvznBUSJIu5z0xEpUFYsZCaqTUn2v8=; b=N+ZyFtRTdJHsZwy0PAwtWozvEnvx8u1cXxLlCjmhZAsOSR0LRz+xUmJq1zZI+UbXie spFiqBjScyvLlF7ZcrKj2tplwJGA2XAC7yEcRL+7g3Wyno3AOmN1oJvpXpZU7YCL85ZP wns0rRruJU0+6L3U4QB6RvvlxtwazNZKv7RI2UC//DrMTZgY7eK5JBW3GqGGkEVj7f8E 9tVJCDKF8cHP6znlLdMVm4x1OXHgfj2gcgCaT4QtFNLirN25CjS+J0FTkFzAdEJTT9ML mUFoMCKpAqwbJnEv71u+91S0rz6Hy1zl5IUcRiiOtrsHalOR/oatHS8b6Q1+4/P2lZXw LVxQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FtwCiVIU; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-190412-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190412-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-68229ef9f38si5990519a12.726.2024.05.27.03.17.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 03:17:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190412-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FtwCiVIU; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-190412-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190412-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9D8A52808E7 for ; Mon, 27 May 2024 10:17:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 73CD013AD3D; Mon, 27 May 2024 10:17:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="FtwCiVIU" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8696427701; Mon, 27 May 2024 10:17:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716805045; cv=none; b=tDw0nUwb98JonxdfM2MF7iT8DMvoDPlGLKAElzby25ntmusF/1IbG/rH2+lrJUoPOJeQd4hNogrRHxxeFu5B/88H+FnoBhe2tY9Y1V6N0WPyBg7/M8+DwLPLoIKn37B4Ygwy83NGP/wu6ZsKhSHhXL0vsghF/cmI/eB6h8Yz7zA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716805045; c=relaxed/simple; bh=WGewnNRqrB4yIglI8RDMdjSqZ/L0q5XXfLeuc7tx7JM=; h=From:To:Cc:In-Reply-To:References:Subject:Message-Id:Date: MIME-Version:Content-Type; b=tDG7KH6YGDqBAJcosZj7uCnUnOilgE6UrU1q9g9SuJlWmPun0ZJg1dsXcz9McUsYKDegxSNlhVgqLtQPtpJTrUwsBLQvxbN6PZziYdP+6Oyi73BUjGG1j1QGXove1cojTylw+3BB7hz9GlPMaCOnobFnybO1lUFKSDOow0ckxyE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=FtwCiVIU; arc=none smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716805044; x=1748341044; h=from:to:cc:in-reply-to:references:subject:message-id: date:mime-version:content-transfer-encoding; bh=WGewnNRqrB4yIglI8RDMdjSqZ/L0q5XXfLeuc7tx7JM=; b=FtwCiVIUSdzTJP9nRgsMfSCFsDD8pdapJuBWxBpzqDMkTfoOypd7I+CN xWsUJcwGOzKhrpA3C2QQOlOQ/b+XmWqrxUcMZ36M/LEiDUHwiYmrMd7sL BLXefqd1+6MAv2nsgRvXMjsgwVskc3/JQF/DItohwtOOlyiNNE8VjQajM QpMTdKyLeURaTg1LsXYfL68f38hT3cJNbVHpG3mqzSru6oz4dFAzJTyCQ d6JhSNxkGkQk34TYL42QLSAlFmD4Wtn2o8juCMBwkz80xa6+r0qeICpKR gbynVQYgvGs3NdKbHio8ni6XU3NlWFocp13+IR1y51hHMH2EPDIonn475 g==; X-CSE-ConnectionGUID: V+DkMCOFT0i4uB61Y2j83A== X-CSE-MsgGUID: OXnn9jZUQ+CzbSiBfyeDMg== X-IronPort-AV: E=McAfee;i="6600,9927,11084"; a="16904483" X-IronPort-AV: E=Sophos;i="6.08,192,1712646000"; d="scan'208";a="16904483" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 03:15:26 -0700 X-CSE-ConnectionGUID: yR5bOMzmQwuKz7NGPJTijA== X-CSE-MsgGUID: c+ib9qCPSJqwUWeAW7+mTg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,192,1712646000"; d="scan'208";a="39118209" Received: from ijarvine-desk1.ger.corp.intel.com (HELO localhost) ([10.245.247.138]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 May 2024 03:15:23 -0700 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= To: markus.elfring@web.de, Thorsten Blum Cc: Shyam-sundar.S-k@amd.com, hdegoede@redhat.com, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org In-Reply-To: <20240527083628.210491-2-thorsten.blum@toblux.com> References: <50d10f0b-d108-4057-be9c-a90e2398e810@web.de> <20240527083628.210491-2-thorsten.blum@toblux.com> Subject: Re: [PATCH v2] platform/x86/amd/pmf: Use memdup_user() Message-Id: <171680491830.2175.13318371328377311135.b4-ty@linux.intel.com> Date: Mon, 27 May 2024 13:15:18 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.13.0 On Mon, 27 May 2024 10:36:29 +0200, Thorsten Blum wrote: > Switch to memdup_user() to overwrite the allocated memory only once > instead of initializing the allocated memory to zero with kzalloc() and > then immediately overwriting it with copy_from_user(). > > Fix the following Coccinelle/coccicheck warning reported by > memdup_user.cocci: > > [...] Thank you for your contribution, it has been applied to my local review-ilpo branch. Note it will show up in the public platform-drivers-x86/review-ilpo branch only once I've pushed my local branch there, which might take a while. The list of commits applied: [1/1] platform/x86/amd/pmf: Use memdup_user() commit: 46de513068f956b76d68d241a7ad6bc5576d2948 -- i.