[PATCH 1/1] drm: avoid exposing kernel stack in compat_drm_getstats

2016-08-22 Thread Jani Nikula
On Mon, 22 Aug 2016, Daniel Vetter wrote: > On Sun, Aug 21, 2016 at 07:56:19PM +0200, Heinrich Schuchardt wrote: >> The C standard does not specify the size of the integer used >> to store an enum. Hence in structure drm_stats32_t alignment >> bytes may exist. >> >> To avoid exposing bytes from

[PATCH 1/1] drm: avoid exposing kernel stack in compat_drm_getstats

2016-08-22 Thread Daniel Vetter
On Sun, Aug 21, 2016 at 07:56:19PM +0200, Heinrich Schuchardt wrote: > The C standard does not specify the size of the integer used > to store an enum. Hence in structure drm_stats32_t alignment > bytes may exist. > > To avoid exposing bytes from the kernel stack it is > necessary to initialize

[PATCH 1/1] drm: avoid exposing kernel stack in compat_drm_getstats

2016-08-21 Thread Heinrich Schuchardt
The C standard does not specify the size of the integer used to store an enum. Hence in structure drm_stats32_t alignment bytes may exist. To avoid exposing bytes from the kernel stack it is necessary to initialize variable s32 completely. Signed-off-by: Heinrich Schuchardt ---