From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 C72753EAC9F for ; Wed, 22 Apr 2026 13:22:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776864178; cv=none; b=H+6O9z92V6drG5uQ90To39ET64QpbLEYgafafvBkn0w0YLdHLht/Fbuu9ceo5Ga/ycCWC3FM3pxquiPyNdFJ+hqBCuEu75fa/TYHJbgOG74jcOjFK/hhJ3WxIQqDow4dEpU1RwFm3yAIhJw30b7haWsrQ6LiIQCSo292ukvXe5M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776864178; c=relaxed/simple; bh=B3WIkMhhRY3ABt8emplhzp64UW8Mp2FLLu7xnNh2A9E=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=u5uu2xYo3lNLPUUXYzrI4bzgaUHN+D98Y2qxfo6ddcUe4H/43ICDorZ7IyYyvv2Cvm0i1JhUwuv9oY8B7P8uCIkXbInZe0VF2Ip0y7abrAoJnfluHHcskOIFGrY5EF9Y/EbSUpfosCRaEKSXKCSsXaeQ+E2lXznPogcRX3PYlPQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=oO5f//wF; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="oO5f//wF" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-48a563e4ef7so19502725e9.0 for ; Wed, 22 Apr 2026 06:22:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776864175; x=1777468975; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=TT49yQtE4TasiiFGgbCE5PSG5c9LX0hebT5gdrezyEY=; b=oO5f//wF8YASJUjCdptjfVji2x9uOJzsPfN5qvuWIWN4rMMkydFU26JOJRQuaAF3OP YQFkZtf4D0o7R3sJU7OhNZuWUgxzdvJEnpLNcbrVh1iZrzJtZlw3uKx6l4dg+QQJRqWC pHtWzrKY7Ix1EE4bZ9QT+8okZEUjNTC3nC3RGFtFDgsYe99Oid0kEZ+tq+c8pKDKFy/S 2Zv4mPzEq5G/HmK2zJh3L5/uTmaySBEHNcPfUZeDxymADB+F8B7ybVw5oNcn1YJTNZMD svIyi38N91Ci7YA53QhYDz+/0uzXCOZuVOGVADC04VOpVCSv4akpAouFtegKUcmLALa4 ySuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776864175; x=1777468975; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=TT49yQtE4TasiiFGgbCE5PSG5c9LX0hebT5gdrezyEY=; b=X+hhdItjPP9HEqFo0D/jlQLpFXhM/fY7iF5E036TL+z7P1tdnJarRvTuukea28prm5 P8ZoZTYC1Ord7BeMlNrGEqdj7nR0sXjkvgaM9yebUMRIjYzSLqvOSbSQ/q7oa9lLWCXt cPIauYtq7heX9uwtTytXjEuSNiq+bA6g9HCVp0dQnp6cnHRUW/G7DdmIyOn0CLqSZ8jd sHkbR4p4Mf0K9U1wz6ocw5L4KG2DZadNrbwLVDZgW8VM7QWmAvmUFKDgdRyjNY06B/db i7xLYKXebujD2GGaAhtdwwLJfLnqQx5FAsUFkMLnFvAia8vLTBjh0EmpCggVfOl1uQjK FJwg== X-Forwarded-Encrypted: i=1; AFNElJ8mNdHBWrjtmxwJENrT7hc+/b5NKEp6gg625Iszgpd+/mzG67NAfzNQX8zbHqw72uV0VAdKlJKYnydw4SU=@vger.kernel.org X-Gm-Message-State: AOJu0Yx7ieM+FuhINoveWTYpyz5Vhd/hocRHT+KfPVaAj3jFbq7z5NGG AXbY+5Xqu5M1dpH98B4NO7usgfk5MNUzcWGKiiWBO0hVfDG1k0AAdG/p X-Gm-Gg: AeBDiesWGSLvSsRlzhPRjeOONbbiN/H9ACUpdqewjhptb9nWluQZ44jaX+GZ0xfFmyN jL3pFlBOXFnUDKoCVWp3vTpR95Cr71n066QOdAiEgnSZAMH9MK4efxVsgqMKAwySPNes3NuEaVL RAK0LKtBHo9dCHY/uFlKcwgf0h1ugvySBzqkVEhli0FmSB0gZLiGw8w1fV7uY+fI2K0F2h8yIVV 2fxQ/T2ZogJ78ucepn5S97kWKG9mBBgH/kzJ5izwQEZssCRMQCZcNq5wB6XCsuqT8QIcfucr3bq U5mxjTVg6MZHjkSARHOskcqYjITfOXyebseAd5RXb6ux7VOWDZjG0cFhTHYhFef93O5cUQuP88t gnKt+I+SdJ9XO0+056y7tYotujawltDQg2YFbl5CljKWln2d1g/ghZBn0f0TGWpfG6luo7NYspx L1tM2NYgrovnZq2NKr+LtvZZXE+t9gT6ddjB92fDLzp5LoY0Zbw/gZaTdDqI4VFlIpOhUr/xRzL d78PMXTu8tJGg== X-Received: by 2002:a05:600c:c0c8:b0:488:ab1d:dcc5 with SMTP id 5b1f17b1804b1-488fb787ba3mr242109915e9.27.1776864175017; Wed, 22 Apr 2026 06:22:55 -0700 (PDT) Received: from pumpkin (82-69-66-36.dsl.in-addr.zen.co.uk. [82.69.66.36]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488fb75c695sm134995895e9.14.2026.04.22.06.22.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Apr 2026 06:22:54 -0700 (PDT) Date: Wed, 22 Apr 2026 14:22:52 +0100 From: David Laight To: Miguel Ojeda Cc: Arnd Bergmann , Marco Elver , kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, Miguel Ojeda , Dmitry Vyukov , Nathan Chancellor , llvm@lists.linux.dev Subject: Re: [PATCH 1/2] Compiler Attributes: Add __access macro Message-ID: <20260422142252.2e2c927c@pumpkin> In-Reply-To: References: <20260421190351.1976329-1-elver@google.com> <63e461c3-2d8e-47c0-9901-34b53e53f22b@app.fastmail.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; arm-unknown-linux-gnueabihf) 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=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, 22 Apr 2026 12:25:26 +0200 Miguel Ojeda wrote: > On Tue, Apr 21, 2026 at 9:30=E2=80=AFPM Arnd Bergmann wro= te: > > > > gcc-10 knows the 'access' attribute, but not the 'none' variant: > > > > echo 'int f(void *p) __attribute__((access(none, 1)));' | /home/arnd/cr= oss/arm64/gcc-10.5.0-nolibc/aarch64-linux/bin/aarch64-linux-gcc -xc - -o /= dev/null -c > > :1:1: error: attribute 'access' invalid mode 'none'; expected on= e of 'read_only', 'read_write', or 'write_only' =20 >=20 > Which is exactly the one we use in #2, indeed. >=20 > That makes sense, thanks! >=20 > We should still change the number here, because `__has_attribute` will > pass even with GCC 10, i.e. since someone using `none` without a gate > in Kconfig or elsewhere may not realize the mistake. >=20 > So we should probably add a comment that the access mode `none` is > only available in GCC 11 -- especially so if we add the docs David > suggests, because otherwise it seems like it is supported. Especially since the gcc docs make it pretty impossible to find out when anything was added. Trial and error on godbolt shouldn't really be needed. (and I missed that the size/count is the argument number as well). David >=20 > Cheers, > Miguel >=20