Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Mar 2017 01:51:56 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r315323 - head/sys/kern
Message-ID:  <20170315235156.GM16105@kib.kiev.ua>
In-Reply-To: <3167768.s4jIG6eyGp@ralph.baldwin.cx>
References:  <201703151823.v2FINWN9083379@repo.freebsd.org> <3167768.s4jIG6eyGp@ralph.baldwin.cx>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 15, 2017 at 12:21:00PM -0700, John Baldwin wrote:
> On Wednesday, March 15, 2017 06:23:32 PM John Baldwin wrote:
> > Author: jhb
> > Date: Wed Mar 15 18:23:32 2017
> > New Revision: 315323
> > URL: https://svnweb.freebsd.org/changeset/base/315323
> > 
> > Log:
> >   Use UMA_ALIGN_PTR instead of sizeof(void *) for zone alignment.
> >   
> >   uma_zcreate()'s alignment argument is supposed to be sizeof(foo) - 1,
> >   and uma.h provides a set of helper macros for common types.  Passing
> >   sizeof(void *) results in all of the members being misaligned triggering
> >   unaligned access faults on certain architectures (notably MIPS).
> >   
> >   Reported by:	brooks
> >   Obtained from:	CheriBSD
> >   MFC after:	3 days
> >   Sponsored by:	DARPA / AFRL
> > 
> > Modified:
> >   head/sys/kern/vfs_lookup.c
> 
> We should perhaps add a KASSERT() to uma_zcreate to catch this sort of
> thing.  Something like KASSERT(powerof2(align + 1)) (assuming there isn't
> a real use case for having non-power-of-2 alignments)?
> 
Will you do it ?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170315235156.GM16105>