[RFC v2] Decode UFFDIO_* ioctls

Dmitry V. Levin ldv at altlinux.org
Tue May 10 11:32:04 UTC 2016


On Mon, May 09, 2016 at 10:44:06AM +0100, Dr. David Alan Gilbert wrote:
> * Dmitry V. Levin (ldv at altlinux.org) wrote:
> > On Fri, May 06, 2016 at 12:11:08PM +0100, Dr. David Alan Gilbert wrote:
> > [...]
> > > Thanks; I've just posted a set on top of that; note that
> > > one thing is that for 64bit it's still not quite
> > > right since the gen.sh generates 1<<CONSTANT rather than 1ull<<CONSTANT
> > 
> > Values generated by gen.sh seems to be correct (1ULL<<CONSTANT),
> > it's strace output that's going to be "1<<CONSTANT".
> > Do you suggest to change the output string, too?
> 
> It is the output string I meant; I don't really care that much about it,
> although it's not correct from it being valid C with that big a shift.

I see.  At the same time,
	ioctls=1ull<<_UFFDIO_REGISTER|1ull<<_UFFDIO_UNREGISTER|1ull<<_UFFDIO_API
would look even more bulky than current
	ioctls=1<<_UFFDIO_REGISTER|1<<_UFFDIO_UNREGISTER|1<<_UFFDIO_API
and compiler will warn if one tries to use this big shift literally.

I'd rather sacrifice strict C correctness for readability
and leave this as it is now.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20160510/79c31977/attachment.bin>


More information about the Strace-devel mailing list