On Wed, Mar 30, 2016 at 10:47:49PM -0400, Jeff Mahoney wrote: > On 3/30/16 9:48 PM, Dmitry V. Levin wrote: > > On Wed, Mar 30, 2016 at 09:19:25PM -0400, Jeff Mahoney wrote: > >> Some ioctls have flags fields that are 64-bit. A 32-bit val means > >> these flags will never be matched or printed. [...] > > There is a potential sign extension bug in every place where a signed int > > is passed to any function "upgraded" from int/unsigned int to uint64_t. > > > Have you checked all these places? > > No, I didn't. You're right, this could be a problem. How about instead: > > struct xlat.val is uint64_t. > Introduce *64 routines to handle those cases. > Change the signed int argument to unsigned for the existing prototypes. > Turn those routines into wrappers for the *64 versions so that no > unexpected signed extension happens.
Yes, this should be OK. -- ldv
pgpEVIaRyj9nk.pgp
Description: PGP signature
------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
_______________________________________________ Strace-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/strace-devel
