The source for the Linux kernel used in Windows Subsystem for Linux 2 (WSL2)
Перейти к файлу
D. Wythe 475f9ff63e net/smc: fix application data exception
There is a certain probability that following
exceptions will occur in the wrk benchmark test:

Running 10s test @ http://11.213.45.6:80
  8 threads and 64 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     3.72ms   13.94ms 245.33ms   94.17%
    Req/Sec     1.96k   713.67     5.41k    75.16%
  155262 requests in 10.10s, 23.10MB read
Non-2xx or 3xx responses: 3

We will find that the error is HTTP 400 error, which is a serious
exception in our test, which means the application data was
corrupted.

Consider the following scenarios:

CPU0                            CPU1

buf_desc->used = 0;
                                cmpxchg(buf_desc->used, 0, 1)
                                deal_with(buf_desc)

memset(buf_desc->cpu_addr,0);

This will cause the data received by a victim connection to be cleared,
thus triggering an HTTP 400 error in the server.

This patch exchange the order between clear used and memset, add
barrier to ensure memory consistency.

Fixes: 1c5526968e ("net/smc: Clear memory when release and reuse buffer")
Signed-off-by: D. Wythe <alibuda@linux.alibaba.com>
Reviewed-by: Wenjia Zhang <wenjia@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-02-20 08:09:27 +00:00
Documentation Certain AMD processors are vulnerable to a cross-thread return address 2023-02-14 09:17:01 -08:00
LICENSES
arch Certain AMD processors are vulnerable to a cross-thread return address 2023-02-14 09:17:01 -08:00
block
certs
crypto
drivers drm fixes for 6.2 final 2023-02-16 20:23:32 -08:00
fs nfsd-6.2 fixes: 2023-02-15 11:48:56 -08:00
include drm fixes for 6.2 final 2023-02-16 20:23:32 -08:00
init
io_uring
ipc
kernel tracing: Make trace_define_field_ext() static 2023-02-15 11:31:34 -08:00
lib 12 hotfixes, mostly against mm/. Five of these fixes are cc:stable. 2023-02-13 14:09:20 -08:00
mm 12 hotfixes, mostly against mm/. Five of these fixes are cc:stable. 2023-02-13 14:09:20 -08:00
net net/smc: fix application data exception 2023-02-20 08:09:27 +00:00
rust
samples
scripts 12 hotfixes, mostly against mm/. Five of these fixes are cc:stable. 2023-02-13 14:09:20 -08:00
security apparmor: Fix regression in compat permissions for getattr 2023-02-15 11:24:38 -08:00
sound sound fixes for 6.2-rc8 2023-02-10 08:37:48 -08:00
tools Fixes from the main networking tree only. 2023-02-16 12:13:58 -08:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap 12 hotfixes, mostly against mm/. Five of these fixes are cc:stable. 2023-02-13 14:09:20 -08:00
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS stop mainaining UUID 2023-02-16 11:53:01 -08:00
Makefile Linux 6.2-rc8 2023-02-12 14:10:17 -08:00
README

README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.