Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp176767rwe; Fri, 26 Aug 2022 03:04:06 -0700 (PDT) X-Google-Smtp-Source: AA6agR5XG6ExtFs7vaSIOQjzVWgeBF6tN8eEFGnjAeWseD2EV/eib/n+L62KITldsSUcyJGZirJW X-Received: by 2002:a05:6a00:3497:b0:536:d6a8:6f62 with SMTP id cp23-20020a056a00349700b00536d6a86f62mr3272983pfb.79.1661508246649; Fri, 26 Aug 2022 03:04:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661508246; cv=none; d=google.com; s=arc-20160816; b=Ct9yDHAS70aOXFE1xET6Jx4t+hor2LNG9nX1MEfK1Bt0S5wWIIOo53Sg6yB+1LeE3V uXCcmvZVnAhuXzOvVKS4uHDcXWPGkVlPWuBd6KW74dZrtK+ZxkchBVHpLjf7rOxLv4F4 GYDOwc34fITsL7ZJdknwI5MXGayG91dkB6up1CftFujSwK9ylafrcmeZ4fBoa983oWQ0 Zufj/JjBbedPh9DHM6JJOcr62GdmcNm3caTI+ZyPvujfCQIfmhDLY2eT1Zl6VS1dEc+D LUywQLe7MnZYLihmGIGYuFt7kSppW0z1S7WTDOQV0HFVvUlrFzbEv8lyBso7OiawAa0n Ab3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=AGDutEFbWvH3Fhi92RQA5W7NJUK2Gzp4/DxM3KoCLZE=; b=HlMXmmts3y7Ri9Xa7XAf1j2hVAWc48jQmjZx4Q9C+UdoyzUQu8T+I89N5CIky860w3 0XqH3mDaaD8pxbMK4lL4VyCMiLVaEsrDdpIdyEGc7m67KqC7ACPnrgcERBZP+BLtKrSc oKVET901PLEXCs1zAEwg6b6UHk1+1dyscTs58OLptFgmA4o7c1l332tQjZk3BT8xOqQp iiGOC5sevcAIr7pmaMAk4Qvm9/JcAlaHNh6YkcJI3ecjAYHNXUQwkkH3fFTgkQVBU0MZ Pea1uVVTbP2UFrvPl2myqSK76spJKkxUl36onUnufT363gBCxZOCgWSQUEyTes3GJhLx ZXJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Xw+8eFb4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b5-20020a637145000000b0041cef24c312si1398015pgn.495.2022.08.26.03.03.55; Fri, 26 Aug 2022 03:04:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Xw+8eFb4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245361AbiHZJvB (ORCPT + 99 others); Fri, 26 Aug 2022 05:51:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244972AbiHZJu6 (ORCPT ); Fri, 26 Aug 2022 05:50:58 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A96E9D4C for ; Fri, 26 Aug 2022 02:50:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661507457; x=1693043457; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=FyBesxBopP4WUfvr9s3m3ayI6JGta6ovjzfVKeQey/k=; b=Xw+8eFb4Mea5wTGwKUiBXjn744PlhBFiPLz7tX0DwyF3EHR4uYma7qkp +iIchvp4dUOSafZ8/T2vZDphzAEE/IfVh+SRPVBWqJYReeWeslIGGSRba 1m51n3ze6slXiYMvdczGXoVszN8GcfUT+BcGWhtBekit2dlCFBBVYtz2V qSspZHKHbfjAf1qMSMbF69rEmAWSfM218offUZYCvR2tRxNLUi4x8w26G fAnFrVMcs/5IvZklNWdvB+qWaDihLmd4uG9Dm+KCiB8aFc5Mz/Uxn163N rfR0dwFmFTUNhsxSXy5gqYdumig4a67lQZxMXxw/0rBttZ7OSzPh0k7ZA w==; X-IronPort-AV: E=McAfee;i="6500,9779,10450"; a="358436497" X-IronPort-AV: E=Sophos;i="5.93,265,1654585200"; d="scan'208";a="358436497" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Aug 2022 02:50:57 -0700 X-IronPort-AV: E=Sophos;i="5.93,265,1654585200"; d="scan'208";a="671399096" Received: from spr.sh.intel.com ([10.239.53.122]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Aug 2022 02:50:55 -0700 From: Chao Gao To: linux-kernel@vger.kernel.org, iommu@lists.linux.dev Cc: hch@infradead.org, m.szyprowski@samsung.com, robin.murphy@arm.com, Chao Gao Subject: [PATCH] swiotlb: fix a typo Date: Fri, 26 Aug 2022 17:50:46 +0800 Message-Id: <20220826095046.880626-1-chao.gao@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 "overwirte" isn't a word. It should be "overwrite". Signed-off-by: Chao Gao --- BTW, I am wondering if copying the original buffer to the tlb buffer unconditionally will leak the original buffer to the VMM, especially when VMM isn't trusted e.g., by confidential VMs. Would it be better to zero the tlb buffer for dir == DMA_FROM_DEVICE? kernel/dma/swiotlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c index c5a9190b218f..f67e5f50ee3c 100644 --- a/kernel/dma/swiotlb.c +++ b/kernel/dma/swiotlb.c @@ -765,7 +765,7 @@ phys_addr_t swiotlb_tbl_map_single(struct device *dev, phys_addr_t orig_addr, /* * When dir == DMA_FROM_DEVICE we could omit the copy from the orig * to the tlb buffer, if we knew for sure the device will - * overwirte the entire current content. But we don't. Thus + * overwrite the entire current content. But we don't. Thus * unconditional bounce may prevent leaking swiotlb content (i.e. * kernel memory) to user-space. */ -- 2.25.1