No conflicts.
Showing the changes to kernel (2 of 328 files). Show all
Unified · Split
| @@ -185,7 +185,7 @@ static int audit_match_perm(struct audit_context *ctx, int mask) · 184 unmodified lines | ||
| 185 | 185 | case AUDITSC_EXECVE: |
| 186 | 186 | return mask & AUDIT_PERM_EXEC; |
| 187 | 187 | case AUDITSC_OPENAT2: |
| 188 | − return mask & ACC_MODE((u32)((struct open_how *)ctx->argv[2])->flags); | |
| 188 | + return mask & ACC_MODE((u32)ctx->openat2.flags); | |
| 189 | 189 | default: |
| 190 | 190 | return 0; |
| 191 | 191 | } |
| @@ -3238,6 +3238,15 @@ static int perf_event_modify_breakpoint(struct perf_event *bp, · 3237 unmodified lines | ||
| 3238 | 3238 | return err; |
| 3239 | 3239 | } |
| 3240 | 3240 | |
| 3241 | +/* | |
| 3242 | + * Copy event-type-independent attributes that may be modified. | |
| 3243 | + */ | |
| 3244 | +static void perf_event_modify_copy_attr(struct perf_event_attr *to, | |
| 3245 | + const struct perf_event_attr *from) | |
| 3246 | +{ | |
| 3247 | + to->sig_data = from->sig_data; | |
| 3248 | +} | |
| 3249 | + | |
| 3241 | 3250 | static int perf_event_modify_attr(struct perf_event *event, |
| 3242 | 3251 | struct perf_event_attr *attr) |
| 3243 | 3252 | { |
| @@ -3260,10 +3269,17 @@ static int perf_event_modify_attr(struct perf_event *event, · 16 unmodified lines | ||
| 3260 | 3269 | WARN_ON_ONCE(event->ctx->parent_ctx); |
| 3261 | 3270 | |
| 3262 | 3271 | mutex_lock(&event->child_mutex); |
| 3272 | + /* | |
| 3273 | + * Event-type-independent attributes must be copied before event-type | |
| 3274 | + * modification, which will validate that final attributes match the | |
| 3275 | + * source attributes after all relevant attributes have been copied. | |
| 3276 | + */ | |
| 3277 | + perf_event_modify_copy_attr(&event->attr, attr); | |
| 3263 | 3278 | err = func(event, attr); |
| 3264 | 3279 | if (err) |
| 3265 | 3280 | goto out; |
| 3266 | 3281 | list_for_each_entry(child, &event->child_list, child_list) { |
| 3282 | + perf_event_modify_copy_attr(&child->attr, attr); | |
| 3267 | 3283 | err = func(child, attr); |
| 3268 | 3284 | if (err) |
| 3269 | 3285 | goto out; |