From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0128D13D531; Mon, 20 Jan 2025 07:10:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737357055; cv=none; b=hGa8mCXFJ2KOgOrD4/G3bzkgcjVfoONdHr2wxu5UrYUMXSh2Wnhp41f8ILb+bj9MoP2rej2odve0/SkhAhkdXhG28h8ZUjsb931xaFpRPZ276emQF7JzlfodcRcEMzORkJ5nWTFri/nYtyhlJ6+c5751Hw3mAp7IkDP1LkrES5I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737357055; c=relaxed/simple; bh=tTl/AxD44lehf3XjUNIpXDTawzKl3yELQWzOEVtf3Ok=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QOROJ8BE5mhXXNfMTkr2LjzIziRUkQi/WwrM0TVCrK+L4snPf+14FTFKUx/lBr92yJIlZO3a8LGZ2NYEWX9EYGYh+gQxjGJwhhugp9E6zBKQe82445MZvdfzF2jngm5SgUKFr3CdMwPpZVvVW9lSFSDts/wIYu0V0PRMh63tv2Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DY+AAQho; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DY+AAQho" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1FC76C4CEDD; Mon, 20 Jan 2025 07:10:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1737357054; bh=tTl/AxD44lehf3XjUNIpXDTawzKl3yELQWzOEVtf3Ok=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DY+AAQho/kZrw3C0UnV78A2/UU2IB5lhigLGc33yc0xWiB1YsiM4Fm+ZUX4J1tK+A s9IrlcrGmg3EKPa0+vLxQkZK14vSfy32cb5iZeVOUwEPZhb+ViCWIzd1OK40/EjAcs Q/dtXnptSrUdilem+1evGWtyNFhqKuo8Bv8xnE6fd6I1QYN9DHDwXx800g7/OIdDw6 IXDboCF/lLjn9cinKIqGwqiG6rALG+cmhKPmhx9HbtuznGVE1nX7z074I3eDV0jk72 DMIxyUph+hMC3LDBpr+Xh9Z8WItrV6pE9ddE9pL3x3JqDEMd+f2ulPzH3lDcPOXdgp iovR+v4V5eVOg== Date: Mon, 20 Jan 2025 07:10:48 +0000 From: Tzung-Bi Shih To: Ahmad Fatoum Cc: Andrew Morton , Daniel Lezcano , Fabio Estevam , "Rafael J. Wysocki" , Zhang Rui , Lukasz Luba , Jonathan Corbet , Serge Hallyn , Liam Girdwood , Mark Brown , Matti Vaittinen , Benson Leung , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-doc@vger.kernel.org, linux-security-module@vger.kernel.org, chrome-platform@lists.linux.dev, devicetree@vger.kernel.org, kernel@pengutronix.de Subject: Re: [PATCH v2 02/12] reboot: reboot, not shutdown, on hw_protection_reboot timeout Message-ID: References: <20250113-hw_protection-reboot-v2-0-161d3fc734f0@pengutronix.de> <20250113-hw_protection-reboot-v2-2-161d3fc734f0@pengutronix.de> Precedence: bulk X-Mailing-List: linux-security-module@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250113-hw_protection-reboot-v2-2-161d3fc734f0@pengutronix.de> On Mon, Jan 13, 2025 at 05:25:27PM +0100, Ahmad Fatoum wrote: > hw_protection_shutdown() will kick off an orderly shutdown and if that > takes longer than a configurable amount of time, an emergency shutdown > will occur. > > Recently, hw_protection_reboot() was added for those systems that don't > implement a proper shutdown and are better served by rebooting and > having the boot firmware worry about doing something about the critical > condition. > > On timeout of the orderly reboot of hw_protection_reboot(), the system > would go into shutdown, instead of reboot. This is not a good idea, as > going into shutdown was explicitly not asked for. > > Fix this by always doing an emergency reboot if hw_protection_reboot() > is called and the orderly reboot takes too long. > > Fixes: 79fa723ba84c ("reboot: Introduce thermal_zone_device_critical_reboot()") > Signed-off-by: Ahmad Fatoum Reviewed-by: Tzung-Bi Shih