Skip to content

Commit 2975dbd

Browse files
committed
Merge tag 'net-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull more networking updates from Jakub Kicinski: "Networking fixes and rethook patches. Features: - kprobes: rethook: x86: replace kretprobe trampoline with rethook Current release - regressions: - sfc: avoid null-deref on systems without NUMA awareness in the new queue sizing code Current release - new code bugs: - vxlan: do not feed vxlan_vnifilter_dump_dev with non-vxlan devices - eth: lan966x: fix null-deref on PHY pointer in timestamp ioctl when interface is down Previous releases - always broken: - openvswitch: correct neighbor discovery target mask field in the flow dump - wireguard: ignore v6 endpoints when ipv6 is disabled and fix a leak - rxrpc: fix call timer start racing with call destruction - rxrpc: fix null-deref when security type is rxrpc_no_security - can: fix UAF bugs around echo skbs in multiple drivers Misc: - docs: move netdev-FAQ to the 'process' section of the documentation" * tag 'net-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (57 commits) vxlan: do not feed vxlan_vnifilter_dump_dev with non vxlan devices openvswitch: Add recirc_id to recirc warning rxrpc: fix some null-ptr-deref bugs in server_key.c rxrpc: Fix call timer start racing with call destruction net: hns3: fix software vlan talbe of vlan 0 inconsistent with hardware net: hns3: fix the concurrency between functions reading debugfs docs: netdev: move the netdev-FAQ to the process pages docs: netdev: broaden the new vs old code formatting guidelines docs: netdev: call out the merge window in tag checking docs: netdev: add missing back ticks docs: netdev: make the testing requirement more stringent docs: netdev: add a question about re-posting frequency docs: netdev: rephrase the 'should I update patchwork' question docs: netdev: rephrase the 'Under review' question docs: netdev: shorten the name and mention msgid for patch status docs: netdev: note that RFC postings are allowed any time docs: netdev: turn the net-next closed into a Warning docs: netdev: move the patch marking section up docs: netdev: minor reword docs: netdev: replace references to old archives ...
2 parents 93235e3 + 9d57074 commit 2975dbd

File tree

58 files changed

+588
-337
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+588
-337
lines changed

Documentation/bpf/bpf_devel_QA.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ when:
658658

659659
.. Links
660660
.. _Documentation/process/: https://www.kernel.org/doc/html/latest/process/
661-
.. _netdev-FAQ: ../networking/netdev-FAQ.rst
661+
.. _netdev-FAQ: Documentation/process/maintainer-netdev.rst
662662
.. _selftests:
663663
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/selftests/bpf/
664664
.. _Documentation/dev-tools/kselftest.rst:

Documentation/devicetree/bindings/net/qcom,ethqos.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ This device has following properties:
77

88
Required properties:
99

10-
- compatible: Should be qcom,qcs404-ethqos"
10+
- compatible: Should be one of:
11+
"qcom,qcs404-ethqos"
12+
"qcom,sm8150-ethqos"
1113

1214
- reg: Address and length of the register set for the device
1315

Documentation/networking/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
Linux Networking Documentation
22
==============================
33

4+
Refer to :ref:`netdev-FAQ` for a guide on netdev development process specifics.
5+
46
Contents:
57

68
.. toctree::
79
:maxdepth: 2
810

9-
netdev-FAQ
1011
af_xdp
1112
bareudp
1213
batman-adv

Documentation/process/maintainer-handbooks.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ Contents:
1616
:maxdepth: 2
1717

1818
maintainer-tip
19+
maintainer-netdev

Documentation/networking/netdev-FAQ.rst renamed to Documentation/process/maintainer-netdev.rst

Lines changed: 68 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@ Note that some subsystems (e.g. wireless drivers) which have a high
1616
volume of traffic have their own specific mailing lists.
1717

1818
The netdev list is managed (like many other Linux mailing lists) through
19-
VGER (http://vger.kernel.org/) and archives can be found below:
19+
VGER (http://vger.kernel.org/) with archives available at
20+
https://lore.kernel.org/netdev/
2021

21-
- http://marc.info/?l=linux-netdev
22-
- http://www.spinics.net/lists/netdev/
23-
24-
Aside from subsystems like that mentioned above, all network-related
22+
Aside from subsystems like those mentioned above, all network-related
2523
Linux development (i.e. RFC, review, comments, etc.) takes place on
2624
netdev.
2725

@@ -37,6 +35,17 @@ for the future release. You can find the trees here:
3735
- https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
3836
- https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
3937

38+
How do I indicate which tree (net vs. net-next) my patch should be in?
39+
----------------------------------------------------------------------
40+
To help maintainers and CI bots you should explicitly mark which tree
41+
your patch is targeting. Assuming that you use git, use the prefix
42+
flag::
43+
44+
git format-patch --subject-prefix='PATCH net-next' start..finish
45+
46+
Use ``net`` instead of ``net-next`` (always lower case) in the above for
47+
bug-fix ``net`` content.
48+
4049
How often do changes from these trees make it to the mainline Linus tree?
4150
-------------------------------------------------------------------------
4251
To understand this, you need to know a bit of background information on
@@ -61,8 +70,12 @@ relating to vX.Y
6170
An announcement indicating when ``net-next`` has been closed is usually
6271
sent to netdev, but knowing the above, you can predict that in advance.
6372

64-
IMPORTANT: Do not send new ``net-next`` content to netdev during the
65-
period during which ``net-next`` tree is closed.
73+
.. warning::
74+
Do not send new ``net-next`` content to netdev during the
75+
period during which ``net-next`` tree is closed.
76+
77+
RFC patches sent for review only are obviously welcome at any time
78+
(use ``--subject-prefix='RFC net-next'`` with ``git format-patch``).
6679

6780
Shortly after the two weeks have passed (and vX.Y-rc1 is released), the
6881
tree for ``net-next`` reopens to collect content for the next (vX.Y+1)
@@ -90,41 +103,35 @@ Load the mainline (Linus) page here:
90103

91104
and note the top of the "tags" section. If it is rc1, it is early in
92105
the dev cycle. If it was tagged rc7 a week ago, then a release is
93-
probably imminent.
106+
probably imminent. If the most recent tag is a final release tag
107+
(without an ``-rcN`` suffix) - we are most likely in a merge window
108+
and ``net-next`` is closed.
94109

95-
How do I indicate which tree (net vs. net-next) my patch should be in?
96-
----------------------------------------------------------------------
97-
Firstly, think whether you have a bug fix or new "next-like" content.
98-
Then once decided, assuming that you use git, use the prefix flag, i.e.
99-
::
100-
101-
git format-patch --subject-prefix='PATCH net-next' start..finish
102-
103-
Use ``net`` instead of ``net-next`` (always lower case) in the above for
104-
bug-fix ``net`` content. If you don't use git, then note the only magic
105-
in the above is just the subject text of the outgoing e-mail, and you
106-
can manually change it yourself with whatever MUA you are comfortable
107-
with.
108-
109-
I sent a patch and I'm wondering what happened to it - how can I tell whether it got merged?
110-
--------------------------------------------------------------------------------------------
110+
How can I tell the status of a patch I've sent?
111+
-----------------------------------------------
111112
Start by looking at the main patchworks queue for netdev:
112113

113114
https://patchwork.kernel.org/project/netdevbpf/list/
114115

115116
The "State" field will tell you exactly where things are at with your
116-
patch.
117+
patch. Patches are indexed by the ``Message-ID`` header of the emails
118+
which carried them so if you have trouble finding your patch append
119+
the value of ``Message-ID`` to the URL above.
117120

118-
The above only says "Under Review". How can I find out more?
119-
-------------------------------------------------------------
121+
How long before my patch is accepted?
122+
-------------------------------------
120123
Generally speaking, the patches get triaged quickly (in less than
121-
48h). So be patient. Asking the maintainer for status updates on your
124+
48h). But be patient, if your patch is active in patchwork (i.e. it's
125+
listed on the project's patch list) the chances it was missed are close to zero.
126+
Asking the maintainer for status updates on your
122127
patch is a good way to ensure your patch is ignored or pushed to the
123128
bottom of the priority list.
124129

125-
I submitted multiple versions of the patch series. Should I directly update patchwork for the previous versions of these patch series?
126-
--------------------------------------------------------------------------------------------------------------------------------------
127-
No, please don't interfere with the patch status on patchwork, leave
130+
Should I directly update patchwork state of my own patches?
131+
-----------------------------------------------------------
132+
It may be tempting to help the maintainers and update the state of your
133+
own patches when you post a new version or spot a bug. Please do not do that.
134+
Interfering with the patch status on patchwork will only cause confusion. Leave
128135
it to the maintainer to figure out what is the most recent and current
129136
version that should be applied. If there is any doubt, the maintainer
130137
will reply and ask what should be done.
@@ -135,6 +142,17 @@ No, please resend the entire patch series and make sure you do number your
135142
patches such that it is clear this is the latest and greatest set of patches
136143
that can be applied.
137144

145+
I have received review feedback, when should I post a revised version of the patches?
146+
-------------------------------------------------------------------------------------
147+
Allow at least 24 hours to pass between postings. This will ensure reviewers
148+
from all geographical locations have a chance to chime in. Do not wait
149+
too long (weeks) between postings either as it will make it harder for reviewers
150+
to recall all the context.
151+
152+
Make sure you address all the feedback in your new posting. Do not post a new
153+
version of the code if the discussion about the previous version is still
154+
ongoing, unless directly instructed by a reviewer.
155+
138156
I submitted multiple versions of a patch series and it looks like a version other than the last one has been accepted, what should I do?
139157
----------------------------------------------------------------------------------------------------------------------------------------
140158
There is no revert possible, once it is pushed out, it stays like that.
@@ -165,10 +183,10 @@ it is requested that you make it look like this::
165183
* another line of text
166184
*/
167185

168-
I am working in existing code that has the former comment style and not the latter. Should I submit new code in the former style or the latter?
169-
-----------------------------------------------------------------------------------------------------------------------------------------------
170-
Make it the latter style, so that eventually all code in the domain
171-
of netdev is of this format.
186+
I am working in existing code which uses non-standard formatting. Which formatting should I use?
187+
------------------------------------------------------------------------------------------------
188+
Make your code follow the most recent guidelines, so that eventually all code
189+
in the domain of netdev is in the preferred format.
172190

173191
I found a bug that might have possible security implications or similar. Should I mail the main netdev maintainer off-list?
174192
---------------------------------------------------------------------------------------------------------------------------
@@ -180,11 +198,15 @@ as possible alternative mechanisms.
180198

181199
What level of testing is expected before I submit my change?
182200
------------------------------------------------------------
183-
If your changes are against ``net-next``, the expectation is that you
184-
have tested by layering your changes on top of ``net-next``. Ideally
185-
you will have done run-time testing specific to your change, but at a
186-
minimum, your changes should survive an ``allyesconfig`` and an
187-
``allmodconfig`` build without new warnings or failures.
201+
At the very minimum your changes must survive an ``allyesconfig`` and an
202+
``allmodconfig`` build with ``W=1`` set without new warnings or failures.
203+
204+
Ideally you will have done run-time testing specific to your change,
205+
and the patch series contains a set of kernel selftest for
206+
``tools/testing/selftests/net`` or using the KUnit framework.
207+
208+
You are expected to test your changes on top of the relevant networking
209+
tree (``net`` or ``net-next``) and not e.g. a stable tree or ``linux-next``.
188210

189211
How do I post corresponding changes to user space components?
190212
-------------------------------------------------------------
@@ -198,7 +220,7 @@ or the user space project is not reviewed on netdev include a link
198220
to a public repo where user space patches can be seen.
199221

200222
In case user space tooling lives in a separate repository but is
201-
reviewed on netdev (e.g. patches to `iproute2` tools) kernel and
223+
reviewed on netdev (e.g. patches to ``iproute2`` tools) kernel and
202224
user space patches should form separate series (threads) when posted
203225
to the mailing list, e.g.::
204226

@@ -231,18 +253,18 @@ traffic if we can help it.
231253
netdevsim is great, can I extend it for my out-of-tree tests?
232254
-------------------------------------------------------------
233255

234-
No, `netdevsim` is a test vehicle solely for upstream tests.
235-
(Please add your tests under tools/testing/selftests/.)
256+
No, ``netdevsim`` is a test vehicle solely for upstream tests.
257+
(Please add your tests under ``tools/testing/selftests/``.)
236258

237-
We also give no guarantees that `netdevsim` won't change in the future
259+
We also give no guarantees that ``netdevsim`` won't change in the future
238260
in a way which would break what would normally be considered uAPI.
239261

240262
Is netdevsim considered a "user" of an API?
241263
-------------------------------------------
242264

243265
Linux kernel has a long standing rule that no API should be added unless
244-
it has a real, in-tree user. Mock-ups and tests based on `netdevsim` are
245-
strongly encouraged when adding new APIs, but `netdevsim` in itself
266+
it has a real, in-tree user. Mock-ups and tests based on ``netdevsim`` are
267+
strongly encouraged when adding new APIs, but ``netdevsim`` in itself
246268
is **not** considered a use case/user.
247269

248270
Any other tips to help ensure my net/net-next patch gets OK'd?

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13653,6 +13653,7 @@ B: mailto:[email protected]
1365313653
T: git git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
1365413654
T: git git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
1365513655
F: Documentation/networking/
13656+
F: Documentation/process/maintainer-netdev.rst
1365613657
F: include/linux/in.h
1365713658
F: include/linux/net.h
1365813659
F: include/linux/netdevice.h

arch/Kconfig

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,13 @@ config ARCH_USE_BUILTIN_BSWAP
164164

165165
config KRETPROBES
166166
def_bool y
167-
depends on KPROBES && HAVE_KRETPROBES
167+
depends on KPROBES && (HAVE_KRETPROBES || HAVE_RETHOOK)
168+
169+
config KRETPROBE_ON_RETHOOK
170+
def_bool y
171+
depends on HAVE_RETHOOK
172+
depends on KRETPROBES
173+
select RETHOOK
168174

169175
config USER_RETURN_NOTIFIER
170176
bool

arch/x86/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ config X86
224224
select HAVE_KPROBES_ON_FTRACE
225225
select HAVE_FUNCTION_ERROR_INJECTION
226226
select HAVE_KRETPROBES
227+
select HAVE_RETHOOK
227228
select HAVE_KVM
228229
select HAVE_LIVEPATCH if X86_64
229230
select HAVE_MIXED_BREAKPOINTS_REGS

arch/x86/include/asm/unwind.h

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include <linux/sched.h>
66
#include <linux/ftrace.h>
7-
#include <linux/kprobes.h>
7+
#include <linux/rethook.h>
88
#include <asm/ptrace.h>
99
#include <asm/stacktrace.h>
1010

@@ -16,7 +16,7 @@ struct unwind_state {
1616
unsigned long stack_mask;
1717
struct task_struct *task;
1818
int graph_idx;
19-
#ifdef CONFIG_KRETPROBES
19+
#if defined(CONFIG_RETHOOK)
2020
struct llist_node *kr_cur;
2121
#endif
2222
bool error;
@@ -104,19 +104,18 @@ void unwind_module_init(struct module *mod, void *orc_ip, size_t orc_ip_size,
104104
#endif
105105

106106
static inline
107-
unsigned long unwind_recover_kretprobe(struct unwind_state *state,
108-
unsigned long addr, unsigned long *addr_p)
107+
unsigned long unwind_recover_rethook(struct unwind_state *state,
108+
unsigned long addr, unsigned long *addr_p)
109109
{
110-
#ifdef CONFIG_KRETPROBES
111-
return is_kretprobe_trampoline(addr) ?
112-
kretprobe_find_ret_addr(state->task, addr_p, &state->kr_cur) :
113-
addr;
114-
#else
115-
return addr;
110+
#ifdef CONFIG_RETHOOK
111+
if (is_rethook_trampoline(addr))
112+
return rethook_find_ret_addr(state->task, (unsigned long)addr_p,
113+
&state->kr_cur);
116114
#endif
115+
return addr;
117116
}
118117

119-
/* Recover the return address modified by kretprobe and ftrace_graph. */
118+
/* Recover the return address modified by rethook and ftrace_graph. */
120119
static inline
121120
unsigned long unwind_recover_ret_addr(struct unwind_state *state,
122121
unsigned long addr, unsigned long *addr_p)
@@ -125,7 +124,7 @@ unsigned long unwind_recover_ret_addr(struct unwind_state *state,
125124

126125
ret = ftrace_graph_ret_addr(state->task, &state->graph_idx,
127126
addr, addr_p);
128-
return unwind_recover_kretprobe(state, ret, addr_p);
127+
return unwind_recover_rethook(state, ret, addr_p);
129128
}
130129

131130
/*

arch/x86/kernel/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o
103103
obj-$(CONFIG_FTRACE_SYSCALLS) += ftrace.o
104104
obj-$(CONFIG_X86_TSC) += trace_clock.o
105105
obj-$(CONFIG_TRACING) += trace.o
106+
obj-$(CONFIG_RETHOOK) += rethook.o
106107
obj-$(CONFIG_CRASH_CORE) += crash_core_$(BITS).o
107108
obj-$(CONFIG_KEXEC_CORE) += machine_kexec_$(BITS).o
108109
obj-$(CONFIG_KEXEC_CORE) += relocate_kernel_$(BITS).o crash.o

arch/x86/kernel/kprobes/common.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include <asm/asm.h>
88
#include <asm/frame.h>
9+
#include <asm/insn.h>
910

1011
#ifdef CONFIG_X86_64
1112

0 commit comments

Comments
 (0)