Received: by 2002:a25:d783:0:0:0:0:0 with SMTP id o125csp762186ybg; Thu, 19 Mar 2020 08:19:07 -0700 (PDT) X-Google-Smtp-Source: ADFU+vullEoBzWxLgdJtWy/BFMQDIsdKdoy3M1BvKCLFUWBshVs55vhsjfgfeBhnWOH4XAThAX5s X-Received: by 2002:a05:6830:1087:: with SMTP id y7mr2705294oto.342.1584631147321; Thu, 19 Mar 2020 08:19:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584631147; cv=none; d=google.com; s=arc-20160816; b=r6znWXCHwNicRs8DWzlpsTHDD273tq76g/gdgDfVUzHGqANMugGEGYrfb/9KW/0qyr iEqzScxNIeI28vJ2mKMJ4WiZ7o8brTkD32zlX8XDmdJ9em9s2Qn5+VluBZ1sgNKhoyS+ 2Fkrq7XY20IxKWddz9+tuAOIKKzVJnyto/1fa12RoVn+aIwxAj8H9GOQLc+jWXqG53AW 3hPpCQ2wUwwUm//BKgRxF1RlpoJPAiyyVNO8+1ZGO2hlHz4VSDyMAwR4mKenOUhYUOCt 2BSQ3rd7iQ7ywC78XJdA8RpuI1fkWhcyuC+OThlIpWRyMnB/K5DXMJFs3499OtvYNFhW u78w== 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=DaeWC4paZt+okt8puKvfMsZYLYpCKtr88Og+vqz2+d0=; b=Nkb/2h6WWV6cc8gp0svSEOGmFUSPJHdDVmsjSkt7cr8prguGfWoTuXmjx7e8k9Y6jF DFlbuUKa8vy1oEBqDHTVMkJL+rPqw3afDWzcP2oWU/YqxjGf+oJFB9TZh0bqp/tCsnXe Z+sgpZov7ttsTNH7F1VBl1U+xpP7zsIOmcntqfjoc3O3sRnPKNtq73pmm387kBy5kYDg ZGL70rzbe72O5PmktuNDnxm1XTA8V4wMl8n4M1z4M7dSP863faZrOq6SPZu/Xx/F8kGu 5qBFJNWSUgG7UjCqHJrsXt3va7y0xS04d5MgQ+g2ksE0yBrQU4BN/9m0nAbGfajGIS8h /3hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=r+RbF6Wl; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v130si1198344oib.115.2020.03.19.08.18.54; Thu, 19 Mar 2020 08:19:07 -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; dkim=pass header.i=@linaro.org header.s=google header.b=r+RbF6Wl; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727064AbgCSPSi (ORCPT + 99 others); Thu, 19 Mar 2020 11:18:38 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:34085 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727001AbgCSPSi (ORCPT ); Thu, 19 Mar 2020 11:18:38 -0400 Received: by mail-lj1-f196.google.com with SMTP id s13so2950191ljm.1 for ; Thu, 19 Mar 2020 08:18:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DaeWC4paZt+okt8puKvfMsZYLYpCKtr88Og+vqz2+d0=; b=r+RbF6Wl+QIWtN5XgXv6Wy2ndXU5gukf1+a7pWlNOs5UXvn7YdvBmyG7iFWF9CF4n4 vgfHfWQevvjEbPyyIS4sx0LC3EN1MjUwlF0qyHp7CCv2/hQP5Z9svKAN5/BVjjc+KWDZ /fzZtBSH8s8vEh6tIEXW181elPRKVfIZojEkMLhntKshIWE3NT18Zuyc7vQmkYGgA/Aa vZsJo7Zq9QZizRwSmR++Fe+dLqNFtNPcglCy3LBQr8z33Amddo3q87Qy8X0WaByIzVl6 JsOtm8s3XVSXU2xlr7YxNgQC7oYoSlO4NDtBevbRaVGZ6HpBYe8GNq1cwZ+b3dqDWRVx /CDQ== 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=DaeWC4paZt+okt8puKvfMsZYLYpCKtr88Og+vqz2+d0=; b=Ow+mEee1ZVlgy1M+9ydFSxV1d/YbwL8gqOfWSn3oh8fdlX0moXpsCSFWoaG5hsOX5v N8OX6Iao4CJRnEagwAop54UDh2aza+Tbzkz3iKaHG10w49/+Vo9Fr6VcDegzwWx8HdQt 1E2UtE4FfU6+zUxmRF/x1VpNeAxL9iE1FbYeuAtC7ZJhUt4qQMvQjl2LspnQRqd/wakc 0EWmZIX5LDFKC+IeD/ResJY99Q+VJXEGYxlljbE0JOo7PXtHdW+yLeo9iPlRqdR5Z0Z7 wPsJDEVys9hgMc4JUUlY5Ic1boGc0fhJlbfaur7BiBH2sYTQkj+0TEnURWizMjU88GAp 75OQ== X-Gm-Message-State: ANhLgQ3Nt0Oip0zrrPvVHyEq9R4We0DViorEz2ba1g3W9dqDsDVTQfZT 4mMwHVMutWuwV+CZzJUkuAZ9IjCAW+LwK9I/lqUuvg== X-Received: by 2002:a2e:9a90:: with SMTP id p16mr2538498lji.277.1584631116087; Thu, 19 Mar 2020 08:18:36 -0700 (PDT) MIME-Version: 1.0 References: <20200317113153.7945-1-linus.walleij@linaro.org> <88FAA4EA-7DAF-478F-8DFE-747FAF4CF818@dilger.ca> In-Reply-To: <88FAA4EA-7DAF-478F-8DFE-747FAF4CF818@dilger.ca> From: Linus Walleij Date: Thu, 19 Mar 2020 16:18:24 +0100 Message-ID: Subject: Re: [PATCH] ext4: Give 32bit personalities 32bit hashes To: Andreas Dilger Cc: "Theodore Ts'o" , linux-ext4 , Linux FS Devel , Linux API , QEMU Developers , Florian Weimer , Peter Maydell , Andy Lutomirski , stable Content-Type: text/plain; charset="UTF-8" Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue, Mar 17, 2020 at 11:29 PM Andreas Dilger wrote: > That said, I'd think it would be preferable for ease of use and > compatibility that applications didn't have to be modified > (e.g. have QEMU or glibc internally set PER_LINUX32 for this > process before the 32-bit syscall is called, given that it knows > whether it is emulating a 32-bit runtime or not). I think the plan is that QEMU set this, either directly when you run qemu-user or through the binfmt handler. https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.html IIUC the binfmt handler is invoked when you try to execute ELF so-and-so-for-arch-so-and-so when you are not that arch yourself. So that can set up this personality. Not that I know how the binfmt handler works, I am just assuming that thing is some program that can issue syscalls. It JustWorks for me after installing the QEMU packages... The problem still stands that userspace need to somehow inform kernelspace that 32bit is going on, and this was the best I could think of. Yours, Linus Walleij