public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bernd Schubert <bschubert@ddn.com>
To: "André Draszik" <andre.draszik@linaro.org>
Cc: Miklos Szeredi <mszeredi@redhat.com>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Paul Lawrence <paullawrence@google.com>,
	Daniel Rosenberg <drosen@google.com>,
	Alessio Balsini <balsini@android.com>,
	Amir Goldstein <amir73il@gmail.com>
Subject: Re: [PATCH v2] Revert "fuse: Apply flags2 only when userspace set the FUSE_INIT_EXT"
Date: Wed, 18 Oct 2023 15:51:19 +0000	[thread overview]
Message-ID: <5cd87a64-c506-46f2-9fed-ac8a74658631@ddn.com> (raw)
In-Reply-To: <9afc3152-5448-42eb-a7f4-4167fc8bc589@ddn.com>

On 10/18/23 16:40, Bernd Schubert wrote:
> On 10/18/23 16:26, André Draszik wrote:
>> On Wed, 2023-10-18 at 11:52 +0000, Bernd Schubert wrote:
>>> On 10/18/23 13:46, André Draszik wrote:
>>>> On Wed, 2023-10-18 at 11:39 +0000, Bernd Schubert wrote:
>>>>> On 10/18/23 13:15, André Draszik wrote:
>>>>>> From: André Draszik <andre.draszik@linaro.org>
>>>>>>
>>>>>> This reverts commit 3066ff93476c35679cb07a97cce37d9bb07632ff.
>>>>>>
>>>>>> This patch breaks all existing userspace by requiring updates
>>>>>> as
>>>>>> mentioned in the commit message, which is not allowed.
>>>>>>
>>>>>> Revert to restore compatibility with existing userspace
>>>>>> implementations.
>>>>>
>>>>> Which fuse file system does it exactly break? In fact there
>>>>> haven't
>>>>> been
>>>>> added too many flags after - what exactly is broken?
>>>>
>>>> The original patch broke the existing kernel <-> user ABI by now
>>>> requiring user space applications to pass in an extra flag.
>>>> There are various side-effects of this, like unbootable systems,
>>>> just
>>>> because the kernel was updated.
>>>> Breaking the ABI is the one thing that is not allowed. This is not
>>>> specific to any particular fuse file system.
>>>
>>> How exactly did it break it?
>>
>> At least in Android, creating new files, or reading existing files
>> returns -EFAULT
> 
> Hmm, could you please point me to the corresponding android userspace 
> library? I guess it is not using libfuse? At least I would like to 
> understand the issue...
> 
>>
>>>   These are feature flags - is there really a
>>> file system that relies on these flag to the extend that it does not
>>> work anymore?
>>
>> I don't know enough about the implementation details, but even outside
>> Android user space had to be updated as a prerequisite for this kernel
>> patch:
>> https://lore.kernel.org/all/YmUKZQKNAGimupv7@redhat.com/
>> https://github.com/libfuse/libfuse/pull/662
>>
>> Which means any non-Android user space predating those changes isn't
>> working anymore either.
> 
> The patch in libfuse is from me, there was nothing broken.
> And I don't think that any of the additional flags added are a 
> _requirement_ for libfuse file systems to work. I'm not sure if DAX and 
> the other flags before the patch was merged are a _requirement_ for 
> virtiofsd or just a nice feature to have...


Looking at the android kernel source:

/*
  * For FUSE < 7.36 FUSE_PASSTHROUGH has value (1 << 31).
  * This condition check is not really required, but would prevent having a
  * broken commit in the tree.
  */
#if FUSE_KERNEL_VERSION > 7 ||                                                 \
         (FUSE_KERNEL_VERSION == 7 && FUSE_KERNEL_MINOR_VERSION >= 36)
#define FUSE_PASSTHROUGH (1ULL << 63)
#else
#define FUSE_PASSTHROUGH (1 << 31)
#endif


So passthrough gets broken with this check and android heavily uses that.
Would be interesting to know if this could result in EFAULT.


Thanks,
Bernd

  reply	other threads:[~2023-10-18 15:51 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-04 13:33 [RESEND PATCH] Revert "fuse: Apply flags2 only when userspace set the FUSE_INIT_EXT" André Draszik
2023-09-04 13:41 ` Miklos Szeredi
2023-09-04 14:21   ` André Draszik
2023-09-04 14:45     ` Bernd Schubert
2023-10-18 11:15 ` [PATCH v2] " André Draszik
2023-10-18 11:39   ` Bernd Schubert
2023-10-18 11:46     ` André Draszik
2023-10-18 11:52       ` Bernd Schubert
2023-10-18 14:26         ` André Draszik
2023-10-18 14:40           ` Bernd Schubert
2023-10-18 15:51             ` Bernd Schubert [this message]
2023-10-25 11:30               ` Linux regression tracking (Thorsten Leemhuis)
2023-10-25 13:17                 ` Miklos Szeredi
2023-10-26  5:28                   ` Thorsten Leemhuis
2023-10-27 10:40                   ` Greg Kroah-Hartman
     [not found]                     ` <CAOssrKfNkMmHB2oHHO8gWbzDX27vS--e9dZoh_Mjv-17mSUTBw@mail.gmail.com>
     [not found]                       ` <2023102740-think-hatless-ab87@gregkh>
     [not found]                         ` <CAOssrKd-O1JKEPzvnM1VkQ0-oTpDv0RfY6B5oF5p63AtQ4HoqA@mail.gmail.com>
     [not found]                           ` <2023102757-cornflake-pry-e788@gregkh>
2023-10-27 18:23                             ` Miklos Szeredi
     [not found]                           ` <689f677b84b484636b673b362b17a6501a056968.camel@linaro.org>
     [not found]                             ` <CAOssrKfP+t-cy322ujizQofgZkPZsBu1H4+zfbWNEFCmTsXwug@mail.gmail.com>
     [not found]                               ` <afe378bf254f6c4ac73bb55be3fa7422f2da3f5f.camel@linaro.org>
     [not found]                                 ` <CAOssrKeJB7BZ7fA6Uqo6rHohybmgovc6rVwDeHbegvweSyZeeA@mail.gmail.com>
2023-11-01 12:36                                   ` Linux regression tracking (Thorsten Leemhuis)
2023-11-08 10:31                                     ` André Draszik
2023-11-08 12:18                                       ` Miklos Szeredi
2023-12-06 14:03                                       ` Linux regression tracking (Thorsten Leemhuis)
2023-10-22 13:35 ` [RESEND PATCH] " Linux regression tracking #adding (Thorsten Leemhuis)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5cd87a64-c506-46f2-9fed-ac8a74658631@ddn.com \
    --to=bschubert@ddn.com \
    --cc=amir73il@gmail.com \
    --cc=andre.draszik@linaro.org \
    --cc=balsini@android.com \
    --cc=drosen@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mszeredi@redhat.com \
    --cc=paullawrence@google.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox