Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4096476ybg; Fri, 25 Oct 2019 13:16:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqyoogQl/oEO9jHJzaqy+fdYU3aTqWtepqWsZn0rd9v+VeNf1gwCs8+/gV0fTOQiaBEOmY+q X-Received: by 2002:a17:906:b347:: with SMTP id cd7mr5451568ejb.105.1572034566786; Fri, 25 Oct 2019 13:16:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572034566; cv=none; d=google.com; s=arc-20160816; b=OGv4coaEX4lrI0qolBYfgdDXo7OVT/JU5FcWNOPP/kZ9E1UllNHJG9R6pcj2RROQ3T rzvQEjah6Ok2F3b8IXtqVitJdj7qBNonHuoASbQxp+/GGFSjSkUwG0zGpKDWSTZ6nl87 8aNPrlwJuIPZec7s38U7LFYqQ61SAIl4yit6RzJxyhsl84ONW1SFzWaDZ3eDK5RYXNas CzmAkCayibrOul/atEq2u1P2AvjlXM/3dFP9RLxYqJv9J7TlqE26dwqEff/mm+OmJB8k Rk9TNsF4bvznSoKwoIiwHQ9GxnFmxPvnMODPF/sYgvGdcTWIl+JWgm3Y8vcqQxoppUnW VneQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:references:in-reply-to:organization:date:subject:cc:to :from; bh=w4AiEjmKXU8Vqtw2WM8CMmoI19ChS1LHO9gbn6soeik=; b=jDVc3Iux9Dvu0I9UX5S6RE8Sih+RtAA24R0vDJRN8F7lUP4BcMMRVIhStmeWw5o7X9 JLLz2RXhhvFK+A22GFtmkKRbW/ZlCeDT9R3SKzBSWHBlG7Z6a7AenvwSmcC00FmG7pr2 65lRHUBEu/zW2CCMPvIa9yR+oGI/UW3YgeyePou2sq+chM1MqByxY1e/qmYqnLtzPEDW NdmjFkLNSwi8R86KoscB6FeggXluZqgzU82a9yu2qnryegDXgUUIteQpBrWKj0Z1/DqX Qh9TEixpQZgS4oLj9Bzf28aDH3A97kdUgSrjt83A8hJ2m4LiZjGLsPYrV9Uhx9rMb7AX 98zg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id oq28si1779550ejb.358.2019.10.25.13.15.39; Fri, 25 Oct 2019 13:16:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-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-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394643AbfJYN2o (ORCPT + 99 others); Fri, 25 Oct 2019 09:28:44 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:7184 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726393AbfJYN2o (ORCPT ); Fri, 25 Oct 2019 09:28:44 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x9PDSTmN065137 for ; Fri, 25 Oct 2019 09:28:42 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2vv0s6k7px-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 25 Oct 2019 09:28:41 -0400 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 25 Oct 2019 14:28:34 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 25 Oct 2019 14:28:31 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x9PDSUR749152076 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 25 Oct 2019 13:28:30 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 75C05AE057; Fri, 25 Oct 2019 13:28:30 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 53399AE045; Fri, 25 Oct 2019 13:28:29 +0000 (GMT) Received: from localhost.localdomain (unknown [9.102.19.25]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 25 Oct 2019 13:28:29 +0000 (GMT) From: Chandan Rajendra To: Eric Biggers Cc: linux-ext4@vger.kernel.org, linux-fscrypt@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v2 0/2] ext4: support encryption with blocksize != PAGE_SIZE Date: Fri, 25 Oct 2019 19:00:29 +0530 Organization: IBM In-Reply-To: <20191023033312.361355-1-ebiggers@kernel.org> References: <20191023033312.361355-1-ebiggers@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-TM-AS-GCONF: 00 x-cbid: 19102513-0028-0000-0000-000003AF7A56 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19102513-0029-0000-0000-00002471B0B4 Message-Id: <17874972.D0pmjP8EC8@localhost.localdomain> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-10-25_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910250127 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wednesday, October 23, 2019 9:03 AM Eric Biggers wrote: > Hello, > > This patchset makes ext4 support encryption on filesystems where the > filesystem block size is not equal to PAGE_SIZE. This allows e.g. > PowerPC systems to use ext4 encryption. > > Most of the work for this was already done in prior kernel releases; now > the only part missing is decryption support in block_read_full_page(). > Chandan Rajendra has proposed a patchset "Consolidate FS read I/O > callbacks code" [1] to address this and do various other things like > make ext4 use mpage_readpages() again, and make ext4 and f2fs share more > code. But it doesn't seem to be going anywhere. > > Therefore, I propose we simply add decryption support to > block_read_full_page() for now. This is a fairly small change, and it > gets ext4 encryption with subpage-sized blocks working. > > Note: to keep things simple I'm just allocating the work object from the > bi_end_io function with GFP_ATOMIC. But if people think it's necessary, > it could be changed to use preallocation like the page-based read path. > > Tested with 'gce-xfstests -c ext4/encrypt_1k -g auto', using the new > "encrypt_1k" config I created. All tests pass except for those that > already fail or are excluded with the encrypt or 1k configs, and 2 tests > that try to create 1023-byte symlinks which fails since encrypted > symlinks are limited to blocksize-3 bytes. Also ran the dedicated > encryption tests using 'kvm-xfstests -c ext4/1k -g encrypt'; all pass, > including the on-disk ciphertext verification tests. I have tested this patchset on ppc64le with both 4k and 64k block size. There were no regressions. Hence, Tested-by: Chandan Rajendra -- chandan