hw_breakpoint.c (c4bed4b96918ff1d062ee81fdae4d207da4fa9b0) hw_breakpoint.c (3943abf2dbfae9ea4d2da05c1db569a0603f76da)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 *
4 * Copyright (C) 2007 Alan Stern
5 * Copyright (C) 2009 IBM Corporation
6 * Copyright (C) 2009 Frederic Weisbecker <fweisbec@gmail.com>
7 *
8 * Authors: Alan Stern <stern@rowland.harvard.edu>

--- 293 unchanged lines hidden (view full) ---

302 * cpu_tlbstate.user_pcid_flush_mask is used for CPU entry.
303 * If a data breakpoint on it, it will cause an unwanted #DB.
304 * Protect the full cpu_tlbstate structure to be sure.
305 */
306 if (within_area(addr, end,
307 (unsigned long)&per_cpu(cpu_tlbstate, cpu),
308 sizeof(struct tlb_state)))
309 return true;
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 *
4 * Copyright (C) 2007 Alan Stern
5 * Copyright (C) 2009 IBM Corporation
6 * Copyright (C) 2009 Frederic Weisbecker <fweisbec@gmail.com>
7 *
8 * Authors: Alan Stern <stern@rowland.harvard.edu>

--- 293 unchanged lines hidden (view full) ---

302 * cpu_tlbstate.user_pcid_flush_mask is used for CPU entry.
303 * If a data breakpoint on it, it will cause an unwanted #DB.
304 * Protect the full cpu_tlbstate structure to be sure.
305 */
306 if (within_area(addr, end,
307 (unsigned long)&per_cpu(cpu_tlbstate, cpu),
308 sizeof(struct tlb_state)))
309 return true;
310
311 /*
312 * When in guest (X86_FEATURE_HYPERVISOR), local_db_save()
313 * will read per-cpu cpu_dr7 before clear dr7 register.
314 */
315 if (within_area(addr, end, (unsigned long)&per_cpu(cpu_dr7, cpu),
316 sizeof(cpu_dr7)))
317 return true;
310 }
311
312 return false;
313}
314
315static int arch_build_bp_info(struct perf_event *bp,
316 const struct perf_event_attr *attr,
317 struct arch_hw_breakpoint *hw)

--- 267 unchanged lines hidden ---
318 }
319
320 return false;
321}
322
323static int arch_build_bp_info(struct perf_event *bp,
324 const struct perf_event_attr *attr,
325 struct arch_hw_breakpoint *hw)

--- 267 unchanged lines hidden ---