Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp18658738ybl; Fri, 3 Jan 2020 06:38:27 -0800 (PST) X-Google-Smtp-Source: APXvYqyzP2D8eTOYhtJzSFbS5qr5WylQLSQZoNwEs1qZWar7pnBbIcpkCNGY5p6G8Q/laRVOAMCh X-Received: by 2002:a9d:7a97:: with SMTP id l23mr97306171otn.34.1578062307295; Fri, 03 Jan 2020 06:38:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578062307; cv=none; d=google.com; s=arc-20160816; b=zFrU98nT3tnGhEcjVBb6RFy6mxDwau4B6LVu+akfk151GHjgnM/6r9yHMq/rfG4Tnr G9Ty3UDJ2kz0XbqnYiQ9shEzTlSc5VTA4ojryRRR6SAkic3BV+LIbMlGyH93w9i5bncI RsWfbFbY9IhnqEXPVyH3Wd/mFCaSIpIdBl78Mkf2ML6grI6xhkHUKiCdGhba7aBTQ3vq JI0xMjFaprq4k45bC6O7PPOqRVS0dXChQjNg+PdKOheoDsF6GdSYLThpGwyMbcMRP3uZ U/FxQaAKGSLQOmbKb9kcOgdqzrpYLmyzh95qqI6e/haOwbEN7oIZdk7uKkThHgZoAnDO FPwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=vevwVm8lg+5OCh2+rEmRWvOe9hK3MNOQnmIUXBHghLg=; b=ZUEHGyR8oxKb4g2W/YbIwjOSWnPZDewQzFYgqyboDUzBwBiqn94pW5qUISj8gy/tBK ZM7a3LTNUBMGgx5/h+df32whqVm97zrmH8widXHCCrWExJOhFf8skeyTpRLmq3q4TN0s 1SmXgsSNZcG/dyS12ob53v7FfcjoUwXRyOpG44lp70R+Et6RgIkAAVz0xxt3+Ci404H1 9tFuhW22xsktiKfv5UJCaT0gyRe3l7S/YRdOS7hqxKfWeJLpHKHe/tLYQN8eLZSAaqaS awUc0Bi4q7ix+ztVLj0oTAa+n1xi82TwJDXEkQDxV16SvhufKs+pm+FEXrHo37qrAzMQ mBNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZP9G0htX; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-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 a14si24106835oid.58.2020.01.03.06.38.15; Fri, 03 Jan 2020 06:38:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-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=ZP9G0htX; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-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 S1727598AbgACOiM (ORCPT + 99 others); Fri, 3 Jan 2020 09:38:12 -0500 Received: from mail-qk1-f182.google.com ([209.85.222.182]:36189 "EHLO mail-qk1-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727527AbgACOiM (ORCPT ); Fri, 3 Jan 2020 09:38:12 -0500 Received: by mail-qk1-f182.google.com with SMTP id a203so34247788qkc.3 for ; Fri, 03 Jan 2020 06:38:12 -0800 (PST) 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; bh=vevwVm8lg+5OCh2+rEmRWvOe9hK3MNOQnmIUXBHghLg=; b=ZP9G0htX41CHYkVtUDLFI/G76FnynZzdNsZTM8KfAAfrXZhFueqV14qv/qc398wSS4 q0iLUWLsst5oLOASvpzqycBAoOAQez4yLnXe8ZlsV6+ws+1LbHQaohnB1ulU1SshD5B9 GLSQs6awJxX4kQO7hnMvXwhIl131+0eLOMESqSYqc77HSTLUlctPszo23ySoNEhxy45H 8xw0hRLpTn9ccqffR/fQowqFj1/o716vptRaS3RX5b0bs99r3eXPIbbydbPsvHRH7xR9 yxcgZO1Ds014i6rVOF5gl4t7mnfDQeVyWkGUw/JXjQ+VCSMP45vKY1JHGn0NB667dH+Z u7tA== 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; bh=vevwVm8lg+5OCh2+rEmRWvOe9hK3MNOQnmIUXBHghLg=; b=T2hGiYkRhoyrdOabAR1YXImWBftghCZILtT5nZzlMd6XilbbmPwOmnr/NXLca0mh5v kCQsjfCMlV8AMD33rhVg0bl3cYMjaJ4INBnTkLiK85zVOjt/QUp1CqbKEYcpUgFssMAp vjwdmz093p82+kUl8VuOTYWVxS9qpw5X4uskR6gVrTw5+/sACAcG14w8YYt0in+RNrms LnY+CkZUtX8bds9eOvLqhswwhROOi0NAMV3cYA9Zq3OTAUdvLGtSmOAH49Kmr0YGDRm8 F4ZUnZVg9/u0h2kib56OAjRtDQ/R/tWXVpCZ47lA5QvKFCPQlZCEo2mBJToOTVcngj2A L7xQ== X-Gm-Message-State: APjAAAX3P55P2IiQhdD46l8MF46mmICD3eFMBHd8BB88RtTW7IlC+EjD Z1+JTtSIl9WpzATOIXSMNKUEMczip4BEy61dDZ0= X-Received: by 2002:a05:620a:16bb:: with SMTP id s27mr74910529qkj.368.1578062291323; Fri, 03 Jan 2020 06:38:11 -0800 (PST) MIME-Version: 1.0 References: <20191220190218.28884-1-cotequeiroz@gmail.com> In-Reply-To: From: Eneas Queiroz Date: Fri, 3 Jan 2020 11:37:45 -0300 Message-ID: Subject: Re: QCE hw-crypto DMA issues To: Ard Biesheuvel Cc: "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" Content-Type: text/plain; charset="UTF-8" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, Jan 3, 2020 at 11:33 AM Ard Biesheuvel wrote: > > On Thu, 2 Jan 2020 at 22:09, Eneas Queiroz wrote: > >> > >> Non-cache coherent DMA involves cache invalidation on inbound data. So > >> if both the device and the CPU write to the same cacheline while the > >> buffer is mapped for DMA from device to memory, one of the updates > >> gets lost. > > > > > > Can you give me any pointers/examples of how I can make this work? > > > > You could have a look at commit ed527b13d800dd515a9e6c582f0a73eca65b2e1b Thanks, I'll check it out.