No description
Find a file
Johannes Berg b89c62555a decnet: fix DN_IFREQ_SIZE
[ Upstream commit 50c2936634 ]

Digging through the ioctls with Al because of the previous
patches, we found that on 64-bit decnet's dn_dev_ioctl()
is wrong, because struct ifreq::ifr_ifru is actually 24
bytes (not 16 as expected from struct sockaddr) due to the
ifru_map and ifru_settings members.

Clearly, decnet expects the ioctl to be called with a struct
like
  struct ifreq_dn {
    char ifr_name[IFNAMSIZ];
    struct sockaddr_dn ifr_addr;
  };

since it does
  struct ifreq *ifr = ...;
  struct sockaddr_dn *sdn = (struct sockaddr_dn *)&ifr->ifr_addr;

This means that DN_IFREQ_SIZE is too big for what it wants on
64-bit, as it is
  sizeof(struct ifreq) - sizeof(struct sockaddr) +
  sizeof(struct sockaddr_dn)

This assumes that sizeof(struct sockaddr) is the size of ifr_ifru
but that isn't true.

Fix this to use offsetof(struct ifreq, ifr_ifru).

This indeed doesn't really matter much - the result is that we
copy in/out 8 bytes more than we should on 64-bit platforms. In
case the "struct ifreq_dn" lands just on the end of a page though
it might lead to faults.

As far as I can tell, it has been like this forever, so it seems
very likely that nobody cares.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-12-05 15:37:56 +01:00
arch um: Make GCOV depend on !KCOV 2019-12-05 15:37:49 +01:00
block block: fix the DISCARD request merge 2019-12-01 09:13:49 +01:00
certs Replace magic for trusting the secondary keyring with #define 2018-09-09 19:55:54 +02:00
crypto crypto: user - support incremental algorithm dumps 2019-12-05 15:37:16 +01:00
Documentation HID: doc: fix wrong data structure reference for UHID_OUTPUT 2019-12-05 15:37:31 +01:00
drivers sfc: suppress duplicate nvmem partition types in efx_ef10_mtd_probe 2019-12-05 15:37:56 +01:00
firmware
fs ocfs2: clear journal dirty flag after shutdown journal 2019-12-05 15:37:51 +01:00
include fork: fix some -Wmissing-prototypes warnings 2019-12-05 15:37:52 +01:00
init fork: fix some -Wmissing-prototypes warnings 2019-12-05 15:37:52 +01:00
ipc ipc/mqueue.c: only perform resource calculation if user valid 2019-08-06 19:05:24 +02:00
kernel fork: fix some -Wmissing-prototypes warnings 2019-12-05 15:37:52 +01:00
lib lib/genalloc.c: include vmalloc.h 2019-12-05 15:37:53 +01:00
mm vmscan: return NODE_RECLAIM_NOSCAN in node_reclaim() when CONFIG_NUMA is n 2019-12-05 15:37:51 +01:00
net decnet: fix DN_IFREQ_SIZE 2019-12-05 15:37:56 +01:00
samples vfio-mdev/samples: Use u8 instead of char for handle functions 2019-12-05 15:37:27 +01:00
scripts scripts/gdb: fix debugging modules compiled with hot/cold partitioning 2019-12-05 15:37:04 +01:00
security ima: always return negative code for error 2019-10-11 18:18:37 +02:00
sound ASoC: kirkwood: fix external clock probe defer 2019-12-05 15:36:49 +01:00
tools usbip: tools: fix fd leakage in the function of read_attr_usbip_status 2019-12-01 09:14:29 +01:00
usr kbuild: clean compressed initramfs image 2019-10-07 18:55:14 +02:00
virt KVM: MMU: Do not treat ZONE_DEVICE pages as being reserved 2019-12-01 09:14:15 +01:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore kbuild: rpm-pkg: keep spec file until make mrproper 2018-02-13 10:19:46 +01:00
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS USB: rio500: Remove Rio 500 kernel driver 2019-10-17 13:43:20 -07:00
Makefile Linux 4.14.157 2019-12-01 09:14:37 +01:00
README

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

This file was moved to Documentation/admin-guide/README.rst

Please notice that there are several guides for kernel developers and users.
These guides can be rendered in a number of formats, like HTML and PDF.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

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.