From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-183.mta1.migadu.com (out-183.mta1.migadu.com [95.215.58.183]) (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 AF1F22F1FEC for ; Wed, 8 Oct 2025 07:23:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.183 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759908212; cv=none; b=Cc8mrMuyRsJTeNWcXsYJd5yHACAt+1RPsuzya0+pwtX3UrTlOZFnpod4LbqANx1FklOeCVfnTuiXaJh3K5Bl5FzgnsboGV6R5nD0W49IZohH+B2RDQ8e2JmCH8jeK27dOya6DqN1TvT5dUXP6b5R8Q6uJadax2f1yROhigKKnWM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759908212; c=relaxed/simple; bh=1hrKhcewNAog3goQOz9EqxB44PnuDQDFLGTcN9t+kO0=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=o5PtDSaCFQUh+L8yY3GMBvtErDHnBd0UWrMRzwDAUU1vhZFXAHCNfadnGN2opDk+WN4INA5N5wOhZY9dtSYOMWBNWGLFzWB7Bb7MJeLLz71n7jSdFjqlP0ZFzulYEB0K4HGecO5guuEOrw5FddBHYStazxEi18BYYQ4GmzMtaTY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=Dee5XhHN; arc=none smtp.client-ip=95.215.58.183 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="Dee5XhHN" Message-ID: <2bd2c4a8-456e-426a-aece-6d21afe80643@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1759908198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7UAlSyFCkIOPcSkRc3Lm4Oe7r2DyLQZxHY7cDP0CdBc=; b=Dee5XhHNRi8+jbIjAMSc7VYUoyLS2n5Fa3t+P3S6Vurg1mz0XZURAABYGb6QUH0OX0ytvu R9y2tkbCktxKpZpBFiECWBrpk4I7X8VNSzHe/hxCfx0XrX6P2hPDZZYu2kYvI9tBLyf5ET wji78FEvG+Ukr16/gbwgg6gm6U821MI= Date: Wed, 8 Oct 2025 15:23:05 +0800 Precedence: bulk X-Mailing-List: linux-m68k@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v2 1/1] hung_task: fix warnings caused by unaligned lock pointers Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Lance Yang To: Finn Thain Cc: Andrew Morton , Geert Uytterhoeven , Eero Tamminen , Kent Overstreet , amaindex@outlook.com, anna.schumaker@oracle.com, boqun.feng@gmail.com, ioworker0@gmail.com, joel.granados@kernel.org, jstultz@google.com, leonylgao@tencent.com, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, longman@redhat.com, mhiramat@kernel.org, mingo@redhat.com, mingzhe.yang@ly.com, peterz@infradead.org, rostedt@goodmis.org, senozhatsky@chromium.org, tfiga@chromium.org, will@kernel.org, stable@vger.kernel.org References: <20250909145243.17119-1-lance.yang@linux.dev> <99410857-0e72-23e4-c60f-dea96427b85a@linux-m68k.org> <20251007135600.6fc4a031c60b1384dffaead1@linux-foundation.org> <56784853-b653-4587-b850-b03359306366@linux.dev> <693a62e0-a2b5-113b-d5d9-ffb7f2521d6c@linux-m68k.org> <23b67f9d-20ff-4302-810c-bf2d77c52c63@linux.dev> In-Reply-To: <23b67f9d-20ff-4302-810c-bf2d77c52c63@linux.dev> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 2025/10/8 15:09, Lance Yang wrote: > > > On 2025/10/8 14:14, Finn Thain wrote: >> >> On Wed, 8 Oct 2025, Lance Yang wrote: >> >>> On 2025/10/8 08:40, Finn Thain wrote: >>>> >>>> On Tue, 7 Oct 2025, Andrew Morton wrote: >>>> >>>>> Getting back to the $Subject at hand, are people OK with proceeding >>>>> with Lance's original fix? >>>>> >>>> >>>> Lance's patch is probably more appropriate for -stable than the patch I >>>> proposed -- assuming a fix is needed for -stable. >>> >>> Thanks! >>> >>> Apart from that, I believe this fix is still needed for the hung task >>> detector itself, to prevent unnecessary warnings in a few unexpected >>> cases. >>> >> >> Can you be more specific about those cases? A fix for a theoretical bug >> doesn't qualify for -stable branches. But if it's a fix for a real bug, I >> have misunderstood Andrew's question... > > I believe it is a real bug, as it was reported by Eero and Geert[1]. > > The blocker tracking mechanism in -stable assumes that lock pointers > are at least 4-byte aligned. As I mentioned previously[2], this > assumption fails for packed structs on architectures that don't trap > on unaligned access. > > Of course, we could always improve the mechanism to not make > assumptions. But for -stable, this fix completely resolves the issue > by ignoring any unaligned pointer, whatever the cause (e.g., packed > structs, non-native alignment, etc.). > > So we can all sleep well at night again :) > > [1] https://lore.kernel.org/lkml/ > CAMuHMdW7Ab13DdGs2acMQcix5ObJK0O2dG_Fxzr8_g58Rc1_0g@mail.gmail.com/ > [2] https://lore.kernel.org/lkml/cfb62b9d-9cbd-47dd- > a894-3357027e2a50@linux.dev/ Forgot to add: In other words, we are not just fixing the bug reported by Eero and Geert, but correcting the blocker tracking mechanism's flawed assumption for -stable ;) If you feel this doesn't qualify as a fix, I can change the Fixes: tag to point to the original commit that introduced this flawed mechanism instead. > >> >>>> >>>> Besides those two alternatives, there is also a workaround: >>>> $ ./scripts/config -d DETECT_HUNG_TASK_BLOCKER >>>> which may be acceptable to the interested parties (i.e. m68k users). >>>> >>>> I don't have a preference. I'll leave it up to the bug reporters (Eero >>>> and Geert). >>> >