[Crash-utility] [PATCH] Fix for "kmem <addr>" for kernels configured with CONFIG_SLUB and SLAB_RED_ZONE.

Dave Anderson anderson at redhat.com
Tue Feb 7 17:11:07 UTC 2017



Hi Ogawa,

The combination patchset has been queued for crash-7.1.8:

  https://github.com/crash-utility/crash/commit/61f4e172fd63efec5b929e10ef75b02f8c36d75e

Thanks,
  Dave


----- Original Message -----
> Dave Anderson <anderson at redhat.com> writes:
> 
> >> While testing this patch, I noticed what you pointed out in my
> >> patch. Right, the part comparing "si->spec_addr" with "p" is wrong.
> >>
> >> redzone.patch is version of fixed my bug (removed trailing whitespace
> >> too).
> >
> > Right, but I based my last patch on your first patch, which modified
> > the "vaddr" variable before making the "is_free" check.  Either way works.
> 
> My first patch was having the bug at,
> 
> 		if (si->flags & ADDRESS_SPECIFIED) {
> 			if ((si->spec_addr < p) ||
> 			    (si->spec_addr >= (p + si->size))) {
> 				if (!(si->flags & VERBOSE))
> 					continue;
> 			}
> 		}
> 
> part. "p" must be including the left RED_ZONE too when comparing with
> si->spec_addr. (in my first patch, "p" was not including the left
> RED_ZONE.)
> 
> >> And while testing, I confused whether "redzone on" is meaning exclude or
> >> not (because "redzone on" looks like "show redzone")? :)
> >> So redzone-exclude.patch renamed "redzone" to "exclude_redzone".  This
> >> patch can be rejected freely if you don't want.
> >
> > OK, but I'll just change the on/off logic and the help page description
> > such that:
> >
> >    redzone on:  object addresses will point to the object base, which is
> >                 the redzone region if enabled.  (the default)
> >   redzone off:  object addresses will point to the address returned to
> >                 the allocator.
> 
> Thanks.
> --
> OGAWA Hirofumi <hirofumi at mail.parknet.co.jp>
> 




More information about the Crash-utility mailing list