Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1644340rdb; Thu, 25 Jan 2024 01:41:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IFkS/psg88w5kh1gzzpfeZ2tdqdymgEQKMoQCYD+8wdaFDawGQF1IGTCJL02a579K+CW1x3 X-Received: by 2002:a05:620a:2406:b0:783:5592:38e1 with SMTP id d6-20020a05620a240600b00783559238e1mr1152679qkn.109.1706175707967; Thu, 25 Jan 2024 01:41:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706175707; cv=pass; d=google.com; s=arc-20160816; b=YfAVEysSxob5p2W5+Lxn9BH8rect3Wgr1wly8dTiDidIDh6yHUnsjLLALS7nZg+cm7 b69assJtBhorEZCAXa1omnZDu0E2FumN1ZjIY9xWYn6wiw+2fstjM2qeHH6BgU+R5SQL Eg4QCRe3MLs6HNGH821vdgyg7531skp0uR4nbujSbAEPwAb2FoFczE/5IanT/UgCcabU b/u87G/Pndr3olSNVSWP8Xq5I5Qr6ERtrrJ66wwrNGOTcLCpP0Ri8AulOPw1hOM4iD3n VN6EQzUkFLmdLu0x14mrNZBrHwlnB+BpESEH0OEBYQ/sklKmYSZXm5RiPI6QEE7zE2/L KhrQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=2w9Bvvn+jurd2Cj78WVPbW2DOqLlbhDiK+4nrxZRPHk=; fh=ArO5S2f1rvOnBmBk4qnXzbNnl1G0evdbqv5Z8pM5RrA=; b=CK9XsLJUPm6DbTJceDFn9pgAh9BVLVX0qJHi2De2dzFVUApMdP+mlGnMIneYA/NWBI u73wC1XQDR5+ZsWMqh27zngO2Q+OORPjTxJURDVroLtJY9rL8BlxCo7y+x2yV7VQHu06 Dtlqh8t2iqufU5dvCpIYaHB9o884HmZMOMRk/bjdiyv8NTi5pzlr4NSQWqMa8Aegrre5 ie8Owmf+Uah6X6LvevI9g0B++/XthY4OAEK/vFhfyE/XkDCWn+md2lUflBEBzFHSiz5l uu4Vxfu6lWaZ6BkZfLhGPA87S+9AAkxUE2TWdAwo/vJE7ARCdu5CCQVG7sHsrK2zbOpU 0m2w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=d7jQDHte; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-38297-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-38297-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id v10-20020a05620a122a00b00781bd7d3bb1si12164506qkj.775.2024.01.25.01.41.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 01:41:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-38297-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=d7jQDHte; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-38297-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-38297-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A415C1C252DB for ; Thu, 25 Jan 2024 09:41:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 26DC01BDC2; Thu, 25 Jan 2024 09:41:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="d7jQDHte"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="tbeuouD8" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 F36CD1BC5B for ; Thu, 25 Jan 2024 09:41:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706175674; cv=none; b=WC63o7xbBxyNiVG6JLInV0LEMYpDbYNYlV/nIeSmmWHsN1RWGPpXz6tzE8vTYntnRPALZBrfw61gFCaJkXeu+fyY++BmH2d92Ux8amd0hpXuGNJFQS4ls+3l2Z5vn2TiX0OcsQBukcTPkzn4Pj0tZpYnfPSpe9LIFyqayIXDxC8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706175674; c=relaxed/simple; bh=2w9Bvvn+jurd2Cj78WVPbW2DOqLlbhDiK+4nrxZRPHk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=nbUVx4iHDwsin5Hjks5fc0IwXJSQiR+z0/IjKMl/NFzndKm7WGDFZShGT82RHUH8togqlWNehLvwu4MtZXSMPp068vT8izSUcitnitMw60tNDRZR2fiF2AORSFsVj/ZFrpAaIx1EK8jn9G9Wl3o8KZVfS/BKv3dy6ls2QtuMuHo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=d7jQDHte; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=tbeuouD8; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1706175671; 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: in-reply-to:in-reply-to:references:references; bh=2w9Bvvn+jurd2Cj78WVPbW2DOqLlbhDiK+4nrxZRPHk=; b=d7jQDHtektlYZ9+1z1ZFXgkAqms7QgMiiBBZAsTWlc3zU2pmWoVpysOX/ktDsrZXl1p92r X9q3ccEyC2t3UTVe8K0IeFVCsbg2NovjGiTpwG8ymriMSb8dQtI669LAtaLxqzBBx9OKFU TlH/shS0o6SNzJATGrYgmH+EeDajGlyD2o3Q7aEwxVg933ElMj9wz+VULK+ofKKpJ55rug S/04H27N+3+GLio1BH21a/7dc90IDoPO62Yq+ayJwrtwvW3Wahh+0gzlI84vN97hQbQ9d5 GikkZeFZQvRX8SQD+TkiaV2kLaLP/sErHEpkMVdvSBiD2QqOmn8gPbfS5jlLoQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1706175671; 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: in-reply-to:in-reply-to:references:references; bh=2w9Bvvn+jurd2Cj78WVPbW2DOqLlbhDiK+4nrxZRPHk=; b=tbeuouD8d2F/1HynGk/QbDnc3UrrZ8R9cUNyBzH13Baq+Z33SZkEDK7pVzwm1immEetIsf xHRelxR4FcE3ZiCw== To: Frederic Weisbecker , LKML Cc: Frederic Weisbecker , Ingo Molnar , Anna-Maria Behnsen , Peng Liu , Joel Fernandes Subject: Re: [PATCH 12/15] tick: Move individual bit features to debuggable mask accesses In-Reply-To: <20240124170459.24850-13-frederic@kernel.org> References: <20240124170459.24850-1-frederic@kernel.org> <20240124170459.24850-13-frederic@kernel.org> Date: Thu, 25 Jan 2024 10:41:10 +0100 Message-ID: <87le8diwcp.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Wed, Jan 24 2024 at 18:04, Frederic Weisbecker wrote: > The individual bitfields of struct tick_sched must be modified from > IRQs disabled places, otherwise local modifications can race due to them > sharing the same memory storage. > > The recent move of the "got_idle_tick" bitfield to its own storage shows > that the use of these bitfields, as pretty as they look, can be as much > error prone. > > In order to avoid future issues of the like and make sure that those > bitfields are safely accessed, move those flags to an explicit mask > along with a mutator function performing the basic IRQs disabled sanity > check. > > Signed-off-by: Frederic Weisbecker Reviewed-by: Thomas Gleixner