๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #26515

Re: [PATCH net-next] pppoe: make the session ID byte order explicit in procfs

#26515
From: Nicolas Dichtel
Date: Thu, 03 Dec 2026 17:03
19 lines
11904 bytes
Le 01/12/2026 ร  05:00, Qingfang Deng a รฉcritย :> /proc/net/pppoe prints the
network-order session ID as a native-endian
> integer. A session ID of 0x1234 therefore appears as 00003412 on
> little-endian hosts and 00001234 on big-endian hosts.
> 
> Explicitly cast the ID to u16 to document this ABI, so a static analysis
> tool won't trip on it. Converting it to host byte order would change
> what little-endian userspace reads.

Which tool, and what does it report? If sparse warns on the current code, please
quote the warning in the commit log. Otherwise this looks like a pure cleanup.

Nit: the cast does not make the byte order explicit, it documents that no
conversion is done. Something like "pppoe: document the raw session ID in
procfs" may be more accurate.

Regards,
Nicolas
Technical Details
Message-ID: <401a65e5-d994-4869-9b70-0bed9627e289@6wind.com>
Path: mbox-mo1.pugleaf.net!news-sfo.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376775-linux-kernel-netdev=dewy.ru
References: <20261201040014.10868-1-qingfang.deng@linux.dev>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-sfo.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376775-linux-kernel-netdev=dewy.ru
From: nicolas.dichtel@6wind.com (Nicolas Dichtel)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next] pppoe: make the session ID byte order explicit
 in procfs
Date: Thu, 3 Dec 2026 18:03:34 +0100
Organization: Usenet Network
Message-ID: <401a65e5-d994-4869-9b70-0bed9627e289@6wind.com>
References: <20261201040014.10868-1-qingfang.deng@linux.dev>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2549148"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:32/cYGzNjhQr0sU8KsoB1Bi0JcQ= sha256:IiUxUGIsXRic1LjO9pOYUGT4bEmwkrnDjJyJjVkrqtQ=
	sha1:iBJ1e8NTG+0d5/B7aO7bbGWju+o= sha256:wahDFFHbEEcNZPYsvwPTQ34Q/hbbqoJQ8aqlVPT4h7Q=
Content-Language: en-US
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 3CB721179E3; Thu,  3 Dec 2026 20:03:59 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.299
X-Spam-Status: No, score=-3.299 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=6wind.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id xA-mxNS6LbSt;
	Thu,  3 Dec 2026 20:03:56 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-376775-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=6wind.com
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id E9BE71179DA; Thu,  3 Dec 2026 20:03:47 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id 165422381E; Thu,  3 Dec 2026 17:03:46 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1796317420;
	b=MH+Vthhu+yKUhieAlC/TP+MjnKbda2UIqZE1411Gs6J7OIhB/x5Ts0e9MYdBoL1YcLN4
	 vivmePVm/yanr7df7khQ3nKOU2lU3oM64u8JME8+WYGd1Fnl6JuSHnqBaicI3FKiMkf7m
	 GBrFR8vETH+TFUN0G9Q+qcv9TfhoXMXe4GfBE6Eb3/Rha/OvQj44bOnwcWbo09eU9+1c6
	 9LIG2LNwHv8H5nGo2/Ke0oB0aUPBr69aaMV0UNJ/HxsEVJLMmSWDuop2tx+jk7IflTpGE
	 lUEVOvVjzP/PhVEpOdYxXKsQ0LPzWBBbouco+2x7W3RmzWebOTI4/SWgVBkQcxqLBeQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796317420;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
	 X-Gm-Gg:X-Received:Received:Message-ID:Date:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version:User-Agent:Reply-To:Subject:To:References:
	 From:Content-Language:Organization:In-Reply-To:Content-Type:
	 Content-Transfer-Encoding;
	bh=SW9CnKEt2ZPqlnopnNJipcKxzIFwCW4hiE0Ltib1NIE=;
	b=Tx9qtuV5r3AV0NUyuio56iaRC13yRaTOobnAvGVosF2092Yz8CUKOBdiBAlUVbCfyWjD
	 qYTGzGgSRZxA0UYLsIfTE4LVjL4+//0n0IrqAQTiIwm4VWplJkhKjED7H3Rt1VL7ledvx
	 sVhFuBa6/o4so4g8qWFpNAlnbegWqhOz7rMaE81YHrt7scqgxNSi7mK8gM5m+u4/Fm1Dd
	 YvdVoo43KVBPiQVS52pRcreOXZyJranTSyCku5Gjv8+C6WfAdRiYKWHOhD7Q3isMFcLU5
	 uL/G/B2vLpKrfMYZqGKOdgZmerxLHTU4cDkJ1V+SdcA7WqD2lo6dLx5Jlf2iCQcH/ZA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=6wind.com header.i=@6wind.com header.a=rsa-sha256 header.s=google header.b=EbqFdVLx;
	dmarc=pass header.from=6wind.com;
	spf=pass smtp.mailfrom=6wind.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 0A0E9606A68A;
	Thu,  3 Dec 2026 17:03:40 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=6wind.com header.i=@6wind.com header.a=rsa-sha256 header.s=google header.b=EbqFdVLx
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.44
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796317419;
	b=EsGH0X+7p53+MF5utPonnEDs1jv9WabUZX/etF5pantyt2OkGrXqL4CWi+GaomZubjby
	 owvOGG6CA8mjjGB5VgIotyv8TDwsFFLZBpvun2LaB7l/iT633rQM1eLcKA/K9Z6QJ/t9K
	 7Jd6/Mi/MM6ZqA9ocjlFexWOFXDxJDJoFC93LNDxtF40CL7/bdjJbH/foc37ei8nJArcz
	 x0MgzzKyAPKEozvSpPIj9Th+ybNYX4ryFk9jUQkpXaR+J1yaUwYzhS37eXKUzog6m6b1X
	 op2FF+UBQ5BxhAlpuziYdWo+hPKUD5ZpRM10wsxMWFEjockxFThVtpnkCxf80SRffHw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796317419;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received:
	 Message-ID:Date:MIME-Version:User-Agent:Reply-To:Subject:To:
	 References:From:Content-Language:Organization:In-Reply-To:
	 Content-Type:Content-Transfer-Encoding;
	bh=SW9CnKEt2ZPqlnopnNJipcKxzIFwCW4hiE0Ltib1NIE=;
	b=oC8TfMcuQmp0PV/D1KIhDz3DEf8ydWrYU7/5wIKa+qY9IwK9sWH52sd9u1M46eRQ18Iz
	 5ULzsop0Q3Nm0wLXHoBKkZntz6Zu2KGf1W60shFiuSsjrbC3/TiSwH40VKM2EO8J55URd
	 fLBPE0w8TEWJQoR9JeD88yr8b6q6U3JEbN5F47ynQ1MXtR+qpw79pX7aSABTzzwXsYqcf
	 iImx6+zKrGVYDx2pdh9rLNQGAVvCFAIm+XNd/4Y/DCeJVeysnp187+90obyGnau3xK18L
	 B1EhHYX0c/heqPYQeLbt9z4IY9kG8SFFshuAgY8ihLGmpNWW6PkXwWr94Xul6j3UU6g==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=6wind.com;
	spf=pass smtp.mailfrom=6wind.com;
	dkim=pass header.d=6wind.com header.i=@6wind.com header.a=rsa-sha256 header.s=google header.b=EbqFdVLx;
	arc=none smtp.remote-ip=209.85.221.44
X-Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA63F606A332
	for <netdev@vger.kernel.org>; Thu,  3 Dec 2026 17:03:38 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BA63F606A332
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=6wind.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=6wind.com
X-Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-48df4f7ccf4so7249f8f.1
        for <netdev@vger.kernel.org>; Thu, 03 Dec 2026 09:03:38 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=6wind.com; s=google; t=1796317417; x=1796922217; darn=vger.kernel.org;
        h=content-transfer-encoding:content-type:in-reply-to:organization
         :content-language:from:references:to:subject:reply-to:user-agent
         :mime-version:date:message-id:from:to:cc:subject:date:message-id
         :reply-to:content-type;
        bh=SW9CnKEt2ZPqlnopnNJipcKxzIFwCW4hiE0Ltib1NIE=;
        b=EbqFdVLx/sZ/MNYXGPqhKsVq3sb2KKm+CWW8LcybHdSA1NfDjzaUlcUaUMpgcvnkJ3
         v/oP/QcRpLVWvbLgpB66y+5D8qnRfz7NqAduHCe0EpyioHPFynjVR+qqzlXcShsr8+ok
         789N63HWfCPULGWpivnwX6CJljAwhuY5g8IDIy8XbmblQMJy5a+u3ZmxoDEzFXqfEQ+L
         bz8RFepvGp6S7ZqNcawhuKgGJTv27uz4vCiPqUoc1G1k4hwncideTFDc8CTi+bOIGTET
         EAa/83xJtfD9aNGuGC5M7FPz1mtKPCI+Ca//QD7cgtILG3TJs2mdEPRYbM6q/1fDOc6I
         /ZJA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1796317417; x=1796922217;
        h=content-transfer-encoding:content-type:in-reply-to:organization
         :content-language:from:references:to:subject:reply-to:user-agent
         :mime-version:date:message-id:x-gm-gg:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to:content-type;
        bh=SW9CnKEt2ZPqlnopnNJipcKxzIFwCW4hiE0Ltib1NIE=;
        b=u671uTYGO3x7vC2+e+JyHeT2oYQuHFnXPARABu50a/W21TTX5qSBCXZJcNGkEEalQj
         ICdN3P7Nuq3ObmN2nUVegC88WSIVaRfVBR4sv5wIFOYgJgbTMVDrcGEe/NuUmVknJrdJ
         xa3xl3mYQgsfMHcQ7SbTZSQnpsF2czyc/rFsBg1eBInWh5Il1b160FCYiWQTOie+Vjhp
         z5M2vDJaCsACu0DO0DiajB6v3i0PXQu/DZAuKiz6gTxLEq5DxP/lgEYQrYQgqLflunIk
         C7Gc3KunKik7gEWtcbHrH5iGZifef+U21pjS+ZPsl1LXLexAkTSiE/QcYBvuMNvyGOme
         Bp7Q==
X-Forwarded-Encrypted: i=1; AL+hErFM8jUhtjrbdyMoODG4EhZ9vCakth8ISWO/5/DD6pSA6iSlMOp7a5dygD7N+QHbwhw02m7l9wo=@vger.kernel.org
X-Gm-Message-State: APuU4Z/3SS5DSIx/FgttzQIem/b5QQJoCBxW5LW9+eBOgayfWUgEDsGa
	EZ4DS7GSGxDV+k6kCXFszkJuRY/55p1xOQQDmChbVu2sOGQe0G1ZarYqSSqXZoZzfuo=
X-Gm-Gg: AZFdTZcv+96S8eqcXDvkuNMUgjuRF2bsBtAXwr1ShHpD/cucKyFSa8DPoF8sKMEB9BE
	13atEDLoY0n/M7WG57SsSnB8NYRnmpRqsWrOT2+JGp78zxx87wg/TVKVHbc1ZThp+mwEWM0E6gV
	6g40XhVaItn56MAbYEw20bbTWTGWui0igtzMu/Uztx0oHelnNDvCi+au2gHd53+DA6N52Ojaym+
	HlnGsCemmYBsFpNcTiZmf3rMiXRlpMoWdPjaJPp4aS3R6/xAzHb8ElLkSerexmvf5MXkjekpNJ1
	rfteYElGHW7miVwPE8MF0lVFbFIb32UVJ54FmS0usFhr6++MFiHwH1OdG0yEcBMqocMCSAW1lRB
	UX+iBnq22YSEG+sgJmcthfLXj6oE/U/WSCsw/Y4zNWOZs7+Qh6q8yztco5feZz8Tw/MS4sJ+NOi
	XwLq2ekQfMrJd2TZ5P+yr3q8aGRSX2ul8fd1X6SG0yaXSyZ/JLf6KJNvCj1Ru76VE+umgAs1BB1
	1TJNnWCfyYyOLugtK8nMv7cxFYjxqPzQPB/2XJe6EKXW/7LaD+sK+yiAZn3AK6yzmNMsIZafzes
	ssKZq3Md6a9UUUKwqxIRAOBmFUVA12mJulr0RN5cA4JsgweVXk7MNK3bD2a37jIf/GdbxtODYQ4
	7kXfpyQ==
X-Received: by 2002:a05:6000:3108:b0:4a6:bc53:2479 with SMTP id ffacd0b85a97d-4cfaca49372mr4586804f8f.5.1796317415930;
        Thu, 03 Dec 2026 09:03:35 -0800 (PST)
X-Received: from ?IPV6:2a01:e0a:ab7:2110:6a1d:efff:fe52:1959? ([2a01:e0a:ab7:2110:6a1d:efff:fe52:1959])
        by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4d1724ad3c0sm259923f8f.11.2026.12.03.09.03.35
        (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
        Thu, 03 Dec 2026 09:03:35 -0800 (PST)
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-User-Agent: Mozilla Thunderbird
X-Reply-To: nicolas.dichtel@6wind.com
X-Organization: 6WIND
X-In-Reply-To: <20261201040014.10868-1-qingfang.deng@linux.dev>