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=-5.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 21FB8C56202 for ; Tue, 17 Nov 2020 23:39:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D58E124248 for ; Tue, 17 Nov 2020 23:39:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="OBJfkgzQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728952AbgKQXi4 (ORCPT ); Tue, 17 Nov 2020 18:38:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725943AbgKQXiz (ORCPT ); Tue, 17 Nov 2020 18:38:55 -0500 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10AB8C0613CF for ; Tue, 17 Nov 2020 15:38:54 -0800 (PST) Received: by mail-lf1-x142.google.com with SMTP id z21so257418lfe.12 for ; Tue, 17 Nov 2020 15:38:53 -0800 (PST) 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=PgbGhxXCXE3uvLAMGWkjJK4WmB/v6iS8EBQqNl2pLPI=; b=OBJfkgzQBj9kHYb1L6tM3RsVNEtxEjS8ET0Oh9YK0275YFj9QadFCAwWSCozN1QtCo +8Zz4vWkjpcxgMUMVDIsC7IboLPaOi0ADF1TZADraVsZmRwj/NsiImqyAR/KgSYJNR8X ueDXr5NVFB/NX7+PUdIQbuXJ0/Xn1IKQaTgwH0JlwVPOQ4U7BNCy8dygFfyfSFbzvMPj KNBOrDZJk2o+gWAICmNIT3BDdwL6xbmjbK4mnEg0HnMpBfrKjfO9/sARAlJuRLBusV0N +r735iTU1GwDxFrw8cviIxYPtfyPzaG3pqHLpRgNqOVbnYc1FdyiqF3KfAPDV2bJ3VxT v8JA== 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=PgbGhxXCXE3uvLAMGWkjJK4WmB/v6iS8EBQqNl2pLPI=; b=M4wg3PHtng8bKN9CImIgQk0dt8UmkxzV8ewydLPCMGsdMMqfr1u6c8LcCm+d8C1Hzw PrCtelfRN1smI3/IRkkyac+z888IICNUahd0ESd3d/pvVbDRkNmfJbWbU2/z17hpXAQw yNtoTfyf6L9qomAYfoIopoFfF8e8X1/1HnbpMe4lTjahGCa3q1LD9BfWYLAzotfHY3YQ IuAXTQq5ZMFGDQcsoT3FtDdXg8JtJ25LMk5jl8qBFOfrBCYrUIhtff3TtOfK5tXkzJNO yuUHzLYv0s7o091xYe6MmUjg8LT1EM/NbC3RSQpTjy5WtW1wpXv+aeVs7ukTUY832FqD rjww== X-Gm-Message-State: AOAM530KtXJatPEqFAnr05Fes7xOoKAj+G/sjhOpQHBii6H86lRWElU5 5y2Q81MVW8WE9BiBFw6Hzfny7Go8fITec2m3vkxXdg== X-Google-Smtp-Source: ABdhPJyodrlIwxvXj9j6gGI51r9cXRj8xfoOFdh+vq78US7qyWBMu+ApjS1npnI+qftmyyjBQOFSWsXXnoO8nCD8tvg= X-Received: by 2002:a19:e08:: with SMTP id 8mr2417659lfo.441.1605656332549; Tue, 17 Nov 2020 15:38:52 -0800 (PST) MIME-Version: 1.0 References: <20201012220620.124408-1-linus.walleij@linaro.org> <20201013092240.GI32292@arm.com> In-Reply-To: <20201013092240.GI32292@arm.com> From: Linus Walleij Date: Wed, 18 Nov 2020 00:38:41 +0100 Message-ID: Subject: Re: [PATCH v3 RESEND] fcntl: Add 32bit filesystem mode To: Dave Martin Cc: "Theodore Ts'o" , Andreas Dilger , Ext4 Developers List , linux-fsdevel , Linux API , QEMU Developers , Florian Weimer , Peter Maydell , Andy Lutomirski Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Tue, Oct 13, 2020 at 11:22 AM Dave Martin wrote: > > case F_SETFD: > > err = 0; > > set_close_on_exec(fd, arg & FD_CLOEXEC); > > + if (arg & FD_32BIT_MODE) > > + filp->f_mode |= FMODE_32BITHASH; > > + else > > + filp->f_mode &= ~FMODE_32BITHASH; > > This seems inconsistent? F_SETFD is for setting flags on a file > descriptor. Won't setting a flag on filp here instead cause the > behaviour to change for all file descriptors across the system that are > open on this struct file? Compare set_close_on_exec(). > > I don't see any discussion on whether this should be an F_SETFL or an > F_SETFD, though I see F_SETFD was Ted's suggestion originally. I cannot honestly say I know the semantic difference. I would ask the QEMU people how a user program would expect the flag to behave. Yours, Linus Walleij