Exploit databaseDownload repository ZIP
GH-b6f78b211ff4ea5e7b3ebffe1f088758
abrarkhan/linux-4.19.72_cve-2020-24490
Sources for CVE-2020-24490
5 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files45
abrarkhan/linux-4.19.72_cve-2020-24490Revision aa3f6929b62b
- ↑..Parent directory
- ams/
- Kconfig
- Makefile
- adb-iop.c
- adb.c
- adbhid.c
- ans-lcd.c
- ans-lcd.h
- apm_emu.c
- mac_hid.c
- macio-adb.c
- macio_asic.c
- macio_sysfs.c
- mediabay.c
- rack-meter.c
- smu.c
- therm_adt746x.c
- therm_windtunnel.c
- via-cuda.c
- via-macii.c
- via-pmu-backlight.c
- via-pmu-event.c
- via-pmu-event.h
- via-pmu-led.c
- via-pmu.c
- windfarm.h
- windfarm_ad7417_sensor.c
- windfarm_core.c
- windfarm_cpufreq_clamp.c
- windfarm_fcu_controls.c
- windfarm_lm75_sensor.c
- windfarm_lm87_sensor.c
- windfarm_max6690_sensor.c
- windfarm_mpu.h
- windfarm_pid.c
- windfarm_pid.h
- windfarm_pm112.c
- windfarm_pm121.c
- windfarm_pm72.c
- windfarm_pm81.c
- windfarm_pm91.c
- windfarm_rm31.c
- windfarm_smu_controls.c
- windfarm_smu_sat.c
- windfarm_smu_sensors.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
drivers/macintosh/via-pmu-event.c
C · 2,121 bytes/*
* via-pmu event device for reporting some events that come through the PMU
*
* Copyright 2006 Johannes Berg <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
* NON INFRINGEMENT. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#include <linux/input.h>
#include <linux/adb.h>
#include <linux/pmu.h>
#include "via-pmu-event.h"
static struct input_dev *pmu_input_dev;
static int __init via_pmu_event_init(void)
{
int err;
/* do other models report button/lid status? */
if (pmu_get_model() != PMU_KEYLARGO_BASED)
return -ENODEV;
pmu_input_dev = input_allocate_device();
if (!pmu_input_dev)
return -ENOMEM;
pmu_input_dev->name = "PMU";
pmu_input_dev->id.bustype = BUS_HOST;
pmu_input_dev->id.vendor = 0x0001;
pmu_input_dev->id.product = 0x0001;
pmu_input_dev->id.version = 0x0100;
set_bit(EV_KEY, pmu_input_dev->evbit);
set_bit(EV_SW, pmu_input_dev->evbit);
set_bit(KEY_POWER, pmu_input_dev->keybit);
set_bit(SW_LID, pmu_input_dev->swbit);
err = input_register_device(pmu_input_dev);
if (err)
input_free_device(pmu_input_dev);
return err;
}
void via_pmu_event(int key, int down)
{
if (unlikely(!pmu_input_dev))
return;
switch (key) {
case PMU_EVT_POWER:
input_report_key(pmu_input_dev, KEY_POWER, down);
break;
case PMU_EVT_LID:
input_report_switch(pmu_input_dev, SW_LID, down);
break;
default:
/* no such key handled */
return;
}
input_sync(pmu_input_dev);
}
late_initcall(via_pmu_event_init);