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 files129
abrarkhan/linux-4.19.72_cve-2020-24490Revision aa3f6929b62b
- ↑..Parent directory
- Kconfig
- Makefile
- i2c-acorn.c
- i2c-ali1535.c
- i2c-ali1563.c
- i2c-ali15x3.c
- i2c-altera.c
- i2c-amd756-s4882.c
- i2c-amd756.c
- i2c-amd8111.c
- i2c-aspeed.c
- i2c-at91.c
- i2c-au1550.c
- i2c-axxia.c
- i2c-bcm-iproc.c
- i2c-bcm-kona.c
- i2c-bcm2835.c
- i2c-brcmstb.c
- i2c-cadence.c
- i2c-cbus-gpio.c
- i2c-cht-wc.c
- i2c-cpm.c
- i2c-cros-ec-tunnel.c
- i2c-davinci.c
- i2c-designware-baytrail.c
- i2c-designware-common.c
- i2c-designware-core.h
- i2c-designware-master.c
- i2c-designware-pcidrv.c
- i2c-designware-platdrv.c
- i2c-designware-slave.c
- i2c-digicolor.c
- i2c-diolan-u2c.c
- i2c-dln2.c
- i2c-efm32.c
- i2c-eg20t.c
- i2c-elektor.c
- i2c-emev2.c
- i2c-exynos5.c
- i2c-fsi.c
- i2c-gpio.c
- i2c-highlander.c
- i2c-hix5hd2.c
- i2c-hydra.c
- i2c-i801.c
- i2c-ibm_iic.c
- i2c-ibm_iic.h
- i2c-img-scb.c
- i2c-imx-lpi2c.c
- i2c-imx.c
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
drivers/i2c/busses/i2c-acorn.c
C · 2,081 bytes/*
* ARM IOC/IOMD i2c driver.
*
* Copyright (C) 2000 Russell King
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* On Acorn machines, the following i2c devices are on the bus:
* - PCF8583 real time clock & static RAM
*/
#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
#include <linux/io.h>
#include <mach/hardware.h>
#include <asm/hardware/ioc.h>
#define FORCE_ONES 0xdc
#define SCL 0x02
#define SDA 0x01
/*
* We must preserve all non-i2c output bits in IOC_CONTROL.
* Note also that we need to preserve the value of SCL and
* SDA outputs as well (which may be different from the
* values read back from IOC_CONTROL).
*/
static u_int force_ones;
static void ioc_setscl(void *data, int state)
{
u_int ioc_control = ioc_readb(IOC_CONTROL) & ~(SCL | SDA);
u_int ones = force_ones;
if (state)
ones |= SCL;
else
ones &= ~SCL;
force_ones = ones;
ioc_writeb(ioc_control | ones, IOC_CONTROL);
}
static void ioc_setsda(void *data, int state)
{
u_int ioc_control = ioc_readb(IOC_CONTROL) & ~(SCL | SDA);
u_int ones = force_ones;
if (state)
ones |= SDA;
else
ones &= ~SDA;
force_ones = ones;
ioc_writeb(ioc_control | ones, IOC_CONTROL);
}
static int ioc_getscl(void *data)
{
return (ioc_readb(IOC_CONTROL) & SCL) != 0;
}
static int ioc_getsda(void *data)
{
return (ioc_readb(IOC_CONTROL) & SDA) != 0;
}
static struct i2c_algo_bit_data ioc_data = {
.setsda = ioc_setsda,
.setscl = ioc_setscl,
.getsda = ioc_getsda,
.getscl = ioc_getscl,
.udelay = 80,
.timeout = HZ,
};
static struct i2c_adapter ioc_ops = {
.nr = 0,
.name = "ioc",
.algo_data = &ioc_data,
};
static int __init i2c_ioc_init(void)
{
force_ones = FORCE_ONES | SCL | SDA;
return i2c_bit_add_numbered_bus(&ioc_ops);
}
module_init(i2c_ioc_init);
MODULE_AUTHOR("Russell King <[email protected]>");
MODULE_DESCRIPTION("ARM IOC/IOMD i2c driver");
MODULE_LICENSE("GPL v2");