Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp939323rda; Sun, 22 Oct 2023 17:49:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFj8AVzuOMV3L3+02+oBMYfJxtaciHrU4HI0OwArczeFYme3DdmXY8m9ou3sWm4cPnEH2+n X-Received: by 2002:a05:6a20:e107:b0:163:2da1:387f with SMTP id kr7-20020a056a20e10700b001632da1387fmr6893488pzb.50.1698022155827; Sun, 22 Oct 2023 17:49:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698022155; cv=none; d=google.com; s=arc-20160816; b=Qq0vm+F/6yXfgEd2IShILVBc/7xH0K9sUKWuPjfFmOhKOhFdxt7zkwOgrQmzqibnVH Hg297l4Qx8TJYbqbl9tmCzrzUh9e01PhObZ+tlyAv7jUaSGos5QmzOF8tf7ZuMsn/DJL wA8vtFi5C6g47+Bx0Luv0FByC5wLMCtfveK4SYCJ4nKBJUXnMX01PquJs8/KApH4/UN7 BfL+nDvLl1u2SVLfijPuMlrkyusz6hBU/dP+5Cgk8SnzgfWFzxkREEOIyr6TrgOlwK/l pJU3NEibIpHPLpD0Ufj0MNM+7tXzUqzXP2ZDbKrS7TtCFGWeYzz3DeJOoqQj6gOw+Be+ i5Ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :content-language:references:cc:to:from:user-agent:mime-version:date :message-id:feedback-id:dkim-signature:dkim-signature; bh=FBzhOk1/MoLTpPe2mqzKOYM+gO3ovGaCBaJjCIQKups=; fh=jz6IBWw+NgTfsGN9dyOlcHHw/4bbRPjG+rUh2WIT7BQ=; b=i3DZJTn6vfyR3QHTcB1FakMYrOHXuWOTbmnosu7GEh3ab5skQMJXmuRPQGyxHopsEH MRxsSkakZhZU27rYM2tfLXkIzMXzBVsUgnMTKvdu72+jaEkNjlO2NC7HT2/JOVWr3RJ8 AofkiouFb4aV+t8A2IDaZZpC3Ja3UECqkwU5hQA80CUt2ExCh0lzHgFY9SirLmyUOYpH 3pQCDhs9g4PaXD0k9PrUqG3bCHHvkSG5x2VY0YZSc54u4JPRCvdFPU32IH8hg2mAYyL8 x7l4F3SetRPqM6hVVfuF9JAdW5X+eUVRbBYD6tEpWRRfZP2FAwCG6fse4pKJhyNHNejo 90iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@themaw.net header.s=fm2 header.b=WVKo7cvT; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="WWGx/VLx"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id w16-20020a170902e89000b001ab29e00303si5643206plg.426.2023.10.22.17.49.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Oct 2023 17:49:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@themaw.net header.s=fm2 header.b=WVKo7cvT; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="WWGx/VLx"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 6233E8075DC3; Sun, 22 Oct 2023 17:49:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232911AbjJWAtD (ORCPT + 99 others); Sun, 22 Oct 2023 20:49:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232910AbjJWAtB (ORCPT ); Sun, 22 Oct 2023 20:49:01 -0400 Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DA37EE; Sun, 22 Oct 2023 17:48:59 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 10B2A5C023A; Sun, 22 Oct 2023 20:48:58 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sun, 22 Oct 2023 20:48:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=themaw.net; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1698022138; x=1698108538; bh=FBzhOk1/MoLTpPe2mqzKOYM+gO3ovGaCBaJ jCIQKups=; b=WVKo7cvTpb78V5zwABknuMAOGhhEkMF7+2tDi3O19sXGj6kGGD3 OIId9D3ZjIA1SYYUE4L4yoChKcTOosEzULTFdJH3HsqEndJZtW7BdIIgRSzO2xAR cf3WyVOh6pT8HlC621Z16KFGObEccJsGxH88GHtoMIYWe+5rJaRQLnWWL6U1b3gh 0nd4UGaS2zazfC4gQF22iZRpspDsWVmN2hrYv/gQGk6ACBQ2iFfA41gvDQ5GSTJd w1ZeqOdprfIb1w2WbA5yt4TPAHwj6uU2hEJ4ZQLoPN387AOnvNk3kFc/MV7zc77I Ze6494508QGmfsyHC09/MpvlfEpWUp0ziog== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1698022138; x=1698108538; bh=FBzhOk1/MoLTpPe2mqzKOYM+gO3ovGaCBaJ jCIQKups=; b=WWGx/VLx1wlsti84Lv7DUJUGP5PV/JV5xlPp9DHFK4IAjp96CVD KNPrlIQe2DfCMv2OhfExGy5Hxl190N8wyOtqbAf9/G4SgQ1kF6q9YbZDKXghj/yG 2qhvBh3InrXLZllHXM+NHWLnh4OMhfgo9WAuLS3GGIFwMzFvi7s9tg16WQPfQmJa QQEA729E/WWP8uThNI5GRM/EEbNbRSNIT7O/IDPgq9l0SX1sjqBTSSwxzZLhbXO0 X1KJf4dUE2MNC2YOJSHhzZ6FHBm0hVuxB+BlcVjbZZCLas3AQ7l4jdifxs+Ka9lY jHi7wS4GleB+K/er3K9WSWcz7HZjVGeeEmw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrkeehgddvkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfhvfevfhfujggtgfesthekredttdefjeenucfhrhhomhepkfgrnhcu mfgvnhhtuceorhgrvhgvnhesthhhvghmrgifrdhnvghtqeenucggtffrrghtthgvrhhnpe ekueffkefhffetjeeikeevtdfhgefhgeetfedvgeevveejgeffleelffekveejtdenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehrrghvvghnse hthhgvmhgrfidrnhgvth X-ME-Proxy: Feedback-ID: i31e841b0:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 22 Oct 2023 20:48:53 -0400 (EDT) Message-ID: <9217caeb-0d7e-b101-33f0-859da175a6ef@themaw.net> Date: Mon, 23 Oct 2023 08:48:50 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 From: Ian Kent To: Arnd Bergmann , Dan Carpenter , Anders Roxell Cc: Naresh Kamboju , open list , lkft-triage@lists.linaro.org, linux-fsdevel@vger.kernel.org, autofs@vger.kernel.org, Bill O'Donnell , Christian Brauner References: <71adfca4-4e80-4a93-b480-3031e26db409@app.fastmail.com> <432f1c1c-2f77-4b1b-b3f8-28330fd6bac3@kadam.mountain> <11ba98f2-2e59-d64b-1a1a-fd32fd8ba358@themaw.net> Content-Language: en-US Subject: Re: autofs: add autofs_parse_fd() In-Reply-To: <11ba98f2-2e59-d64b-1a1a-fd32fd8ba358@themaw.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Sun, 22 Oct 2023 17:49:13 -0700 (PDT) On 20/10/23 21:09, Ian Kent wrote: > On 20/10/23 19:23, Arnd Bergmann wrote: >> On Fri, Oct 20, 2023, at 12:45, Dan Carpenter wrote: >>> On Fri, Oct 20, 2023 at 11:55:57AM +0200, Anders Roxell wrote: >>>> On Fri, 20 Oct 2023 at 08:37, Arnd Bergmann wrote: >>>>> On Thu, Oct 19, 2023, at 17:27, Naresh Kamboju wrote: >>>>>> The qemu-x86_64 and x86_64 booting with 64bit kernel and 32bit >>>>>> rootfs we call >>>>>> it as compat mode boot testing. Recently it started to failed to >>>>>> get login >>>>>> prompt. >>>>>> >>>>>> We have not seen any kernel crash logs. >>>>>> >>>>>> Anders, bisection is pointing to first bad commit, >>>>>> 546694b8f658 autofs: add autofs_parse_fd() >>>>>> >>>>>> Reported-by: Linux Kernel Functional Testing >>>>>> Reported-by: Anders Roxell >>>>> I tried to find something in that commit that would be different >>>>> in compat mode, but don't see anything at all -- this appears >>>>> to be just a simple refactoring of the code, unlike the commits >>>>> that immediately follow it and that do change the mount >>>>> interface. >>>>> >>>>> Unfortunately this makes it impossible to just revert the commit >>>>> on top of linux-next. Can you double-check your bisection by >>>>> testing 546694b8f658 and the commit before it again? >>>> I tried these two patches again: >>>> 546694b8f658 ("autofs: add autofs_parse_fd()") - doesn't boot >>>> bc69fdde0ae1 ("autofs: refactor autofs_prepare_pipe()") - boots >>>> >>> One difference that I notice between those two patches is that we no >>> long call autofs_prepare_pipe().  We just call autofs_check_pipe(). >> Indeed, so some of the f_flags end up being different. I assumed >> this was done intentionally, but it might be worth checking if >> the patch below makes any difference when the flags get put >> back the way they were. This is probably not the correct fix, but >> may help figure out what is going on. It should apply to anything >> from 546694b8f658 ("autofs: add autofs_parse_fd()") to the current >> linux-next: >> >> --- a/fs/autofs/inode.c >> +++ b/fs/autofs/inode.c >> @@ -358,6 +358,11 @@ static int autofs_fill_super(struct super_block >> *s, struct fs_context *fc) >>          pr_debug("pipe fd = %d, pgrp = %u\n", >>                   sbi->pipefd, pid_nr(sbi->oz_pgrp)); >>   +        /* We want a packet pipe */ >> +        sbi->pipe->f_flags |= O_DIRECT; >> +        /* We don't expect -EAGAIN */ >> +        sbi->pipe->f_flags &= ~O_NONBLOCK; >> + > > > That makes sense, we do want a packet pipe and that does also mean > > we don't want a non-blocking pipe, it will be interesting to see > > if that makes a difference. It's been a long time since Linus > > implemented that packet pipe and I can't remember now what the > > case was that lead to it. After thinking about this over the weekend I'm pretty sure my mistake is dropping the call to autofs_prepare_pipe() without adding the tail end of it into autofs_parse_fd(). To explain a bit of history which I'll include in the fix description. During autofs v5 development I decided to stay with the existing usage instead of changing to a packed structure for autofs <=> user space communications which turned out to be a mistake on my part. Problems arose and they were fixed by allowing for the 64 bit to 32 bit size difference in the automount(8) code. Along the way systemd started to use autofs and eventually encountered this problem too. systemd refused to compensate for the length difference insisting it be fixed in the kernel. Fortunately Linus implemented the packetized pipe which resolved the problem in a straight forward and simple way. So I pretty sure that the cause of the problem is the inadvertent dropping of the flags setting in autofs_fill_super() that Arnd spotted although I don't think putting it in autofs_fill_super() is the right thing to do. I'll produce a patch today which includes most of this explanation for future travelers ... > > > Ian > >>          sbi->flags &= ~AUTOFS_SBI_CATATONIC; >>            /*