Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4464781imm; Mon, 17 Sep 2018 14:33:07 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZTMm28MaBLLnUlLxMXjN72XoJZzvCL4yt7SSq0aP/nl6+6rTy5jfzHUP4w4IOMk5lyqmLL X-Received: by 2002:a63:9a42:: with SMTP id e2-v6mr25726338pgo.263.1537219987507; Mon, 17 Sep 2018 14:33:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537219987; cv=none; d=google.com; s=arc-20160816; b=IMhdRNQ1NUs9agSo5LfLH/wd/kBWAzPzUyXzR9UMOB51YgMN3ORK9MA4YifZOPWIco i/E3VVoQH10kFiSSQLo2pFu/z+JOAXhY89WaxBLpgLYyMWElVm5gvbGEDjAyCMV29Y3k z3yxI8JZFso6e4gE9k59Xewh+5gJPBTUoIOVRXhBvWs3e20QPBRqeTTyV+fQqwwtEpyK R9tjmsTJQwynQhVkvUbFvAkgAGMRDqtPHeen4ERZq8PyppgcEaqA92sqfYsHfuYc1NKo W5UoipwnTNbzQBCk/c5WPAp3zprJO7bnOawWsJnZ2Y3gluvxdI0OqozYA+jwCHWY8Kpr iKJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-id:mime-version :subject:cc:to:references:in-reply-to:from:organization; bh=3FuFtaYBYPLpYFna2R8iEGLsevyE1DLUjak17ivg3Ls=; b=iEUYy9vPOrNm/08m4D7m49RAum4yMw2vPbru3YgPITuoPQbXlibzJBp4BHtFskeXc/ zqqvQlZUUPTaB3kL5LMGboSx8wM0k37kXLEE6fm/XLG2nrez+8iypftaTl22mz2lC/Qq +FPco1H8Nclq1x9C6SFKMrHmDqHvK+PwBf4lCl9aZoftDjn3uqVegRgow++kq7UpjD/k OJqCm8RUUNbQ598acmuPpSZKfkPXxHLYmXL0+Y5H97fRAO8clpGmv8we26potpwo5HNH 03lqhfjTBO9mONhuFY3+Gt7FSHhlLyLfgMS/abuE83Bky4GrjgN3MqaBEWH2V1vpRlGw Jw0A== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u190-v6si16166596pgu.305.2018.09.17.14.32.51; Mon, 17 Sep 2018 14:33:07 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728532AbeIRDBy (ORCPT + 99 others); Mon, 17 Sep 2018 23:01:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55876 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727329AbeIRDBy (ORCPT ); Mon, 17 Sep 2018 23:01:54 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 420AF307D851; Mon, 17 Sep 2018 21:32:46 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-123-84.rdu2.redhat.com [10.10.123.84]) by smtp.corp.redhat.com (Postfix) with ESMTP id EF8471C95D; Mon, 17 Sep 2018 21:32:44 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <153685389564.14766.11306559824641824935.stgit@warthog.procyon.org.uk> <153685392942.14766.3347355712333618914.stgit@warthog.procyon.org.uk> <20180914041831.GY19965@ZenIV.linux.org.uk> To: Trond Myklebust Cc: dhowells@redhat.com, "viro@ZenIV.linux.org.uk" , "linux-kernel@vger.kernel.org" , "linux-afs@lists.infradead.org" , "linux-fsdevel@vger.kernel.org" Subject: Re: [PATCH 04/10] iov_iter: Add mapping and discard iterator types MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <5763.1537219964.1@warthog.procyon.org.uk> Date: Mon, 17 Sep 2018 22:32:44 +0100 Message-ID: <5764.1537219964@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Mon, 17 Sep 2018 21:32:46 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Trond Myklebust wrote: > Another question that is relevant for most networked filesystems > (including AFS, I believe), is how will you deal with encryption of the > data you are transmitting? Encrypting and decrypting in-place directly > in the page cache or in a userspace O_DIRECT mapped buffer might not be > the best and most secure option, so won't you find yourself wanting to > copy the data anyway? For kAFS, the interface between kAFS and AF_RXRPC takes an iterator. Currently, encryption is done in place on the sk_buffs inside AF_RXRPC, but the goal I have in mind is to use the crypto operation to replace the copy between sk_buff and buffer. This is tricky, however, as the encrypted payload contains metadata as well as data and on reception I have to read the metadata to find out how much data there actually is. David