Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp1001514lqt; Fri, 7 Jun 2024 05:31:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXSdNi9v++kaP7/r3sZrGRyG4JjrSiDobtAcEDkeQ3XAPBefe7zSGVdhD6t+OODgZkeTXXye7tNS/OLzSvdjP48AfBTgwqOtih4KSm4fg== X-Google-Smtp-Source: AGHT+IE1s0vPt89v1upC9fcYF3RnAPJzR+gXVPahUI+HSykFjtRzj/8SnaYrF1Ph7lrUfddaNT1q X-Received: by 2002:a05:6870:a9a8:b0:24c:ae40:ac40 with SMTP id 586e51a60fabf-254648cdbd4mr2553409fac.54.1717763476909; Fri, 07 Jun 2024 05:31:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717763476; cv=pass; d=google.com; s=arc-20160816; b=b8mKI5D+X83ruBvHhcnKkP9JsnerXjsz3nX1haeSsWehsy/iz/60fOZj5M0mY7TSgW oEg0DRtq0gnuhySiQyb/nfrnHKMDOQaa7nJI989SnEYRUNvMCqbMLFgXx7u8+PzluqAu 1Bwg4wP0/Kd4pJDCDGD6Br2Pt/6+FqRI8GC/TxeaGyGPkLXe1E7wHfOAEaXxMnVzXhvQ BfSg95pram0+q9Mnai3Qi/0ToTrh4TaxJbLFjAJwaAbK/ldNQ1/wVFAa5OwqRysAq94A 7cGaNEkuwOzzfPt+gV7s1MRLDF8VrA+2hC8Kndg5bn4jn0X2TXunlLkyR4QGIQYOtPqm WTjw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=i/vT53TWEjy08/r3RbLeFfTwbW4PNcgFRM/VPKY6Npg=; fh=7hCCohcQG+uQ8OUfmAWz5dQtTZqInsxzaZThrwWJ9Qw=; b=o8mkjx9HmJVUBMXB2QCqmrHREOAx+vX+ocXJkIC3HcbuCsjifPotBaSgEDBjpnQZyI grcF/aNbkg3Wi38XK7ZcNIz1heLeeyXDE6Ir8UrkyoEU9XQdBy84JJBjtrD0nnnkxSKn ZB+ls2lbEebfI04CfTLrHBG2jKtrZpYYYoKWbtjIk2bRb5tRuTSGccK/E1d3di+YU9Fj d+ZxVqRRykQhMGuDVNKRSEAKkHVad/jeMzg8pD7mPut3TpL6jGhnQZ6utlgysaTmP1H5 /YrvaRqDfGwt2Suh/6OSASLVXrXbZn2omBlRHP6vUiDwoo1+sgGnP8FTK0ax9LMasJV9 M7Dw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UWBvJyDd; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-206046-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206046-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-7953284dfabsi3243985a.63.2024.06.07.05.31.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 05:31:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-206046-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UWBvJyDd; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-206046-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206046-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 939FE1C20A56 for ; Fri, 7 Jun 2024 12:31:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 172F5198E9D; Fri, 7 Jun 2024 12:28:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="UWBvJyDd" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 F1B7B1990A7 for ; Fri, 7 Jun 2024 12:28:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717763323; cv=none; b=SBi2DGg2XQ65/rk3crAFsPzDtDkrXdSiB7ouU1YYb+espKkU+yGuvVaFbVVdgFwsxyO3t5NbM3oiUVPKQFTyxgeEVuzjTOSNuAZArc1qfvYNhsXZlZjG5NYwDha57qVp528XN9F0CFSJ3pEy/fPo9qKQqurJ5RJTo8fysKdNbpU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717763323; c=relaxed/simple; bh=MwVN8O06HSO/KA7ge+xMur7IGxhiQ1jj42Do/f1rh2c=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=g57otZa1abedKK+ffBIDqul8TX7vm2rr+MUwb8VCqK2tOX8zm2fpMQ48T3kyuNuNrQ8Tgdykiz1TLtLFM0pMxbSNbYgRayhPhNdAOBINY3SYtgylkcNE2PHXSCG2BZnPF1MQkgr4ioUglr6SHZmCSaoa1Qu9CNxszZdF+pq7EcY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=UWBvJyDd; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717763320; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=i/vT53TWEjy08/r3RbLeFfTwbW4PNcgFRM/VPKY6Npg=; b=UWBvJyDdXE22PDG4uYY8tc5R4Ix/3VFV/Kb0naYXyomDcWZi2QjpVAb658L9xqRCUWed5E PwdXt/TD4Z60B3hInxGyuh3J2bwa6TjYg4R5DRkuTzGTDtQrYVp3nVIoTt/HnDD+6WMbtP tKvWmqe3ZXNKLKviDivkFY9wShywfac= Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-271--K8hwcdgMNawMelTJXgkcA-1; Fri, 07 Jun 2024 08:28:39 -0400 X-MC-Unique: -K8hwcdgMNawMelTJXgkcA-1 Received: by mail-pg1-f198.google.com with SMTP id 41be03b00d2f7-6e53ddbbb1fso153953a12.0 for ; Fri, 07 Jun 2024 05:28:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717763318; x=1718368118; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=i/vT53TWEjy08/r3RbLeFfTwbW4PNcgFRM/VPKY6Npg=; b=fA4UolW5mCuu0OUV3IbfZ7HIif5lIOmXYVegHz9sy3aOYSrEfB9h5jUlnCcqGXiy/8 Jb74Ii1IjNz8E0me+4ksGRhPDyCXfCl1ej8qFSPDRWrBoaU4qW3d2LQ9n1RFDkJZrCJn iH2wRfg3sk+W2Thtl1RSEIuB2bk8rNUyxqnIh/m2N5HNXUKiUfh2VjG6B2vgS5trtCn0 mdkXV6Tw2vxAyBY7oAKKcEIsMA47D7KZj7vSJYSu0LBHuWwlYyABV6n29l5sb7DEK9rC pzAYyMK1Hm7KUlK/ExUya+v3oA8krTmeRUqpTTc3U0yW+dnAb11FNbw2C6GEuQGKPRe6 ax5w== X-Forwarded-Encrypted: i=1; AJvYcCW2gNlSECfU8HsUIVntSEteJOJwM6Jxq2Kb/xhcbxMcS//cpz9iAEW8b0JdmdvJatp7ERH44OQvPXFtSLd+OYNczo1dVY7zQ0LGdKkZ X-Gm-Message-State: AOJu0Yz0V16Kc5pCqoPqnT6CunMYVRUh5P8wIJY2EIuOC+Sqwit0ij7q eXGXSG14mcP7d//msmCHlw4wRarNZhCrPOgopY63tH9Y0bEfXQyDXk9dKPC6WGcOy4z7nMp4h7+ sQUVCs3reNVC8dCUzf6mmN7u1H0N1jsQy/TjOnjUtemACJVAUdeVFHvRr2RtwDA== X-Received: by 2002:a05:6a20:da84:b0:1a7:3b4a:3e8 with SMTP id adf61e73a8af0-1b2f968d8afmr2340416637.7.1717763318240; Fri, 07 Jun 2024 05:28:38 -0700 (PDT) X-Received: by 2002:a05:6a20:da84:b0:1a7:3b4a:3e8 with SMTP id adf61e73a8af0-1b2f968d8afmr2340379637.7.1717763317629; Fri, 07 Jun 2024 05:28:37 -0700 (PDT) Received: from localhost ([43.228.180.230]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f6bd7e42c0sm33015205ad.222.2024.06.07.05.28.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 05:28:37 -0700 (PDT) Date: Fri, 7 Jun 2024 20:27:37 +0800 From: Coiby Xu To: Baoquan He Cc: kexec@lists.infradead.org, Ondrej Kozina , Milan Broz , Thomas Staudt , Daniel P =?utf-8?B?LiBCZXJyYW5nw6k=?= , Kairui Song , Jan Pazdziora , Pingfan Liu , Dave Young , linux-kernel@vger.kernel.org, x86@kernel.org, Dave Hansen , Vitaly Kuznetsov , Vivek Goyal Subject: Re: [PATCH v4 5/7] crash_dump: retrieve dm crypt keys in kdump kernel Message-ID: <7fucfvhq74bzdhzowvso7re3c6c3bhtqj5trxe5gl3p7cgzgym@xz7wdxw3wojr> References: <20240523050451.788754-1-coxu@redhat.com> <20240523050451.788754-6-coxu@redhat.com> 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=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: On Fri, Jun 07, 2024 at 05:50:15PM +0800, Baoquan He wrote: >On 05/23/24 at 01:04pm, Coiby Xu wrote: >...... >> +ssize_t __weak dm_crypt_keys_read(char *buf, size_t count, u64 *ppos) >> +{ >> + struct kvec kvec = { .iov_base = buf, .iov_len = count }; >> + struct iov_iter iter; >> + >> + iov_iter_kvec(&iter, READ, &kvec, 1, count); >> + return read_from_oldmem(&iter, count, ppos, false); >Do we need create a x86 specific version to cope with the confidential >computing thing, e.g sme/tdx? Thanks for raising the concern! I'll test sme/tdx and will fix it in v6 if any issue is found. -- Best regards, Coiby