Unverified Commit 4573503a authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files
parents a382afe5 3d005917
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@
#include <asm/perf_event.h>
#include <asm/msr.h>
#include <asm/insn.h>
#include <linux/mm.h>

#include "../perf_event.h"

@@ -1221,9 +1222,9 @@ static int branch_type(unsigned long from, unsigned long to, int abort)
		 * The LBR logs any address in the IP, even if the IP just
		 * faulted. This means userspace can control the from address.
		 * Ensure we don't blindy read any address by validating it is
		 * a known text address.
		 * a known text address and not a vsyscall address.
		 */
		if (kernel_text_address(from)) {
		if (kernel_text_address(from) && !in_gate_area_no_mm(from)) {
			addr = (void *)from;
			/*
			 * Assume we can get the maximum possible size