Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4028105ybi; Mon, 15 Jul 2019 02:45:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqzSy+9mTtEnYMtMPkL2m5UqZSDwQuqqO8QHkWGVsJ8ng4khAoBnYCZ86QJCPYbpDzR9wWQz X-Received: by 2002:a17:90a:8a0b:: with SMTP id w11mr28063547pjn.125.1563183900031; Mon, 15 Jul 2019 02:45:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563183900; cv=none; d=google.com; s=arc-20160816; b=Gn9PRL4k/7d4B94xvpHcWiMJIxqQ0DJ7ATE2q8Cq7RKzMoGJIqoxKH1VksS3h235vj ygz2wtOtuBOaJXY+dogkkHS5oxKOcaqYlA2xrwIvAfax4tgD2p+f5IvisPd1b3RrFiFv cobwo6UHy1scdp8hp1YnXVWrGuyq82qdLnPJQtonEwvX5qaIWWNN9rf1zFEHjQlUgZWB NxlUC6XGOAd+6QYINptTJAalRxVTA1BYILSJaorZ6w2xGtjmO22GSOR6kAr6tudqP5nO MNIx2QQsmz+MwJwo4OJ2L0CmAPjxGo4xxd4Yefs9AwaORFJejlAo9NKMI/9S4kgh4r1t zLDw== 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=fZZ8WVXuOszSeHc/0c/yAH4kX+d3pVHoqUHa9dvC8uU=; b=jXQ3G4XNQl7a9nL3CFl3jQ5A6P3qY9r4DVaArdeiRhghjo9uPR2abcnr/3Y1W41tLd vGtkswHC/N+bqnHnr6qWwgxavKf/K9goUA6317VNSSAaeVLCGOuEVZ6PYPc63iu0BprW 42U5Dj63KuA61voJvQcRgBt+j5zOZu4QpocarUYpglGHA1Hovzg1FXu/syEXn68hkvcs UA0w2YkIQDHdmhUmsEu8G8qdamBnPq0kwf9jPZyT8hWxxL3AnzwNuWGDcEpHnqUoBzAE Frtz4mC0vjzC/f8A/uk9nUHE2rK/28meRakQoMGaoW59k7itn1Gpgvt30LY6wHWji/FK 45Ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jPvQXZv+; 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 123si15903193pgb.374.2019.07.15.02.44.44; Mon, 15 Jul 2019 02:45:00 -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=jPvQXZv+; 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 S1729591AbfGOJn6 (ORCPT + 99 others); Mon, 15 Jul 2019 05:43:58 -0400 Received: from mail-yb1-f195.google.com ([209.85.219.195]:43744 "EHLO mail-yb1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729413AbfGOJn5 (ORCPT ); Mon, 15 Jul 2019 05:43:57 -0400 Received: by mail-yb1-f195.google.com with SMTP id y123so2908108yby.10; Mon, 15 Jul 2019 02:43:57 -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=fZZ8WVXuOszSeHc/0c/yAH4kX+d3pVHoqUHa9dvC8uU=; b=jPvQXZv+IvQvIOKDrE/1UTf4R3924nDi08kyG+WIj5baR4Tyt2FssXg65QToV335fR C3pQAHW0mt0y+pH4H5pHFNVigxkFaRpqcNAB3MLhLG5q2s+P4LyJ1aghN9dZyKbU8nLb +tDtSYrr0f8gdVeeIZpi09EmIyOIO0Q9X2MLV9gyJ1Q1Q1S5b8+YZVTEsmFL1iodhvC1 vwusUno/4/rnjI4P48FdcE7GU2ufn+LjRZS9nxF32RlChRWlIdguzVsFOzZhaO2rojUJ xs1OnFebwIGoS6WFFiJQOVVdiD8lOq9z7qVhJUduZWLJUr9XeHSFuxdMZ1O0A5LWtLQr z1SA== 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=fZZ8WVXuOszSeHc/0c/yAH4kX+d3pVHoqUHa9dvC8uU=; b=pyO1WtDMeOlW6MvJToipU1cSmqRLvA/KfO4rN+/t9pKlQBlHZZTzTxJjrMQcRx01ZS sV7Vi4uwhKMgh454ATP9hhY931GTSAA1Ms3MDXCLpEYW+I/Pv/ItZeCD1EYmp8Jk8mPq dA8831Nm2gn5WSHuwknXMXTUjFIuE/YYh6ajWswHFUMxy7+Djj3we+ifCeYrxmSyNPel kgi56hvzfpcCuBMQqD47m4NsFr+eKn8YJC483TC/8PquBU4mm8jy7gw1YglYrU1dTIef IFBVOLQSNmv0Ez+BayTXN5JUjrcUf3tfiJg7lB4OAy/mNBF0vgLATYaLVgo7Qjsem/1k AGxQ== X-Gm-Message-State: APjAAAWAuLn9r75DqyxHzo3Pb35hYWP6DYwEAdj/3wpEd1RnUtDCLzdk 8e2qOkyRfJISphl3SKFe3X304AoPtB0x7bnpy5leD/3IJk8= X-Received: by 2002:a25:768f:: with SMTP id r137mr15582022ybc.8.1563183836782; Mon, 15 Jul 2019 02:43:56 -0700 (PDT) MIME-Version: 1.0 References: <20190715031851.6890-1-huangfq.daxian@gmail.com> <37046e7b-fdde-c10f-4850-0b3efd4a00cd@samsung.com> In-Reply-To: <37046e7b-fdde-c10f-4850-0b3efd4a00cd@samsung.com> From: Fuqian Huang Date: Mon, 15 Jul 2019 17:43:45 +0800 Message-ID: Subject: Re: [PATCH v3 15/24] media: exynos4-is: Remove call to memset after dma_alloc_coherent To: Sylwester Nawrocki Cc: Kyungmin Park , Mauro Carvalho Chehab , Kukjin Kim , Krzysztof Kozlowski , linux-media@vger.kernel.org, linux-arm Mailing List , linux-samsung-soc@vger.kernel.org, Linux Kernel Mailing List 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 Sylwester Nawrocki =E6=96=BC 2019=E5=B9=B47=E6=9C= =8815=E6=97=A5=E9=80=B1=E4=B8=80 =E4=B8=8B=E5=8D=885:00=E5=AF=AB=E9=81=93= =EF=BC=9A > > On 7/15/19 05:18, 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 > > I can't see any changes in the above mentioned commit that would > make dma_alloc_coherent() (arm_coherent_dma_alloc()) zeroing its > returned memory. Maybe you need to add a reference to some other > instead? > 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?