Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp1074868rwb; Sat, 5 Aug 2023 06:59:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEH8YyC6r6ppGh1UF2R0yGMHxEBUcOs3iQPX4Fe6MpHiUDzFFs8BS0bkLIf7O2kRaWva1MA X-Received: by 2002:a17:902:bb8b:b0:1b9:d2fc:ba9f with SMTP id m11-20020a170902bb8b00b001b9d2fcba9fmr3432271pls.11.1691243964162; Sat, 05 Aug 2023 06:59:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691243964; cv=none; d=google.com; s=arc-20160816; b=VS0sU23NwsRy8Bl/YLMMahvPGdOM78Q8dXEAxDnFOSczPq1TpWDeGwBXcvxKYr3OCH B2mVwkVX78NfaJ78n04yaaL/tb3DXaIYoBsLwLtL4ht/FbY5Z0w+loq81mHYhI9YWPuG cIyh7eV4VWwMAjQl58dxIDCPvrbi3EsX9/9OVLkBLMnYUWDxPjOAiCsQ3mFunDpZLZ70 8Kte1DGNXSM50qNn2/ypMZMCI+VdfBNOsyK6NTHk3WCQHRUfo7PRjfwj5kQbML68s92b HGK8zDsyFQe4rf/VqdCZlrGB3VMhJjVIbLHkKkThsrVPFh9h0LCw2GeCaICRGkzNjTGU hBVw== 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:reply-to :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id; bh=fjJtc6PiL+x6nmmBU6I0zDVX3sHGlGsM9wp4wgwn8oM=; fh=V72vVJjxKKmPD/E55Ti8EG6WoZu3rL4jUpVGuCUli38=; b=KtN3GVbn7m0KoAt/GBLbyB+4XF3SLg0WoRyb9vU5akf80aYcX2daxadjqJd8hCXPh7 4SB2/IxdVGe4/6rHk4cC47KZ6f4es8IYo+mn1Naa9qEZhtlCNsfQhfjsjcuMJ+uNW5W5 0QSM1PNN69BINCO8HWikdGMfqxp4TNiFZPPKrsrZwfwRpLqIn4VItVoeC1s4DMPOEqLV 3Z/L0Ku01+DSl1bh1KzjOb3suW7feW9jpu7//Wu7rjmqTWJrEHZlfwKJ2Vbd2oWyqDGs RsrEJyZWdYH/sbi8ldGbdd1Bxinp7vyhsjY918YGMz6K14Co0xDQPDZdFOydWx9Y5SiQ PMqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i2-20020a170902c94200b001bbfbe6bf3esi3317384pla.504.2023.08.05.06.59.12; Sat, 05 Aug 2023 06:59:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229751AbjHENHd (ORCPT + 99 others); Sat, 5 Aug 2023 09:07:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229496AbjHENHc (ORCPT ); Sat, 5 Aug 2023 09:07:32 -0400 Received: from wp530.webpack.hosteurope.de (wp530.webpack.hosteurope.de [80.237.130.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52933E7; Sat, 5 Aug 2023 06:07:31 -0700 (PDT) Received: from [2a02:8108:8980:2478:8cde:aa2c:f324:937e]; authenticated by wp530.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1qSH03-0006q9-To; Sat, 05 Aug 2023 15:07:19 +0200 Message-ID: <84f6ea98-0d72-e17a-4b7c-d025f2d34e95@leemhuis.info> Date: Sat, 5 Aug 2023 15:07:18 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 04/24] PM: hibernate: move finding the resume device out of software_resume Content-Language: en-US, de-DE To: Vlastimil Babka , Christoph Hellwig , Jens Axboe Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Mike Snitzer , Joern Engel , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Pavel Machek , Loic Poulain , dm-devel@redhat.com, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-mtd@lists.infradead.org, linux-pm@vger.kernel.org, Linux regressions mailing list References: <20230531125535.676098-1-hch@lst.de> <20230531125535.676098-5-hch@lst.de> <2cfa5f55-1d68-8a4f-d049-13f42e0d1484@suse.cz> From: "Linux regression tracking #adding (Thorsten Leemhuis)" Reply-To: Linux regressions mailing list In-Reply-To: <2cfa5f55-1d68-8a4f-d049-13f42e0d1484@suse.cz> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;regressions@leemhuis.info;1691240851;88782bfb; X-HE-SMSGID: 1qSH03-0006q9-To X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [TLDR: I'm adding this report to the list of tracked Linux kernel regressions; the text you find below is based on a few templates paragraphs you might have encountered already in similar form. See link in footer if these mails annoy you.] On 03.08.23 10:27, Vlastimil Babka wrote: > On 5/31/23 14:55, Christoph Hellwig wrote: >> software_resume can be called either from an init call in the boot code, >> or from sysfs once the system has finished booting, and the two >> invocation methods this can't race with each other. >> >> For the latter case we did just parse the suspend device manually, while >> the former might not have one. Split software_resume so that the search >> only happens for the boot case, which also means the special lockdep >> nesting annotation can go away as the system transition mutex can be >> taken a little later and doesn't have the sysfs locking nest inside it. >> >> Signed-off-by: Christoph Hellwig >> Acked-by: Rafael J. Wysocki > > This caused a regression for me in 6.5-rc1+, fix below. > > ----8<---- >>From 95a310ae6cfae9b3cab61e54a1bce488c3ab93a1 Mon Sep 17 00:00:00 2001 > From: Vlastimil Babka > Date: Wed, 2 Aug 2023 15:46:18 +0200 > Subject: [PATCH] PM: hibernate: fix resume_store() return value when > hibernation not available > > On a laptop with hibernation set up but not actively used, and with > secure boot and lockdown enabled kernel, 6.5-rc1 gets stuck on boot with > the following repeated messages: > > A start job is running for Resume from hibernation using device /dev/system/swap (24s / no limit) > lockdown_is_locked_down: 25311154 callbacks suppressed > Lockdown: systemd-hiberna: hibernation is restricted; see man kernel_lockdown.7 > ... > > Checking the resume code leads to commit cc89c63e2fe3 ("PM: hibernate: > move finding the resume device out of software_resume") which > inadvertently changed the return value from resume_store() to 0 when > !hibernation_available(). This apparently translates to userspace > write() returning 0 as in number of bytes written, and userspace looping > indefinitely in the attempt to write the intended value. > > Fix this by returning the full number of bytes that were to be written, > as that's what was done before the commit. > > Fixes: cc89c63e2fe3 ("PM: hibernate: move finding the resume device out of software_resume") > [...] Thanks for the report. To be sure the issue doesn't fall through the cracks unnoticed, I'm adding it to regzbot, the Linux kernel regression tracking bot: #regzbot ^introduced cc89c63e2fe3 #regzbot title pm: boot problems when hibernate is configured and kernel locked down #regzbot fix: PM: hibernate: fix resume_store() return value when hibernation not available #regzbot ignore-activity This isn't a regression? This issue or a fix for it are already discussed somewhere else? It was fixed already? You want to clarify when the regression started to happen? Or point out I got the title or something else totally wrong? Then just reply and tell me -- ideally while also telling regzbot about it, as explained by the page listed in the footer of this mail. Developers: When fixing the issue, remember to add 'Link:' tags pointing to the report (the parent of this mail). See page linked in footer for details. Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat) -- Everything you wanna know about Linux kernel regression tracking: https://linux-regtracking.leemhuis.info/about/#tldr That page also explains what to do if mails like this annoy you.