Skip to contentSkip to conversation

ppp: remove BSD-Compress support

RFC New Qingfang Deng 2 participants 2 messages Oct 28

Subsystems (15)
lore
Share & tools
lore
#0 lore raw

RFC 1/1 ppp: remove BSD-Compress support

The BSD-Compress decoder assumes that accm is 32 bits, but declares it as unsigned long. On 64-bit systems, consumed code bits survive the left shift and corrupt the next code. An x86-64 PPP-over-PTY loopback test reproduces a fatal bad-code error on the first compressed packet.

pppd normally requests Deflate in preference to BSD-Compress when both methods can be negotiated. If BSD-Compress is selected and encounters this fatal error, pppd disables compression and logs:

Lost compression sync: disabling compression

The link remains up and traffic can continue uncompressed.

The core compression routine has remained unchanged since Linux 2.1.67 (1997), and the decompression routine since its introduction in Linux 1.3.33 (1995). Later changes have updated module integration and lifetime handling, kernel APIs, allocation hardening, metadata and code organization, without correcting the decoder's accumulator width.

A related problem was reported in 2024, when review suggested using unsigned int. The decoder still uses unsigned long. The PPP protocol drivers and compressors are orphaned.

Retire the optional and unmaintained BSD-Compress codec and remove its Kconfig and Kbuild entries and defconfig/selftest selections. Remove the unused internal DO_BSD_COMPRESS definition. Preserve the UAPI protocol definitions and generic compressor interface. Deflate and MPPE support are unchanged.

With the optional BSD codec absent, PPPIOCSCOMPRESS returns -EINVAL. pppd already probes kernel support and disables BSD-Compress negotiation when the probe fails.

OpenAI Codex assisted with the commit message, cleanup, and PTY testing.

---
Cc: Paul Mackerras <[email protected]>
Cc: Julius Bairaktaris <[email protected]>
Cc: Roman Smirnov <[email protected]>
Cc: Sergey Shtylyov <[email protected]>
Cc: Linux Verification Center <[email protected]>

---
 arch/arm/configs/footbridge_defconfig        |    1 -
 arch/arm/configs/h3600_defconfig             |    1 -
 arch/arm/configs/nhk8815_defconfig           |    1 -
 arch/arm/configs/omap1_defconfig             |    1 -
 arch/arm/configs/omap2plus_defconfig         |    1 -
 arch/arm/configs/pxa_defconfig               |    1 -
 arch/arm/configs/spitz_defconfig             |    1 -
 arch/loongarch/configs/loongson32_defconfig  |    1 -
 arch/loongarch/configs/loongson64_defconfig  |    1 -
 arch/m68k/configs/amiga_defconfig            |    1 -
 arch/m68k/configs/apollo_defconfig           |    1 -
 arch/m68k/configs/atari_defconfig            |    1 -
 arch/m68k/configs/bvme6000_defconfig         |    1 -
 arch/m68k/configs/hp300_defconfig            |    1 -
 arch/m68k/configs/mac_defconfig              |    1 -
 arch/m68k/configs/multi_defconfig            |    1 -
 arch/m68k/configs/mvme147_defconfig          |    1 -
 arch/m68k/configs/mvme16x_defconfig          |    1 -
 arch/m68k/configs/q40_defconfig              |    1 -
 arch/m68k/configs/sun3_defconfig             |    1 -
 arch/m68k/configs/sun3x_defconfig            |    1 -
 arch/mips/configs/bigsur_defconfig           |    1 -
 arch/mips/configs/fuloong2e_defconfig        |    1 -
 arch/mips/configs/gpr_defconfig              |    1 -
 arch/mips/configs/loongson2k_defconfig       |    1 -
 arch/mips/configs/loongson3_defconfig        |    1 -
 arch/mips/configs/mtx1_defconfig             |    1 -
 arch/mips/configs/rb532_defconfig            |    1 -
 arch/parisc/configs/generic-32bit_defconfig  |    1 -
 arch/powerpc/configs/85xx/ge_imp3a_defconfig |    1 -
 arch/powerpc/configs/amigaone_defconfig      |    1 -
 arch/powerpc/configs/chrp32_defconfig        |    1 -
 arch/powerpc/configs/g5_defconfig            |    1 -
 arch/powerpc/configs/pmac32_defconfig        |    1 -
 arch/powerpc/configs/ppc64_defconfig         |    1 -
 arch/powerpc/configs/ppc64e_defconfig        |    1 -
 arch/s390/configs/debug_defconfig            |    1 -
 arch/s390/configs/defconfig                  |    1 -
 arch/sh/configs/titan_defconfig              |    1 -
 arch/sparc/configs/sparc64_defconfig         |    1 -
 drivers/net/Makefile                         |    1 -
 drivers/net/ppp/Kconfig                      |   18 -
 drivers/net/ppp/Makefile                     |    1 -
 drivers/net/ppp/bsd_comp.c                   | 1170 ------------------
 drivers/net/ppp/ppp_generic.c                |    2 +-
 include/linux/ppp-comp.h                     |    3 -
 tools/testing/selftests/net/ppp/config       |    1 -
 47 files changed, 1 insertion(+), 1235 deletions(-)
 delete mode 100644 drivers/net/ppp/bsd_comp.c
arch/arm/configs/footbridge_defconfig +0 -1
index 7fa556fb6cf4..79f7304cb718 100644
@@ -62,7 +62,6 @@ CONFIG_VORTEX=y
 CONFIG_NET_PCI=y
 CONFIG_NE2K_PCI=y
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPPOE=m
 CONFIG_PPP_ASYNC=m
arch/arm/configs/h3600_defconfig +0 -1
index 3e8da62d959d..b27977c0f923 100644
@@ -38,7 +38,6 @@ CONFIG_PATA_PCMCIA=y
 CONFIG_NETDEVICES=y
 CONFIG_PCMCIA_PCNET=y
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_ASYNC=m
 # CONFIG_WLAN is not set
arch/arm/configs/nhk8815_defconfig +0 -1
index 7a307bd93730..66e4e5a7288f 100644
@@ -65,7 +65,6 @@ CONFIG_NETCONSOLE=m
 CONFIG_TUN=y
 CONFIG_SMC91X=y
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_MPPE=m
 CONFIG_PPPOE=m
arch/arm/configs/omap1_defconfig +0 -1
index fcbaaf37bc9b..c2cbdf931311 100644
@@ -90,7 +90,6 @@ CONFIG_TUN=y
 CONFIG_PHYLIB=y
 CONFIG_SMC91X=y
 CONFIG_PPP=y
-CONFIG_PPP_BSDCOMP=y
 CONFIG_PPP_DEFLATE=y
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MULTILINK=y
arch/arm/configs/omap2plus_defconfig +0 -1
index 5791953b75ff..1f344ad0aac8 100644
@@ -338,7 +338,6 @@ CONFIG_DP83867_PHY=y
 CONFIG_CAN_C_CAN=m
 CONFIG_CAN_C_CAN_PLATFORM=m
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MPPE=m
arch/arm/configs/pxa_defconfig +0 -1
index e7a7ed2b7ef7..972a0610ef7a 100644
@@ -186,7 +186,6 @@ CONFIG_MARVELL_PHY=m
 CONFIG_AT803X_PHY=m
 CONFIG_MDIO_BITBANG=y
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MPPE=m
arch/arm/configs/spitz_defconfig +0 -1
index c7cf089001bf..5c8d875e5d38 100644
@@ -85,7 +85,6 @@ CONFIG_PATA_PCMCIA=y
 CONFIG_NETDEVICES=y
 CONFIG_PCMCIA_PCNET=m
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_ASYNC=m
 CONFIG_USB_CATC=m
 CONFIG_USB_KAWETH=m
arch/loongarch/configs/loongson32_defconfig +0 -1
index dbef879935f3..6e1c92811d37 100644
@@ -627,7 +627,6 @@ CONFIG_TXGBE=y
 # CONFIG_NET_VENDOR_XILINX is not set
 CONFIG_MOTORCOMM_PHY=y
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MPPE=m
arch/loongarch/configs/loongson64_defconfig +0 -1
index 4f8bb77b8a1e..eadf21dc5c47 100644
@@ -643,7 +643,6 @@ CONFIG_TXGBE=y
 # CONFIG_NET_VENDOR_XILINX is not set
 CONFIG_MOTORCOMM_PHY=y
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MPPE=m
arch/m68k/configs/amiga_defconfig +0 -1
index fefcaa5ad44c..e65fa343ed09 100644
@@ -339,7 +339,6 @@ CONFIG_HYDRA=y
 CONFIG_APNE=y
 CONFIG_ZORRO8390=y
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MPPE=m
arch/m68k/configs/apollo_defconfig +0 -1
index 84d4a6ed1707..9980a7904811 100644
@@ -312,7 +312,6 @@ CONFIG_NETCONSOLE_DYNAMIC=y
 CONFIG_TUN=m
 CONFIG_VETH=m
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MPPE=m
arch/m68k/configs/atari_defconfig +0 -1
index 22d8a8581601..41b9104d644a 100644
@@ -332,7 +332,6 @@ CONFIG_NE2000=y
 CONFIG_ETHOC=y
 CONFIG_SMC91X=y
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MPPE=m
arch/m68k/configs/bvme6000_defconfig +0 -1
index 0f79c6382d35..acfd8624e4ca 100644
@@ -311,7 +311,6 @@ CONFIG_TUN=m
 CONFIG_VETH=m
 CONFIG_BVME6000_NET=y
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MPPE=m
arch/m68k/configs/hp300_defconfig +0 -1
index 2bf412a1713c..cbe21fd75c1d 100644
@@ -312,7 +312,6 @@ CONFIG_TUN=m
 CONFIG_VETH=m
 CONFIG_HPLANCE=y
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MPPE=m
arch/m68k/configs/mac_defconfig +0 -1
index 5496f1b60531..d9868e39ab7f 100644
@@ -327,7 +327,6 @@ CONFIG_MAC89x0=y
 CONFIG_MACSONIC=y
 CONFIG_MAC8390=y
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MPPE=m
arch/m68k/configs/multi_defconfig +0 -1
index a8f593b4fc6a..805afac5a666 100644
@@ -388,7 +388,6 @@ CONFIG_ETHOC=y
 CONFIG_SMC91X=y
 CONFIG_PLIP=m
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MPPE=m
arch/m68k/configs/mvme147_defconfig +0 -1
index bbce43b8f7aa..fd4eceb5eb17 100644
@@ -310,7 +310,6 @@ CONFIG_TUN=m
 CONFIG_VETH=m
 CONFIG_MVME147_NET=y
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MPPE=m
arch/m68k/configs/mvme16x_defconfig +0 -1
index a63d09dc8dbd..967a91a28223 100644
@@ -311,7 +311,6 @@ CONFIG_TUN=m
 CONFIG_VETH=m
 CONFIG_MVME16x_NET=y
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MPPE=m
arch/m68k/configs/q40_defconfig +0 -1
index d6b7cbab1700..fea2a67e2cca 100644
@@ -318,7 +318,6 @@ CONFIG_VETH=m
 CONFIG_NE2000=y
 CONFIG_PLIP=m
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MPPE=m
arch/m68k/configs/sun3_defconfig +0 -1
index bee5cdd20637..633fc011ccb5 100644
@@ -308,7 +308,6 @@ CONFIG_VETH=m
 CONFIG_SUN3LANCE=y
 CONFIG_SUN3_82586=y
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MPPE=m
arch/m68k/configs/sun3x_defconfig +0 -1
index ef2b76a06439..38543ccf26c6 100644
@@ -308,7 +308,6 @@ CONFIG_TUN=m
 CONFIG_VETH=m
 CONFIG_SUN3LANCE=y
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MPPE=m
arch/mips/configs/bigsur_defconfig +0 -1
index d2b18d5033be..e53902055ddc 100644
@@ -106,7 +106,6 @@ CONFIG_SB1250_MAC=y
 CONFIG_CHELSIO_T3=m
 CONFIG_NETXEN_NIC=m
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MPPE=m
arch/mips/configs/fuloong2e_defconfig +0 -1
index 8c80c690624c..35ef851ef803 100644
@@ -112,7 +112,6 @@ CONFIG_LXT_PHY=m
 CONFIG_MARVELL_PHY=m
 CONFIG_QSEMI_PHY=m
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MPPE=m
arch/mips/configs/gpr_defconfig +0 -1
index 718a04dbe88d..2bbc03a87d39 100644
@@ -159,7 +159,6 @@ CONFIG_QSEMI_PHY=m
 CONFIG_SMSC_PHY=m
 CONFIG_VITESSE_PHY=m
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MPPE=m
arch/mips/configs/loongson2k_defconfig +0 -1
index 8fd863f4f7b0..323fe69bf818 100644
@@ -189,7 +189,6 @@ CONFIG_STMMAC_ETH=y
 # CONFIG_NET_VENDOR_VIA is not set
 # CONFIG_NET_VENDOR_WIZNET is not set
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MPPE=m
arch/mips/configs/loongson3_defconfig +0 -1
index 12cb1a6a1360..a9b2dd7b2974 100644
@@ -224,7 +224,6 @@ CONFIG_R8169=y
 # CONFIG_NET_VENDOR_VIA is not set
 # CONFIG_NET_VENDOR_WIZNET is not set
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MPPE=m
arch/mips/configs/mtx1_defconfig +0 -1
index 095176c3dbee..b1927fb50e2c 100644
@@ -273,7 +273,6 @@ CONFIG_QSEMI_PHY=m
 CONFIG_SMSC_PHY=m
 CONFIG_VITESSE_PHY=m
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MPPE=m
arch/mips/configs/rb532_defconfig +0 -1
index e2f7d01f4d10..eca70fc35051 100644
@@ -108,7 +108,6 @@ CONFIG_IFB=m
 CONFIG_KORINA=y
 CONFIG_VIA_RHINE=y
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MULTILINK=y
arch/parisc/configs/generic-32bit_defconfig +0 -1
index 3550250e8b87..c6554d1e9bae 100644
@@ -106,7 +106,6 @@ CONFIG_LASI_82596=y
 # CONFIG_NET_VENDOR_TI is not set
 # CONFIG_NET_VENDOR_VIA is not set
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPPOE=m
 # CONFIG_WLAN is not set
arch/powerpc/configs/85xx/ge_imp3a_defconfig +0 -1
index 7beb36a41d45..47465017a5fd 100644
@@ -94,7 +94,6 @@ CONFIG_FS_ENET=y
 CONFIG_UCC_GETH=y
 CONFIG_GIANFAR=y
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MULTILINK=y
arch/powerpc/configs/amigaone_defconfig +0 -1
index 11dfd964465a..4a1aa66d54ff 100644
@@ -59,7 +59,6 @@ CONFIG_8139CP=y
 CONFIG_8139TOO=y
 CONFIG_PHYLIB=y
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MPPE=m
arch/powerpc/configs/chrp32_defconfig +0 -1
index 36662f293587..e9a517bfe98a 100644
@@ -59,7 +59,6 @@ CONFIG_8139TOO=y
 # CONFIG_8139TOO_PIO is not set
 CONFIG_VIA_RHINE=y
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MPPE=m
arch/powerpc/configs/g5_defconfig +0 -1
index 04afb1594890..125751409583 100644
@@ -98,7 +98,6 @@ CONFIG_TIGON3=y
 CONFIG_E1000=y
 CONFIG_SUNGEM=y
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPPOE=m
 CONFIG_PPP_ASYNC=m
arch/powerpc/configs/pmac32_defconfig +0 -1
index 728c8cabfb83..bec560cc6317 100644
@@ -157,7 +157,6 @@ CONFIG_MACE=y
 CONFIG_BMAC=y
 CONFIG_SUNGEM=y
 CONFIG_PPP=y
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=y
 CONFIG_PPP_MULTILINK=y
 CONFIG_PPP_ASYNC=y
arch/powerpc/configs/ppc64_defconfig +0 -1
index 1eb8e3457e8b..098608390ab0 100644
@@ -226,7 +226,6 @@ CONFIG_GELIC_WIRELESS=y
 CONFIG_BROADCOM_PHY=m
 CONFIG_MARVELL_PHY=y
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPPOE=m
 CONFIG_PPP_ASYNC=m
arch/powerpc/configs/ppc64e_defconfig +0 -1
index f365b79c7802..f783d15c3548 100644
@@ -104,7 +104,6 @@ CONFIG_SUNGEM=y
 CONFIG_BROADCOM_PHY=m
 CONFIG_MARVELL_PHY=y
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPPOE=m
 CONFIG_PPP_ASYNC=m
arch/s390/configs/debug_defconfig +0 -1
index 3892d9dd75d9..eaeebe8f918c 100644
@@ -609,7 +609,6 @@ CONFIG_MLX5_SF=y
 # CONFIG_NET_VENDOR_WIZNET is not set
 # CONFIG_NET_VENDOR_XILINX is not set
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MPPE=m
arch/s390/configs/defconfig +0 -1
index 95720e8ad80d..86a5f24e6c6c 100644
@@ -599,7 +599,6 @@ CONFIG_MLX5_SF=y
 # CONFIG_NET_VENDOR_WIZNET is not set
 # CONFIG_NET_VENDOR_XILINX is not set
 CONFIG_PPP=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_FILTER=y
 CONFIG_PPP_MPPE=m
arch/sh/configs/titan_defconfig +0 -1
index 00863ecb228e..0d603c4fbd9e 100644
@@ -184,7 +184,6 @@ CONFIG_PPP_FILTER=y
 CONFIG_PPP_ASYNC=m
 CONFIG_PPP_SYNC_TTY=m
 CONFIG_PPP_DEFLATE=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_MPPE=m
 CONFIG_PPPOE=m
 CONFIG_SLIP=m
arch/sparc/configs/sparc64_defconfig +0 -1
index 34a6a31e6e14..6972b72c3ab7 100644
@@ -107,7 +107,6 @@ CONFIG_PPP_FILTER=y
 CONFIG_PPP_ASYNC=m
 CONFIG_PPP_SYNC_TTY=m
 CONFIG_PPP_DEFLATE=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_MPPE=m
 CONFIG_PPPOE=m
 CONFIG_INPUT_EVDEV=y
drivers/net/Makefile +0 -1
index 88e4c485d6b2..18db7d4c9aab 100644
@@ -57,7 +57,6 @@ obj-$(CONFIG_QCOM_IPA) += ipa/
 obj-$(CONFIG_PLIP) += plip/
 obj-$(CONFIG_PPP) += ppp/
 obj-$(CONFIG_PPP_ASYNC) += ppp/
-obj-$(CONFIG_PPP_BSDCOMP) += ppp/
 obj-$(CONFIG_PPP_DEFLATE) += ppp/
 obj-$(CONFIG_PPP_MPPE) += ppp/
 obj-$(CONFIG_PPP_SYNC_TTY) += ppp/
drivers/net/ppp/Kconfig +0 -18
index 4047f13b83dc..be76d645aa78 100644
@@ -34,24 +34,6 @@ config PPP
 
 if PPP
 
-config PPP_BSDCOMP
-	tristate "PPP BSD-Compress compression"
-	help
-	  Support for the BSD-Compress compression method for PPP, which uses
-	  the LZW compression method to compress each PPP packet before it is
-	  sent over the wire. The machine at the other end of the PPP link
-	  (usually your ISP) has to support the BSD-Compress compression
-	  method as well for this to be useful. Even if they don't support it,
-	  it is safe to say Y here.
-
-	  The PPP Deflate compression method ("PPP Deflate compression",
-	  above) is preferable to BSD-Compress, because it compresses better
-	  and is patent-free.
-
-	  Note that the BSD compression code will always be compiled as a
-	  module; it is called bsd_comp and will show up in the directory
-	  modules once you have said "make modules". If unsure, say N.
-
 config PPP_DEFLATE
 	tristate "PPP Deflate compression"
 	select ZLIB_INFLATE
drivers/net/ppp/Makefile +0 -1
index a815e1497179..7257df727217 100644
@@ -5,7 +5,6 @@
 
 obj-$(CONFIG_PPP) += ppp_generic.o
 obj-$(CONFIG_PPP_ASYNC) += ppp_async.o
-obj-$(CONFIG_PPP_BSDCOMP) += bsd_comp.o
 obj-$(CONFIG_PPP_DEFLATE) += ppp_deflate.o
 obj-$(CONFIG_PPP_MPPE) += ppp_mppe.o
 obj-$(CONFIG_PPP_SYNC_TTY) += ppp_synctty.o
drivers/net/ppp/bsd_comp.c deleted +0 -1170

1,170 lines not on this page · raw message

drivers/net/ppp/ppp_generic.c +1 -1
index 1a610a18893b..339b068fe34f 100644
@@ -2591,7 +2591,7 @@ ppp_decompress_frame(struct ppp *ppp, struct sk_buff *skb)
 		skb_pull(skb, 2);	/* pull off the A/C bytes */
 
 		/* Don't call __ppp_decompress_proto() here, but instead rely on
-		 * corresponding algo (mppe/bsd/deflate) to decompress it.
+		 * corresponding algo (mppe/deflate) to decompress it.
 		 */
 	} else {
 		/* Uncompressed frame - pass to decompressor so it
include/linux/ppp-comp.h +0 -3
index fb847e47f148..e63b3fa80d86 100644
@@ -17,9 +17,6 @@ struct module;
  * various compression methods.
  */
 
-#ifndef DO_BSD_COMPRESS
-#define DO_BSD_COMPRESS	1	/* by default, include BSD-Compress */
-#endif
 #ifndef DO_DEFLATE
 #define DO_DEFLATE	1	/* by default, include Deflate */
 #endif
tools/testing/selftests/net/ppp/config +0 -1
index 843545df8f03..b90b5e90d62c 100644
@@ -3,7 +3,6 @@ CONFIG_L2TP=m
 CONFIG_PACKET=y
 CONFIG_PPP=m
 CONFIG_PPP_ASYNC=m
-CONFIG_PPP_BSDCOMP=m
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPPOE=m
 CONFIG_PPPOE_HASH_BITS_4=y
Signature · 1 line
2.43.0
#1 lore raw
Sashiko has reviewed this patch and found no issues.
Quoted 13 lines

The BSD-Compress decoder assumes that accm is 32 bits, but declares it as unsigned long. On 64-bit systems, consumed code bits survive the left shift and corrupt the next code. An x86-64 PPP-over-PTY loopback test reproduces a fatal bad-code error on the first compressed packet.

pppd normally requests Deflate in preference to BSD-Compress when both methods can be negotiated. If BSD-Compress is selected and encounters this fatal error, pppd disables compression and logs:

Lost compression sync: disabling compression

The link remains up and traffic can continue uncompressed.

Quoted 8 lines

The core compression routine has remained unchanged since Linux 2.1.67 (1997), and the decompression routine since its introduction in Linux [ ... ]

OpenAI Codex assisted with the commit message, cleanup, and PTY testing.

Sashiko has reviewed this patch and found no issues.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1