Netdev List
 help / color / mirror / Atom feed
From: Yingjie Wang <x-professor@outlook.com>
To: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: Yingjie Wang <x-professor@outlook.com>,
	"dsahern@kernel.org" <dsahern@kernel.org>,
	"idosch@nvidia.com" <idosch@nvidia.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@kernel.org" <edumazet@kernel.org>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"horms@kernel.org" <horms@kernel.org>,
	"herbert@gondor.apana.org.au" <herbert@gondor.apana.org.au>,
	"shuah@kernel.org" <shuah@kernel.org>,
	"linux-kselftest@vger.kernel.org"
	<linux-kselftest@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH net 0/2] ipv4: preserve devinet inheritance after unparsed writes
Date: Thu, 29 Oct 2026 14:30:33 +0000	[thread overview]
Message-ID: <cover.1793283257.git.x-professor@outlook.com> (raw)

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


             reply	other threads:[~2026-10-29 14:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29 14:30 Yingjie Wang [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1793283257.git.x-professor@outlook.com \
    --to=x-professor@outlook.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox