Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1467232 > unrolled thread
| Started by | Heinrich Schuchardt <xypron.glpk@gmx.de> |
|---|---|
| First post | 2016-08-21 22:00 +0200 |
| Last post | 2016-08-22 10:40 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 1/1] drm/gma500: dont expose stack, mrst_lvds_find_best_pll Heinrich Schuchardt <xypron.glpk@gmx.de> - 2016-08-21 22:00 +0200
Re: [PATCH 1/1] drm/gma500: dont expose stack, mrst_lvds_find_best_pll Jani Nikula <jani.nikula@linux.intel.com> - 2016-08-22 10:40 +0200
| From | Heinrich Schuchardt <xypron.glpk@gmx.de> |
|---|---|
| Date | 2016-08-21 22:00 +0200 |
| Subject | [PATCH 1/1] drm/gma500: dont expose stack, mrst_lvds_find_best_pll |
| Message-ID | <s8H4u-4F3-39@gated-at.bofh.it> |
All components of variable clock should be initialized
to avoid bytes from the kernel stack to be exposed.
Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
drivers/gpu/drm/gma500/oaktrail_crtc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/gma500/oaktrail_crtc.c b/drivers/gpu/drm/gma500/oaktrail_crtc.c
index 28bd8f3..0277d85 100644
--- a/drivers/gpu/drm/gma500/oaktrail_crtc.c
+++ b/drivers/gpu/drm/gma500/oaktrail_crtc.c
@@ -195,6 +195,7 @@ static bool mrst_lvds_find_best_pll(const struct gma_limit_t *limit,
struct gma_clock_t clock;
int err = target;
+ memset(clock, 0, sizeof(struct gma_clock_t));
memset(best_clock, 0, sizeof(*best_clock));
for (clock.m = limit->m.min; clock.m <= limit->m.max; clock.m++) {
--
2.1.4
[toc] | [next] | [standalone]
| From | Jani Nikula <jani.nikula@linux.intel.com> |
|---|---|
| Date | 2016-08-22 10:40 +0200 |
| Message-ID | <s8SVY-3V6-21@gated-at.bofh.it> |
| In reply to | #1467232 |
On Sun, 21 Aug 2016, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> All components of variable clock should be initialized
> to avoid bytes from the kernel stack to be exposed.
>
> Reported-by: Joe Perches <joe@perches.com>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
> drivers/gpu/drm/gma500/oaktrail_crtc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/gma500/oaktrail_crtc.c b/drivers/gpu/drm/gma500/oaktrail_crtc.c
> index 28bd8f3..0277d85 100644
> --- a/drivers/gpu/drm/gma500/oaktrail_crtc.c
> +++ b/drivers/gpu/drm/gma500/oaktrail_crtc.c
> @@ -195,6 +195,7 @@ static bool mrst_lvds_find_best_pll(const struct gma_limit_t *limit,
> struct gma_clock_t clock;
> int err = target;
>
> + memset(clock, 0, sizeof(struct gma_clock_t));
Again, did you actually build this? This is hurting not helping us. It
makes me think you didn't try your other patches either.
BR,
Jani.
> memset(best_clock, 0, sizeof(*best_clock));
>
> for (clock.m = limit->m.min; clock.m <= limit->m.max; clock.m++) {
--
Jani Nikula, Intel Open Source Technology Center
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web