android_kernel_motorola_sm6375/drivers/acpi
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Neal Liu 476c942d9b BACKPORT: FROMLIST: cpuidle: change enter_s2idle() prototype
Control Flow Integrity(CFI) is a security mechanism that disallows
changes to the original control flow graph of a compiled binary,
making it significantly harder to perform such attacks.

init_state_node() assign same function callback to different
function pointer declarations.

static int init_state_node(struct cpuidle_state *idle_state,
                           const struct of_device_id *matches,
                           struct device_node *state_node) { ...
        idle_state->enter = match_id->data; ...
        idle_state->enter_s2idle = match_id->data; }

Function declarations:

struct cpuidle_state { ...
        int (*enter) (struct cpuidle_device *dev,
                      struct cpuidle_driver *drv,
                      int index);

        void (*enter_s2idle) (struct cpuidle_device *dev,
                              struct cpuidle_driver *drv,
                              int index); };

In this case, either enter() or enter_s2idle() would cause CFI check
failed since they use same callee.

Align function prototype of enter() since it needs return value for
some use cases. The return value of enter_s2idle() is no
need currently.

Bug: 159445192
Bug: 159672235
Change-Id: Iffc9e1b6a17471ca4291865ab3dc8803303a38ce
Link: https://lore.kernel.org/lkml/1595820346-4361-2-git-send-email-neal.liu@mediatek.com/
Signed-off-by: Neal Liu <neal.liu@mediatek.com>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
2020-07-29 14:37:49 +00:00
..
acpica ACPICA: Dispatcher: add status checks 2020-06-22 09:30:52 +02:00
apei x86/mm: split vmalloc_sync_all() 2020-03-25 08:25:58 +01:00
arm64 ACPI/IORT: Fix PMCG node single ID mapping handling 2020-06-22 09:30:54 +02:00
dptf
hmat
nfit acpi/nfit: improve bounds checking for 'func' 2020-04-21 09:04:52 +02:00
pmic
x86
ac.c
acpi_adxl.c
acpi_amba.c
acpi_apd.c
acpi_cmos_rtc.c
acpi_configfs.c ACPI: configfs: Disallow loading ACPI tables when locked down 2020-06-30 15:37:07 -04:00
acpi_dbg.c
acpi_extlog.c
acpi_ipmi.c
acpi_lpat.c
acpi_lpit.c
acpi_lpss.c
acpi_memhotplug.c
acpi_pad.c
acpi_platform.c ACPI: platform: Unregister stale platform devices 2020-01-26 10:01:04 +01:00
acpi_pnp.c
acpi_processor.c
acpi_tad.c
acpi_video.c
acpi_watchdog.c ACPI: watchdog: Allow disabling WDAT at boot 2020-03-21 08:11:47 +01:00
battery.c ACPI / battery: Deal better with neither design nor full capacity not being reported 2020-02-11 04:35:20 -08:00
bgrt.c
blacklist.c
bus.c
button.c ACPI: button: Add DMI quirk for Razer Blade Stealth 13 late 2019 lid switch 2020-02-24 08:36:43 +01:00
cm_sbs.c
container.c
cppc_acpi.c ACPI: CPPC: Fix reference count leak in acpi_cppc_processor_probe() 2020-06-17 16:40:28 +02:00
custom_method.c
debugfs.c
device_pm.c ACPI: PM: Avoid using power resources if there are none for D0 2020-06-17 16:40:28 +02:00
device_sysfs.c
dock.c
ec.c ACPI: EC: PM: Avoid flushing EC work when EC GPE is inactive 2020-05-27 17:46:10 +02:00
ec_sys.c
event.c
evged.c ACPI: GED: use correct trigger type field in _Exx / _Lxx handling 2020-06-22 09:30:49 +02:00
fan.c
glue.c
hed.c
internal.h ACPI: EC: PM: Avoid premature returns from acpi_s2idle_wake() 2020-05-20 08:20:18 +02:00
ioapic.c
irq.c
Kconfig
Makefile
numa.c
nvs.c
osi.c
osl.c
pci_irq.c
pci_link.c
pci_mcfg.c
pci_root.c
pci_slot.c
power.c
pptt.c
proc.c
processor_core.c
processor_driver.c
processor_idle.c BACKPORT: FROMLIST: cpuidle: change enter_s2idle() prototype 2020-07-29 14:37:49 +00:00
processor_pdc.c
processor_perflib.c
processor_thermal.c
processor_throttling.c x86: ACPI: fix CPU hotplug deadlock 2020-04-23 10:36:38 +02:00
property.c
reboot.c
resource.c
sbs.c
sbshc.c
sbshc.h
scan.c ACPI: PM: Avoid using power resources if there are none for D0 2020-06-17 16:40:28 +02:00
sleep.c ACPI: EC: PM: Avoid flushing EC work when EC GPE is inactive 2020-05-27 17:46:10 +02:00
sleep.h ACPI: PM: Add acpi_[un]register_wakeup_handler() 2020-04-13 10:48:08 +02:00
spcr.c
sysfs.c ACPI: sysfs: Fix pm_profile_attr type 2020-06-30 15:37:06 -04:00
tables.c
thermal.c
utils.c
video_detect.c ACPI: video: Use native backlight on Acer TravelMate 5735Z 2020-07-22 09:33:00 +02:00
wakeup.c ACPI: PM: Add acpi_[un]register_wakeup_handler() 2020-04-13 10:48:08 +02:00