From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BAE48C4332B for ; Thu, 19 Mar 2020 15:18:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8FC9A2072D for ; Thu, 19 Mar 2020 15:18:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="r+RbF6Wl" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726912AbgCSPSi (ORCPT ); Thu, 19 Mar 2020 11:18:38 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:37908 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727178AbgCSPSh (ORCPT ); Thu, 19 Mar 2020 11:18:37 -0400 Received: by mail-lj1-f193.google.com with SMTP id w1so2924266ljh.5 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=E7KV2mYIfhvindGw7OG7jnC9megLnwTRdzepN+KevOtGDh4CrVixHWo3hKWOiB5VEr DUIQWbOKCwt5gk52UsEVmHVD/C76FwIaFUMttz54cQHZbKkNv1aSQHG4r6O4J6HX0dj6 QV4x3OcVAG2bAj5HSl/fukpB1MW3tUMqRvWXT8fUd/hYE1ZIkTw07l7ZkJrst3/0a8m2 Lyg7Gy58y3Ftd6rO4qpAFYP7dR8ALCRLP7GtK4JYY/Yxj2pdVLxooR3uVGrXJ0mV5EKZ al/MA2FGNnMtLVYl/q71ORG0/ESnlkjl3osIR/jR8x9bG84oocGbjfpbgbj58exrfsYX ZruA== X-Gm-Message-State: ANhLgQ0Bm0UgAQ85qRV12YVIXFP6rhz1Pf98TqyLiGGEOK6pB4MTpuQf JaFK6SniqvDBswnyXYN9Wfr6Yq38O1g4+6Y7DQDKcA== X-Google-Smtp-Source: ADFU+vvPeA7ClISh6i31iBhj6nefmh3Eg2iEFzmPH9zvoxRoXYDbUZ5mYl74GCE7OJXyqnP17DOPXATaVBvt+m4FxYI= 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-api-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-api@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