From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f74.google.com (mail-ed1-f74.google.com [209.85.208.74]) (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 0698434F489 for ; Thu, 22 Jan 2026 08:28:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769070519; cv=none; b=C7vcKAkv3QyuCESg8fxWstZRvB3gFiYbK3FELDLLVn7uoehhsgmbF71r0WnWaIctfLyhofOX64k9qwjEnvRvNFPnD5G1FBaOTcD7QitG3kx9PeqdZs6uUakxu815YRcyMA8WxjiJf5+U82z78jz5kTV+sVW5aLmzQAtlWlG9ZGw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769070519; c=relaxed/simple; bh=e5SHl9tdfe7U9tsFeacyHLMUAVT4waohJ18Yy+KpQfI=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=nyf8dpAPHSpub8Pwl5kV/TMLpwiENBHiT+bjscznLrHuRq8STnFqf0ntYWu2wB4rO2VLsJDZo5IeipfhARnqmGq8MGBu/qm5R56vaCaah9WAj/t7cj3N9KAtJrIESJueYobuir+9R0i8L+xC0L9uyB8pirKuK6kyNlArCwwE6PY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=T3xxb4Be; arc=none smtp.client-ip=209.85.208.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="T3xxb4Be" Received: by mail-ed1-f74.google.com with SMTP id 4fb4d7f45d1cf-64d53a7817eso671083a12.3 for ; Thu, 22 Jan 2026 00:28:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1769070516; x=1769675316; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=QwqQXeBUazQtYA5jTKcA+ISjgjVSs2NRoJVqymEav80=; b=T3xxb4BeKatIDdG51O7pAtOiopDtu6Urxbu9kLGeIjBse15//JfhvKyPrxACnaPCFn F5j2FV3OOjPEY7/QQPmAPHQPvsfOjWWKo8IHtjz7ICGST53c0A2/kqavo5ZplVAteYnW wy80F+EqYAGx7fdC+i5dIwKO/q2IcxWdgYZ31kBZY0HqnibtA+qLUoiRd9g2A7Pn6DS3 xmuDD5eGlNb0k7RISytsLvokc/mIL1R2Bvi9mFbaL63DNHqdpWbzk9Oo3wQ+aTtDMmdf SqqWBy3oRBSBR+OSiT85+be7KtZ5nETjcVwg2nJmCmmOlfazBNd85AWVfa1wiFonI9kv Qfzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769070516; x=1769675316; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QwqQXeBUazQtYA5jTKcA+ISjgjVSs2NRoJVqymEav80=; b=xGuxUnJ3upM94kiMA9fNTdr1a12I9n9WOAdT7JR6BLVSBhBWbkSzUgjYfvHk7WnR8p uWwdYCbOxcx/esjzVXVmoLwHtJoKL1qLOnJzscqOR1gpRvVARmwsepWOwkk7J1T0jEaF 6SJzxX20Yb69JRJ6KbSPp+TGHlfnJOVLuW0zjuFRojxKhkkK8s7i9/S8zTZZC7oBECFY 2SIbsMxpc3Rec152C1NHKH6R5cV/pW5txLWSer4vsq3xrTbYt/t6h+ZuDTLPV1HoatHN Cv9ShD+W7VrIqixvbp6scNOXD4LH3yZqDgLTyGMHNdL6DEp2hhy9lkH3+bi4sBPEukA/ HbuA== X-Forwarded-Encrypted: i=1; AJvYcCUOmjtwg50aZbuBm7GeJaKoxX08RIzWtKulQm4vV2X7ncZJJGBvIpWy2oOExQfF3K9k4CPxcdO9med4Wmg=@vger.kernel.org X-Gm-Message-State: AOJu0YyuBzKoRe++um8QzneInSjuPNq6m4GVvSnL+K8PdMR+uIwYheYA P0D/1kB7pMl1OtcJlDi0uLYsonojXlRY9fI/a57LMuAO+MDimvcdn/13kHZOcYp64rkuuIhWvJy vToxI7SHi5i2i9XwcIA== X-Received: from ejcts11.prod.google.com ([2002:a17:907:c5cb:b0:b88:397e:3a7e]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a17:907:7256:b0:b87:4c37:7fcc with SMTP id a640c23a62f3a-b8792d3bc19mr1712231466b.5.1769070516343; Thu, 22 Jan 2026 00:28:36 -0800 (PST) Date: Thu, 22 Jan 2026 08:28:35 +0000 In-Reply-To: <20260121165835.4097975-1-gary@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260121165835.4097975-1-gary@kernel.org> Message-ID: Subject: Re: [PATCH] rust: disallow use of `CStr::as_ptr` From: Alice Ryhl To: Gary Guo Cc: Miguel Ojeda , Boqun Feng , "=?utf-8?B?QmrDtnJu?= Roy Baron" , Benno Lossin , Andreas Hindborg , Trevor Gross , Danilo Krummrich , Tamir Duberstein , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" On Wed, Jan 21, 2026 at 04:58:14PM +0000, Gary Guo wrote: > From: Gary Guo > > As kernel always use unsigned char and not the platform ABI's default, an > user should always use `as_char_ptr` provided via `CStrExt` instead. > Therefore configure `disallow-methods` feature of clippy to catch incorrect > usage. > > Signed-off-by: Gary Guo Reviewed-by: Alice Ryhl