Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1741607
| From | Mark Rutland <mark.rutland@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: EBPF-triggered WARNING at mm/percpu.c:1361 in v4-14-rc2 |
| Date | 2017-09-28 16:50 +0200 |
| Message-ID | <uuIiu-1KL-9@gated-at.bofh.it> (permalink) |
| References | <uuFaW-8mB-5@gated-at.bofh.it> <uuI8N-1Hr-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Sep 28, 2017 at 04:37:46PM +0200, Daniel Borkmann wrote: > On 09/28/2017 01:27 PM, Mark Rutland wrote: > >Hi, > > > >While fuzzing v4.14-rc2 with Syzkaller, I found it was possible to trigger the > >warning at mm/percpu.c:1361, on both arm64 and x86_64. This appears to require > >increasing RLIMIT_MEMLOCK, so to the best of my knowledge this cannot be > >triggered by an unprivileged user. > > > >I've included example splats for both x86_64 and arm64, along with a C > >reproducer, inline below. > > > >It looks like dev_map_alloc() requests a percpu alloction of 32776 bytes, which > >is larger than the maximum supported allocation size of 32768 bytes. > > > >I wonder if it would make more sense to pr_warn() for sizes that are too > >large, so that callers don't have to roll their own checks against > >PCPU_MIN_UNIT_SIZE? > > Perhaps the pr_warn() should be ratelimited; or could there be an > option where we only return NULL, not triggering a warn at all (which > would likely be what callers might do anyway when checking against > PCPU_MIN_UNIT_SIZE and then bailing out)? Those both make sense to me; checking __GFP_NOWARN should be easy enough. Just to check, do you think that dev_map_alloc() should explicitly test the size against PCPU_MIN_UNIT_SIZE, prior to calling pcpu_alloc()? I can spin both patches if so. Thanks, Mark.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
EBPF-triggered WARNING at mm/percpu.c:1361 in v4-14-rc2 Mark Rutland <mark.rutland@arm.com> - 2017-09-28 13:30 +0200
Re: EBPF-triggered WARNING at mm/percpu.c:1361 in v4-14-rc2 Daniel Borkmann <daniel@iogearbox.net> - 2017-09-28 16:40 +0200
Re: EBPF-triggered WARNING at mm/percpu.c:1361 in v4-14-rc2 Mark Rutland <mark.rutland@arm.com> - 2017-09-28 16:50 +0200
Re: EBPF-triggered WARNING at mm/percpu.c:1361 in v4-14-rc2 Tejun Heo <tj@kernel.org> - 2017-09-28 17:00 +0200
Re: EBPF-triggered WARNING at mm/percpu.c:1361 in v4-14-rc2 Daniel Borkmann <daniel@iogearbox.net> - 2017-09-28 17:10 +0200
Re: EBPF-triggered WARNING at mm/percpu.c:1361 in v4-14-rc2 Tejun Heo <tj@kernel.org> - 2017-09-28 17:00 +0200
csiph-web