Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3808769ybi; Sun, 14 Jul 2019 22:44:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqyO06iTmvW3HX08vruuOLRQBEVBFTeGU5hVkLkUCpUHGzkL2MSb6GoE7l6yZ6Jcf8jkZsED X-Received: by 2002:a17:902:f216:: with SMTP id gn22mr25851925plb.118.1563169454708; Sun, 14 Jul 2019 22:44:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563169454; cv=none; d=google.com; s=arc-20160816; b=KgB2OwxEt3MaciYVn1rkpyv9zsEem8Fusblxhu/xfHtlFQvAJMkCO19Bd+CGZWyWOP +bbtgTJllvvdRJ39bqY91Zf+sMM2eDMVCD8fRKt/BwbMYzQjRUEh0oYeh7pZf3+/C9ex XeoogwaOULMMGDbatReaeN3+eUCz9yr7uhP7ObK8Inov3WXYh8eODjFbqDI6Km/Pmem4 DCef0P6yo7yXgF/Tw+1Wrlc68nKSZCuuFxf4o8FLH9KUazmSGA6qsYq77C0VahRiQB/V djeqQmxOuGYkjXy5SaNsiYd/uWbnwvwncmDvMeCxF/JOmFvQJAtNazNDq1umitqOgrAP SQtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=x1fTuAZhIfrlETbUSsP1dpVtOtalwzPUJBl71LNvF/I=; b=RBNYOm2DmiOCesMzJ8TlENbqlyAYDatDEVZl1nWvopolba6JP0qAAg60lV8TsPlG4w 0uN0X4sec6Zw1mERkIIV3iCc2p9+FqWN0Dhg3D6zpHi85+X7R8zjvIHRPjzdjL9Ji37Q XyejqKCaQyKUqNYq7ukd/SrlgYo1Jt3pGHCW4Y9pDWl4Ue3sJle7k2qbg/erFI2ceD53 49uE2oswZO95VLEKDAeUhv26b1Ou2/hVgZCq2vcRvVhK4PdufngcR1FnkQZ5e+lQTY9b kUOJN9I4Hz5lv3yZtbtHyjh03JJIJx333qUFI4kVaC3YAyn1lLJMC0efl1QcMdY6K1dI M6qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kuCj5ogP; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m19si16107220pgb.523.2019.07.14.22.43.55; Sun, 14 Jul 2019 22:44:14 -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=@gmail.com header.s=20161025 header.b=kuCj5ogP; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726748AbfGOFnf (ORCPT + 99 others); Mon, 15 Jul 2019 01:43:35 -0400 Received: from mail-yb1-f196.google.com ([209.85.219.196]:39002 "EHLO mail-yb1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725385AbfGOFnf (ORCPT ); Mon, 15 Jul 2019 01:43:35 -0400 Received: by mail-yb1-f196.google.com with SMTP id z128so2370973yba.6; Sun, 14 Jul 2019 22:43:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=x1fTuAZhIfrlETbUSsP1dpVtOtalwzPUJBl71LNvF/I=; b=kuCj5ogPMdv0UR/QbaMvt17fr1Kks7yEIQad2BJdVAokAZGlp1pIrgGLGzQdE0T1RV He4TDIBNF2P9i7c1V/dsB/e3IQveyT5EDel5NOC4W7KrSmfeqlqj6hkp7T2KAeplDFAE A/Ey/a40RVJy2pswyCyrxpPA6hUPt+ZRXoqg/v8a+5C15YZtMf9Niyg638/l0aneZsUV 8NqbReKDtdSyFKHPPXkLvAoe8VjQSr7oeTUH3hxoxVsn6Va/r+CZ3OLFdRA4Hv04sVEh /67D9sbCHe9uCbd9vvLLbgobLk+mhRSNo0VSMRzb70MGGgT7y6W+BUlhjVkbja4k4vyZ lzvA== 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:content-transfer-encoding; bh=x1fTuAZhIfrlETbUSsP1dpVtOtalwzPUJBl71LNvF/I=; b=kLsJixhDpK3lpb0ge9nEA+cNaXDLpnTVyqi5heSCk7ZoGsK8mZ/NwIR8Q2rv/Szxkg pIwN9gW5S/ITcjDci8L+82xaYlhw5nbDZHorottW6SWqyjnDFcirAQG8kzeJzgJrqE3j BrhVGk5Q4bv+O/UJyVMlbwPMIsn6PmyLDZXcMNtnqgw6a6GgR/DCjxJFG18LwsTtJ98t HtpxgDZCrBdNBXszjFyWKUUcPUzns7zx4O26EO20EvEmaOw6mqHXmS6TaTfUXhfZ63dQ oc8LKkQe94++e/uy276KLxqM7WDEcWPd4VgWdUGlvgqL7P2kRjqd3he7cmPCUaDxJ//a 0C1g== X-Gm-Message-State: APjAAAUtSS8vyg7Rv9ziYB2WcHOF9Xp9I/1vLSwBJCu1Etti2MoJABzT JiPuI9+Fg9WVy6hvEA/ZeQ/uc+7lPmbjc83MEnU= X-Received: by 2002:a25:d10c:: with SMTP id i12mr14015312ybg.395.1563169414192; Sun, 14 Jul 2019 22:43:34 -0700 (PDT) MIME-Version: 1.0 References: <20190715031723.6375-1-huangfq.daxian@gmail.com> <72c45b14-f0c0-9d1c-0953-eea70ce513a0@kernel.org> In-Reply-To: <72c45b14-f0c0-9d1c-0953-eea70ce513a0@kernel.org> From: Fuqian Huang Date: Mon, 15 Jul 2019 13:43:23 +0800 Message-ID: Subject: Re: [PATCH v3 04/24] dmaengine: qcom_hidma: Remove call to memset after dmam_alloc_coherent To: Sinan Kaya Cc: Andy Gross , David Brown , Vinod Koul , linux-arm Mailing List , linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org, Linux Kernel Mailing List , Robin Murphy , Christoph Hellwig Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sinan Kaya =E6=96=BC 2019=E5=B9=B47=E6=9C=8815=E6=97=A5= =E9=80=B1=E4=B8=80 =E4=B8=8B=E5=8D=8812:17=E5=AF=AB=E9=81=93=EF=BC=9A > > On 7/14/2019 11:17 PM, Fuqian Huang wrote: > > In commit 518a2f1925c3 > > ("dma-mapping: zero memory returned from dma_alloc_*"), > > dma_alloc_coherent has already zeroed the memory. > > So memset is not needed. > > > > Signed-off-by: Fuqian Huang > > I don't see SWIO or ARM64 IOMMU drivers getting impacted by > the mentioned change above (518a2f1925c3). > > How does this new behavior apply globally? > In the last version patch set, I referenced the commit af7ddd8a627c ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping") in the commit log. The merged commit mentions that "ensure dma_alloc_coherent returns zeroed memory to avoid kernel data leaks through userspace. We already did this for most common architectures, but this ensures we do it everywhere." dma_alloc_coherent has already zeroed the memory during allocation and the commit also deprecates dma_zalloc_coherent. Greg and other maintainer told me to use the actual commit rather than the merged commit. So I reference the commit that ensures the dma_alloc_coherent to returns zeroed memory every where. Maybe this belongs to the `most common achitectures` and is not impacted by the mentioned change. Should I rewrite the commit log? Just mention that dma_alloc_coherent has already zeroed the memory and not to reference the commit?