Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4360183ybb; Mon, 23 Mar 2020 19:35:09 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtjUTvmb9crh3cTOwM6bf6uHtjzTPo/AD5C7ztza9QAVNCGoFfOPPGqTV34niNwbXiHeuzY X-Received: by 2002:aca:4710:: with SMTP id u16mr1756663oia.108.1585017309305; Mon, 23 Mar 2020 19:35:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585017309; cv=none; d=google.com; s=arc-20160816; b=BBc+PXOJMYLumOozc+xqmSnY5NX1TnIHUxXKvKUXYUQ3d3edAh0DVaQi0vsyamwNP2 BQmUOsDafS3zDFB0NLgovXRvjk1gK0py+DiVvF0grIx/ijh4vSjL0RoQTDl/N2WEA7AH CgoCAfXlFaq2He0Vd99tywHnZ7A9aqLBU5Ij4HTEp+uxXjFnTxm9gRfP47KYZzpPff2w tBnDmEQple44OQqdjrcfUfvGvfqAnWY/snD+gccUeNc5+8+yTmc/TLkCKxYZxBqMvaNK VrohvmIva/5R3JVM8IjAo3S3gaYCzA6bKd1ZrYnUiwKNSbqLsCkUgZjQBg7hoa1jL0/1 0PCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=fBf8kvnJW3FZhOHwmb/sVTU2m+DzUjEKuhMe/JQwh7M=; b=AtlzWZ0AJTKx/0ktlfzO3ZvHUbpInu35UUIHX9QDHH+oHdtEukFX4qw2t+3hDN479n /uMc9DUy9jJAV4kZTHMBL4fE/AYpzFWBKLnX3Gb7mX/09ZKQXzw2WoJ6jZr+nuas1FUJ mj7w+HsTL5mLQOLoUhAJtjE/237ZdH3lm4T2ESUPo55s/6FMkho7rkP46t5HhFvJbYCI 4zOAmx+ZpAIXp1LjhEhRer0LtKnPCuD+06TN+07pgAp1oFsD2598mdOAUsEneDfY3Veo g9ObmdGi3PgoHwoABkVgXT/ndB594pyfKGmyP41F/f5jNtUQl02W0FRgBCDqIzW167Ac QGGA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q2si3093091otg.211.2020.03.23.19.34.51; Mon, 23 Mar 2020 19:35:09 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727060AbgCXCes (ORCPT + 99 others); Mon, 23 Mar 2020 22:34:48 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:33372 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726824AbgCXCer (ORCPT ); Mon, 23 Mar 2020 22:34:47 -0400 Received: from callcc.thunk.org (pool-72-93-95-157.bstnma.fios.verizon.net [72.93.95.157]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 02O2YVaA028612 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 Mar 2020 22:34:32 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 3DEAA420EBA; Mon, 23 Mar 2020 22:34:31 -0400 (EDT) Date: Mon, 23 Mar 2020 22:34:31 -0400 From: "Theodore Y. Ts'o" To: Linus Walleij Cc: Peter Maydell , "Suzuki K. Poulose" , Andreas Dilger , Ext4 Developers List , linux-fsdevel , Linux API , QEMU Developers , Florian Weimer , Andy Lutomirski , stable Subject: Re: [PATCH] ext4: Give 32bit personalities 32bit hashes Message-ID: <20200324023431.GD53396@mit.edu> References: <20200317113153.7945-1-linus.walleij@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Mar 19, 2020 at 11:23:33PM +0100, Linus Walleij wrote: > OK I guess we can at least take this opportunity to add > some kerneldoc to the include file. > > > As a concrete example, should "give me 32-bit semantics > > via PER_LINUX32" mean "mmap should always return addresses > > within 4GB" ? That would seem like it would make sense -- > > Incidentally that thing in particular has its own personality > flag (personalities are additive, it's a bit schizophrenic) > so PER_LINUX_32BIT is defined as: > PER_LINUX_32BIT = 0x0000 | ADDR_LIMIT_32BIT, > and that is specifically for limiting the address space to > 32bit. > > There is also PER_LINUX32_3GB for a 3GB lowmem > limit. > > Since the personality is kind of additive, if > we want a flag *specifically* for indicating that we want > 32bit hashes from the file system, there are bits left so we > can provide that. > > Is this what we want to do? I just think we shouldn't > decide on that lightly as we will be using up personality > bug bits, but sometimes you have to use them. I've been looking at the personality bug bits more detailed, and it looks... messy. Do we pick a new personality, or do we grab another unique flag? Another possibility, which would be messier for qemu, would be use a flag set via fcntl. That would require qemu from noticing when the guest is calling open, openat, or openat2, and then inserting a fcntl system call to set the 32-bit readdir mode. That's cleaner from the kernel interface complexity perspective, but it's messier for qemu. - Ted