No description
  • C 98.2%
  • Assembly 1%
  • Makefile 0.3%
  • Shell 0.2%
  • Python 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Gustavo A. R. Silva 3aa4e4d7cc ethtool: ioctl: Fix out-of-bounds warning in store_link_ksettings_for_user()
[ Upstream commit c1d9e34e11281a8ba1a1c54e4db554232a461488 ]

Fix the following out-of-bounds warning:

net/ethtool/ioctl.c:492:2: warning: 'memcpy' offset [49, 84] from the object at 'link_usettings' is out of the bounds of referenced subobject 'base' with type 'struct ethtool_link_settings' at offset 0 [-Warray-bounds]

The problem is that the original code is trying to copy data into a
some struct members adjacent to each other in a single call to
memcpy(). This causes a legitimate compiler warning because memcpy()
overruns the length of &link_usettings.base. Fix this by directly
using &link_usettings and _from_ as destination and source addresses,
instead.

This helps with the ongoing efforts to globally enable -Warray-bounds
and get us closer to being able to tighten the FORTIFY_SOURCE routines
on memcpy().

Link: https://github.com/KSPP/linux/issues/109
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-19 10:08:23 +02:00
arch powerpc/smp: Set numa node before updating mask 2021-05-19 10:08:23 +02:00
block
certs
crypto
Documentation
drivers drm/amd/display: Force vsync flip when reconfiguring MPCC 2021-05-19 10:08:22 +02:00
fs cuse: prevent clone 2021-05-19 10:08:22 +02:00
include i2c: Add I2C_AQ_NO_REP_START adapter quirk 2021-05-19 10:08:22 +02:00
init
ipc
kernel
lib
LICENSES
mm
net ethtool: ioctl: Fix out-of-bounds warning in store_link_ksettings_for_user() 2021-05-19 10:08:23 +02:00
samples
scripts kconfig: nconf: stop endless search loops 2021-05-19 10:08:23 +02:00
security
sound ASoC: rt286: Generalize support for ALC3263 codec 2021-05-19 10:08:23 +02:00
tools selftests: Set CC to clang in lib.mk if LLVM is set 2021-05-19 10:08:22 +02:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
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.