From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 513CC35F179 for ; Tue, 7 Apr 2026 17:09:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775581749; cv=none; b=HJ/lNe5M/hxzNQVVKQG3qd+QiBlnCpLmndte11FGVqmyrCxnRhcV9IwmveIVXcOT81PTQdGQQVk12ITzM4MCWgXVOCinHGke7l7EunjLutlPFC+vqPy7Fj2XdcnDKstuV86Q5Tf35d42WnM/BDr9pOc8CUJA3SfX7vVeEMKr2QQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775581749; c=relaxed/simple; bh=s81Le8WnuQfHlsyHi90kVLHRuS4ykDd+nIz+8j9C5q8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SKPeJ28rm+Vox2evIYKg9CtCTzpvblE2pdV7DP8g+S40DmveLANd4L/Hg/tiWN7IiHpFqY7hw91vPqEjoEcI+xcKFwCKb/ZqgGOIFO1xGCfRz/aCMIVFxgYU5TcWDmdkT8RdatdR+7emI2fRbUH5RlmKke6/YZkjli2bnO/FDxw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net; spf=pass smtp.mailfrom=gourry.net; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b=n6uvRZf0; arc=none smtp.client-ip=209.85.222.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gourry.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b="n6uvRZf0" Received: by mail-qk1-f179.google.com with SMTP id af79cd13be357-8d4f78fc9f6so458219285a.3 for ; Tue, 07 Apr 2026 10:09:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1775581747; x=1776186547; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=eb9coQca3Zd+zQgIwS/KrYzVgQyjmsyw37GVCirWHqw=; b=n6uvRZf0jo2O3sOAlDCDDHIoJJQoIMBJpLl/vk4kw3RkdBMzJ+008YS1nizzxeXjiW +w6JeZf898jctx3MuJNO/6F3ctAeawRkhPN2PrnFvge4fuxKLW0Q68OLeT4QzFroGtHo ki9qo/Jl1J5bx3W1d+jc0Ecegwz7jn2W+t3mL9eNJdQ+8mRgGa98mGQlTQkT6+Ol5lp1 5rI2Eb+IEQC+L61XpyTNuil+lN6c9C6yNpLUTkLtyI1EiR5G98N5cejBlgCMQAb8CuAZ 5G0FLs/bNyIWgHNdnJ2NwG8wNzj9Pf3wdyHVFEQWWfXrO5aepgm3gXP0uPvRyt0x9ijJ OCHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775581747; x=1776186547; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eb9coQca3Zd+zQgIwS/KrYzVgQyjmsyw37GVCirWHqw=; b=o3jVHZ//9tgZmSUSbcfNxlubF2Z6fETHpz1UMPmrjqiXppcpJZkMpkXLu+Z/69JNbE hxKsbkYuGU1Cc0lQ+StjPaD9wnnzvWyubZrBEm4NnjiEhSeCTaFA1xcExupLL/cJjSuG X0wo5lzKmCbRm8zn0fTBjgfnctMZ7Q6RKLWdVbdtgPGjrUk0h4ESHI3GSkGSvm1O6t+2 wWxWACV/jv6ujwl/phXSUPfIlLxebNi/K8N6G4IgXWHtgNzBndEj3aVJHsNOVC9Ch0lL TX74mNOXz6SV0U6PeBSpJgPjIptwnLaJuEghjS6MCVpnWNSZmD5WYGBGnspf6j/Ja81M eXuA== X-Forwarded-Encrypted: i=1; AJvYcCVMkBxcbNftYGaA/1ASqDpRN9bgUoM2hIa883e6jaWEc6th/Ss8LtmsJmbfiA0uy/MXqt9S8McTdEODQo0=@vger.kernel.org X-Gm-Message-State: AOJu0YzvKMVreiPzNXmiWYg1nukxjE6TFqCSiEPAW7SfnmlKDiKTCruc c/E5AUVPMEnWM+0bylVsskeg+nOSW2dVlPN8YxvQQHHLvBD8IVZYUJ7r4xo4Q4jPcU4= X-Gm-Gg: AeBDiev/2vQdShqb5h1tv6cLf6GmqK7PsVQMvtPMMY/NSuCBJbRNyRjyyC9zZ9HEpZ7 aCk5pd1olxLLUFNndvRzsUfiVqQviFap2KfPtKiT/nnFBj5EtJEPdcRMyTpt4Od8Tmgxq5BXWET VTosb709esLoQtEcyD0GPd1aRsCsxJt+st/Tmx7H164rzEyB6/KILwT6WW5qKSNiDJZb8sBgODl ynzfwW91+0s8u1F9wUdtNfjZ53jvNIYlHuUrTNuW20+zPvF6xjdG0JvChFeJBeoVBAU5LAWydF2 g4OKyiCWyOp4pi57+kpkXJga2IwIpjOqbQdFt0kuWz+8wBF/nAObbPwxsAh+PdeDbvHsvI0BnsW nzMfcMMFGWqvdmFj3wcOpDv+bq5GSiubWty4TTFjjqyOHjyxgak0b4R+RPvodT75HQb/EdBrk6c EemBO4j3wYBJ9bIoBOsOgBVDEX0MZutc0lcn8a7woSiF8tZfb6p0nIqkSBEWqFuE0yKuN6Q//QI cFe8dbJHPyN X-Received: by 2002:ae9:e215:0:b0:8d6:2beb:945c with SMTP id af79cd13be357-8d62beba34amr1394722485a.41.1775581747216; Tue, 07 Apr 2026 10:09:07 -0700 (PDT) Received: from gourry-fedora-PF4VCD3F (pool-71-191-243-150.washdc.fios.verizon.net. [71.191.243.150]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8d2a5d5a096sm1359165885a.19.2026.04.07.10.09.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Apr 2026 10:09:06 -0700 (PDT) Date: Tue, 7 Apr 2026 13:09:04 -0400 From: Gregory Price To: Joshua Hahn Cc: Andrew Morton , Jackie Liu , David Hildenbrand , Zi Yan , Matthew Brost , Rakie Kim , Byungchul Park , Ying Huang , Alistair Popple , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@meta.com Subject: Re: [PATCH] mm/mempolicy: Fix weighted interleave auto sysfs name Message-ID: References: <20260407141415.3080960-1-joshua.hahnjy@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@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: <20260407141415.3080960-1-joshua.hahnjy@gmail.com> On Tue, Apr 07, 2026 at 07:14:14AM -0700, Joshua Hahn wrote: > The __ATTR macro is a utility that makes defining kobj_attributes easier > by stringfying the name, verifying the mode, and setting the show/store > fields in a single initializer. It takes a raw token as the first value, > rather than a string, so that __ATTR family macros like __ATTR_RW can > token-paste it for inferring the _show / _store function names. > > Commit e341f9c3c841 ("mm/mempolicy: Weighted Interleave Auto-tuning") > used the __ATTR macro to define the "auto" sysfs for weighted > interleave. A few months later, commit 2fb6915fa22d ("compiler_types.h: > add "auto" as a macro for "__auto_type"") introduced a #define macro > which expanded auto into __auto_type. > Well that's really unfortunately. Is this really the only "auto" in the entire sysfs structure? > This led to the "auto" token passed into __ATTR to be expanded out into > __auto_type, and the sysfs entry to be displayed as __auto_type as well. > > Expand out the __ATTR macro and directly pass a string "auto" instead of > the raw token 'auto' to prevent it from being expanded out. Also bypass > the VERIFY_OCTAL_PERMISSIONS check by triple checking that 0664 is > indeed the intended permissions for this sysfs file. > > Before: > $ ls /sys/kernel/mm/mempolicy/weighted_interleave > __auto_type node0 > > After: > $ ls /sys/kernel/mm/mempolicy/weighted_interleave/ > auto node0 > > Based on latest mm-new: 96881c429af1 > > Signed-off-by: Joshua Hahn Maybe - Fixes: 2fb6915fa22d ("compiler_types.h: add "auto" as a macro for "__auto_type"") Reviewed-by: Gregory Price ~Gregory