From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.227 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796097643; b=Yty2QqJROjIm3AZrJOzZ78WRYudOFgZIWAjnsFevXsLCT8HjOtVr+9LBCB4+OhGs1xuC PE6rekDWc+WFUTZ/ao4p6a6stJL4UmprE3Sds2mJi+6foW80aXhtH2WKzliZWFD4BL6gX JmPVwdTOEvUm5Ug90QV8zEzVFqPTB3THZ0K3XzxU3hRXAvrDdMRBxJ5YxW0ZWmJcyNKzL vg2/YS1G1EgeIheA6f0qK9tuICOfaDdtBjoJAUp3ylYzxG1Gp1pPUiXySTEuRVK1yxi2+ ywdYM6cboF1/tis5e3Tjv3+Kn+QTacMdW8ZXpeOwZvf9rkG06N6pcH4BI/OroIPC0KA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796097643; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:From:To:Subject:Date:Message-ID: X-Mailer:MIME-Version:Content-Transfer-Encoding; bh=30O08KVjisvI0sD23ZLQ2geNHC+Gbst7HJqprLNoOUI=; b=vYNwO1dE/dnnsxLxOYLDwoaZhjajOSfff5pj8FkO63qE6vujXTaaQeFkp88hZo6tFj7V nNFPhvOK7dIl/Re+Zi5EIVm6vNjR65TRD1Z6/GKuM5m1vF98DI/HP34vUx0dYDcYal/bl RUCGHKM5A65Nd8uRj1Y2ctWlZZVHrBXBXTnOEiExJJ1GMUCE9+A1OQsqB/BhPsn0/umfh 2S7TM6JY2rgxAiBY1972sFbewR5qyhAe3KX4tCYeE1J3nvA4geIa2P7Zl0o7rEpE6Zgl0 buczuQbUlK88kqcEHF0tO4WTD/WxwI+3bxrVjL2KawDEMIVrV/xNFDtDGx0fyFvHdzQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b="PA/oLtdM"; arc=none smtp.remote-ip=91.218.175.227 Received: from mta0.migadu.com (out-227.mta0.migadu.com [91.218.175.227]) (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 5C7FD606A31A for ; Tue, 1 Dec 2026 04:00:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 5C7FD606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=PA/oLtdM X-Envelope-To: netdev@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=aNBXGrEmp4hyQKtqnd4IIUSYNagw69PFTra4VTw4mdI=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796097640; v=1; x=1796702440; b=PA/oLtdMYKtWvfNwBczCO72aH88wuim3GLz940Ix1K1MYHPBOmaEJbGXTUTxciSqwcEk2hP4 iGoQnQuJEYp3F3FdAiGxWGCmNLSXqlYTRcugJjYiQC7m/e5tQIhtI/MHDyylN+o9y7L4oDMWuG2 llye8zUN76qj/hNdFDD13mTU= X-Envelope-To: netdev@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id b168e2c7b1a3acba; Tue, 01 Dec 2026 04:00:27 +0000 X-Mizu-Trace-ID: b168e2c7b1a3acba X-Migadu-Flow: FLOW_OUT From: Qingfang Deng To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Qingfang Deng , Simon Horman , Eric Woudstra , Asim Viladi Oglu Manizada , Felix Fietkau , netdev@vger.kernel.org Subject: [PATCH net-next] pppoe: make the session ID byte order explicit in procfs Date: Tue, 1 Dec 2026 12:00:12 +0800 Message-ID: <20261201040014.10868-1-qingfang.deng@linux.dev> X-Mailer: git-send-email 2.53.0 X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit /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. Signed-off-by: Qingfang Deng --- drivers/net/ppp/pppoe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c index de6edc31790f..4b839f1d10aa 100644 --- a/drivers/net/ppp/pppoe.c +++ b/drivers/net/ppp/pppoe.c @@ -929,8 +929,9 @@ static int pppoe_seq_show(struct seq_file *seq, void *v) po = v; dev_name = po->pppoe_pa.dev; - seq_printf(seq, "%08X %pM %8s\n", - po->pppoe_pa.sid, po->pppoe_pa.remote, dev_name); + /* The procfs ABI treats the network-order SID as a native u16. */ + seq_printf(seq, "%08X %pM %8s\n", (__force u16)po->pppoe_pa.sid, + po->pppoe_pa.remote, dev_name); out: return 0; } -- 2.53.0