Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp474672ybg; Fri, 18 Oct 2019 02:43:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqx3lVA/OpUp5AKfrnBqgZepQIeysQaOjbi9O5C6xS7vTU4CI+xok4aDiB7znq8ob1Wf8+3T X-Received: by 2002:a17:906:1655:: with SMTP id n21mr7831238ejd.110.1571391800619; Fri, 18 Oct 2019 02:43:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571391800; cv=none; d=google.com; s=arc-20160816; b=wF5fru3WGgiGJK1jkWXVHG8v3LnqzsnARylv4uTbpjl51KdIOHHi7CsWHanQEGlGXM qOFPGj1HTmv3TfwN4oQJ2v179VJktYnz9eH1lfcsxqapkwBaYRpI8rXldX1k/S/Nic7H 0LFrl8+A8x/N1EA5iQjVEjlQELTz1DHezrZaJkj45EVkT+33EZH4vNhp5wTzFhuD4wch epbNPus6MyHBRIlUVeJ2KWz9KnBfnVPrmD3WHZixzXjxqYbHcBUQaYtsiCnU2HH2yQXb kNWO2IdDUCrUSkn5BE6wRexUM4tY0eW+44B2WhkW7tOb9p9wdgPgGuMLyPpMjY32nlzD QoFg== 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=fTyZzdwh6bGfUzpsk+8cR+7Gu0Yv85MLM8r2PCRvr90=; b=i3KP3tLkgOJ9iElxUCB5OwAn+4h4sVJWZrDGtCJ+qBiqOdCZSU0HJN4/TxmPkP+klQ kwTJ4FolgMkWSe4Oubaf9wtjMU+gw8mvb80fTJsz9AqHIe+kcSe1sAg4EPfHNL5QoO9E Ufs+oy18mc3j0z6usSUSkqfBgoL6gYwtzsM+sd2DbWOhuN7IRQQyqBNMxjWltwrEtOBY p0zux2oG38wmnKn+lCnQx/ZKVAYd5DxrISpQefNsYMevoJ/7X17i0T/JmGiwnqIA8KRg 6YdC4PKXAH1WyK8p+Bj5iB/fQKGY0sriH79IELg3zjMMuaDirhsXPlG+fIufKvxJ+IbS 6hGg== 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 se14si3129932ejb.322.2019.10.18.02.42.51; Fri, 18 Oct 2019 02:43:20 -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 S2404742AbfJQGNI (ORCPT + 99 others); Thu, 17 Oct 2019 02:13:08 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:24442 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2404664AbfJQGNI (ORCPT ); Thu, 17 Oct 2019 02:13:08 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x9H6CiFX058202 for ; Thu, 17 Oct 2019 02:13:06 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2vpfcy59jm-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 17 Oct 2019 02:13:06 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 17 Oct 2019 07:13:04 +0100 Received: from b06avi18626390.portsmouth.uk.ibm.com (9.149.26.192) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 17 Oct 2019 07:13:02 +0100 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x9H6CUCb19333460 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 17 Oct 2019 06:12:30 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D1FBDA4054; Thu, 17 Oct 2019 06:13:01 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B08D1A405F; Thu, 17 Oct 2019 06:13:00 +0000 (GMT) Received: from localhost.localdomain (unknown [9.199.50.5]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 17 Oct 2019 06:13:00 +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 0/2] ext4: support encryption with blocksize != PAGE_SIZE Date: Thu, 17 Oct 2019 11:44:58 +0530 Organization: IBM In-Reply-To: <20191016221142.298754-1-ebiggers@kernel.org> References: <20191016221142.298754-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: 19101706-0020-0000-0000-00000379CCE3 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19101706-0021-0000-0000-000021CFF40F Message-Id: <2830996.s4omRzobaj@localhost.localdomain> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-10-17_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 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-1910170051 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thursday, October 17, 2019 3:41 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. > > [1] https://lkml.kernel.org/linux-fsdevel/20190910155115.28550-1-chandan@linux.ibm.com/T/#u > Hi Eric, Thanks a lot for doing this. The changes seem to be good. I have started test runs on my ppc64le guest and I will reply with the test results once they complete. -- chandan