Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 ptrace fix from Catalin Marinas.

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
arm64: ptrace: avoid using HW_BREAKPOINT_EMPTY for disabled events

+17 -19
+17 -19
arch/arm64/kernel/ptrace.c
··· 214 214 { 215 215 int err, len, type, disabled = !ctrl.enabled; 216 216 217 - if (disabled) { 218 - len = 0; 219 - type = HW_BREAKPOINT_EMPTY; 220 - } else { 221 - err = arch_bp_generic_fields(ctrl, &len, &type); 222 - if (err) 223 - return err; 217 + attr->disabled = disabled; 218 + if (disabled) 219 + return 0; 224 220 225 - switch (note_type) { 226 - case NT_ARM_HW_BREAK: 227 - if ((type & HW_BREAKPOINT_X) != type) 228 - return -EINVAL; 229 - break; 230 - case NT_ARM_HW_WATCH: 231 - if ((type & HW_BREAKPOINT_RW) != type) 232 - return -EINVAL; 233 - break; 234 - default: 221 + err = arch_bp_generic_fields(ctrl, &len, &type); 222 + if (err) 223 + return err; 224 + 225 + switch (note_type) { 226 + case NT_ARM_HW_BREAK: 227 + if ((type & HW_BREAKPOINT_X) != type) 235 228 return -EINVAL; 236 - } 229 + break; 230 + case NT_ARM_HW_WATCH: 231 + if ((type & HW_BREAKPOINT_RW) != type) 232 + return -EINVAL; 233 + break; 234 + default: 235 + return -EINVAL; 237 236 } 238 237 239 238 attr->bp_len = len; 240 239 attr->bp_type = type; 241 - attr->disabled = disabled; 242 240 243 241 return 0; 244 242 }