No description
Find a file
Viresh Kumar 85cf551905 cpufreq: Use struct kobj_attribute instead of struct global_attr
commit 625c85a62c upstream.

The cpufreq_global_kobject is created using kobject_create_and_add()
helper, which assigns the kobj_type as dynamic_kobj_ktype and show/store
routines are set to kobj_attr_show() and kobj_attr_store().

These routines pass struct kobj_attribute as an argument to the
show/store callbacks. But all the cpufreq files created using the
cpufreq_global_kobject expect the argument to be of type struct
attribute. Things work fine currently as no one accesses the "attr"
argument. We may not see issues even if the argument is used, as struct
kobj_attribute has struct attribute as its first element and so they
will both get same address.

But this is logically incorrect and we should rather use struct
kobj_attribute instead of struct global_attr in the cpufreq core and
drivers and the show/store callbacks should take struct kobj_attribute
as argument instead.

This bug is caught using CFI CLANG builds in android kernel which
catches mismatch in function prototypes for such callbacks.

Reported-by: Donghee Han <dh.han@samsung.com>
Reported-by: Sangkyu Kim <skwith.kim@samsung.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-13 14:03:06 -07:00
arch x86/uaccess: Don't leak the AC flag into __put_user() value evaluation 2019-03-05 17:58:03 +01:00
block blk-mq: fix a hung issue when fsync 2019-02-20 10:20:44 +01:00
certs Replace magic for trusting the secondary keyring with #define 2018-09-09 19:55:54 +02:00
crypto net: crypto set sk to NULL when af_alg_release. 2019-02-23 09:06:42 +01:00
Documentation dt-bindings: eeprom: at24: add "atmel,24c2048" compatible string 2019-02-20 10:20:44 +01:00
drivers cpufreq: Use struct kobj_attribute instead of struct global_attr 2019-03-13 14:03:06 -07:00
firmware License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fs writeback: synchronize sync(2) against cgroup writeback membership switches 2019-03-05 17:58:01 +01:00
include cpufreq: Use struct kobj_attribute instead of struct global_attr 2019-03-13 14:03:06 -07:00
init init: rename and re-order boot_cpu_state_init() 2018-08-15 18:12:48 +02:00
ipc ipc/sem.c: prevent queue.status tearing in semop 2018-09-05 09:26:30 +02:00
kernel locking/rwsem: Fix (possible) missed wakeup 2019-03-05 17:58:00 +01:00
lib seq_buf: Make seq_buf_puts() null-terminate the buffer 2019-02-12 19:46:08 +01:00
mm mm: enforce min addr even if capable() in expand_downwards() 2019-03-05 17:58:02 +01:00
net cfg80211: extend range deviation for DMG 2019-03-05 17:58:02 +01:00
samples samples: mei: use /dev/mei0 instead of /dev/mei 2019-02-15 08:09:12 +01:00
scripts scripts/gdb: fix lx-version string output 2019-02-12 19:46:10 +01:00
security KEYS: always initialize keyring_index_key::desc_len 2019-02-27 10:08:07 +01:00
sound ASoC: imx-audmux: change snprintf to scnprintf for possible overflow 2019-03-05 17:57:59 +01:00
tools selftests: gpio-mockup-chardev: Check asprintf() for error 2019-03-05 17:57:59 +01:00
usr initramfs: fix initramfs rebuilds w/ compression after disabling 2017-11-03 07:39:19 -07:00
virt kvm: fix kvm_ioctl_create_device() reference counting (CVE-2019-6974) 2019-02-12 19:46:13 +01:00
.cocciconfig
.get_maintainer.ignore
.gitattributes .gitattributes: set git diff driver for C source code files 2016-10-07 18:46:30 -07:00
.gitignore kbuild: rpm-pkg: keep spec file until make mrproper 2018-02-13 10:19:46 +01:00
.mailmap .mailmap: Add Maciej W. Rozycki's Imagination e-mail address 2017-11-10 12:16:15 -08:00
COPYING
CREDITS MAINTAINERS: update TPM driver infrastructure changes 2017-11-09 17:58:40 -08:00
Kbuild License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
MAINTAINERS MAINTAINERS: Add Sasha as a stable branch maintainer 2018-12-01 09:42:50 +01:00
Makefile Linux 4.14.105 2019-03-05 17:58:03 +01:00
README README: add a new README file, pointing to the Documentation/ 2016-10-24 08:12:35 -02:00

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.