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 files31
abrarkhan/linux-4.19.72_cve-2020-24490Revision aa3f6929b62b
- ↑..Parent directory
- .gitignore
- Makefile
- back_to_back_ebbs_test.c
- busy_loop.S
- close_clears_pmcc_test.c
- cpu_event_pinned_vs_ebb_test.c
- cpu_event_vs_ebb_test.c
- cycles_test.c
- cycles_with_freeze_test.c
- cycles_with_mmcr2_test.c
- ebb.c
- ebb.h
- ebb_handler.S
- ebb_on_child_test.c
- ebb_on_willing_child_test.c
- ebb_vs_cpu_event_test.c
- event_attributes_test.c
- fixed_instruction_loop.S
- fork_cleanup_test.c
- instruction_count_test.c
- lost_exception_test.c
- multi_counter_test.c
- multi_ebb_procs_test.c
- no_handler_test.c
- pmae_handling_test.c
- pmc56_overflow_test.c
- reg_access_test.c
- task_event_pinned_vs_ebb_test.c
- task_event_vs_ebb_test.c
- trace.c
- trace.h
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
tools/testing/selftests/powerpc/pmu/ebb/no_handler_test.c
C · 1,161 bytes/*
* Copyright 2014, Michael Ellerman, IBM Corp.
* Licensed under GPLv2.
*/
#include <stdio.h>
#include <stdlib.h>
#include <setjmp.h>
#include <signal.h>
#include "ebb.h"
/* Test that things work sanely if we have no handler */
static int no_handler_test(void)
{
struct event event;
u64 val;
int i;
SKIP_IF(!ebb_is_supported());
event_init_named(&event, 0x1001e, "cycles");
event_leader_ebb_init(&event);
event.attr.exclude_kernel = 1;
event.attr.exclude_hv = 1;
event.attr.exclude_idle = 1;
FAIL_IF(event_open(&event));
FAIL_IF(ebb_event_enable(&event));
val = mfspr(SPRN_EBBHR);
FAIL_IF(val != 0);
/* Make sure it overflows quickly */
sample_period = 1000;
mtspr(SPRN_PMC1, pmc_sample_period(sample_period));
/* Spin to make sure the event has time to overflow */
for (i = 0; i < 1000; i++)
mb();
dump_ebb_state();
/* We expect to see the PMU frozen & PMAO set */
val = mfspr(SPRN_MMCR0);
FAIL_IF(val != 0x0000000080000080);
event_close(&event);
dump_ebb_state();
/* The real test is that we never took an EBB at 0x0 */
return 0;
}
int main(void)
{
return test_harness(no_handler_test,"no_handler_test");
}