Netdev List
 help / color / mirror / Atom feed
* [PATCH net 0/2] ipv4: preserve devinet inheritance after unparsed writes
@ 2026-10-29 14:30 Yingjie Wang
  2026-10-29 14:30 ` [PATCH net 1/2] ipv4: devinet: update inheritance state only after parsed writes Yingjie Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yingjie Wang @ 2026-10-29 14:30 UTC (permalink / raw)
  To: netdev@vger.kernel.org
  Cc: Yingjie Wang, dsahern@kernel.org, idosch@nvidia.com,
	davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
	pabeni@redhat.com, horms@kernel.org, herbert@gondor.apana.org.au,
	shuah@kernel.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org

devinet_conf_proc() currently marks per-device IPv4 settings as
explicitly configured even when a sysctl write fails or is ignored before
parsing a value. A later conf/default update then skips the device.

Patch 1 updates inheritance state and runs post-set handling only after
successful integer conversion. Patch 2 adds a regression test for a
failed write and the complementary valid same-value case. Before either
case, the test verifies that lo still inherits conf/default, so inherited
init_net state cannot turn the result into a false pass.

On the current net/main base, the failed-write selftest case fails while
the same-value control passes. Both cases pass with this series. A
separate eight-case VM test also covers invalid, blank, zero-byte and
strict nonzero-offset writes plus valid-write controls.

Full x86-64 allyesconfig and allmodconfig builds with W=1 completed after
disabling CONFIG_WERROR; the changed object produced no diagnostics. An
i386 W=1 build of net/ipv4/devinet.o also passed.

checkpatch reports the expected CONST_STRUCT warning for the mutable
call-local ctl_table copy in patch 1 and the generic MAINTAINERS prompt
for the new selftest in patch 2. The copy carries per-call converter
state, and tools/testing/selftests/net is already covered by NETWORKING
[GENERAL].

Yingjie Wang (2):
  ipv4: devinet: update inheritance state only after parsed writes
  selftests: net: test devinet inheritance after failed writes

 net/ipv4/devinet.c                          |  29 +++++-
 tools/testing/selftests/net/Makefile        |   1 +
 tools/testing/selftests/net/devinet_conf.sh | 101 ++++++++++++++++++++
 3 files changed, 128 insertions(+), 3 deletions(-)
 create mode 100755 tools/testing/selftests/net/devinet_conf.sh


base-commit: fcc00b15cb21a6de76826e5012b2c758505f5e65
-- 
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-29 14:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-29 14:30 [PATCH net 0/2] ipv4: preserve devinet inheritance after unparsed writes Yingjie Wang
2026-10-29 14:30 ` [PATCH net 1/2] ipv4: devinet: update inheritance state only after parsed writes Yingjie Wang
2026-10-29 14:30 ` [PATCH net 2/2] selftests: net: test devinet inheritance after failed writes Yingjie Wang
2026-10-29 14:34 ` [PATCH net 0/2] ipv4: preserve devinet inheritance after unparsed writes netdev-bot+sinfo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox