From patchwork Sun Aug 21 18:39:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 9292773 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F03B9600CB for ; Mon, 22 Aug 2016 00:40:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E32DD287DE for ; Mon, 22 Aug 2016 00:40:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D808B287FF; Mon, 22 Aug 2016 00:40:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 293A8287DE for ; Mon, 22 Aug 2016 00:40:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0ED196E2AA; Mon, 22 Aug 2016 00:40:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0A2076E256 for ; Sun, 21 Aug 2016 18:39:46 +0000 (UTC) Received: from workstation4.fritz.box ([109.91.48.91]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0M8m7Q-1bRc1L1C8K-00CChL; Sun, 21 Aug 2016 20:39:43 +0200 From: Heinrich Schuchardt To: Patrik Jakobsson Subject: [PATCH] drm/gma500: dont expose bytes from kernel stack Date: Sun, 21 Aug 2016 20:39:38 +0200 Message-Id: <1471804778-3656-1-git-send-email-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.1.4 X-Provags-ID: V03:K0:PLamIX0joX3DSOUe26xpp2SV8HlEIHj6SuP2ifiETDWeAnPh/Od WJz+ZzU2oClJT6lAlBptyNkGppzdWx3LAfKxIfOC2HuwM5LoAC+Al0YX6K9zwulgiBRDOYN RBbxhnsRbhnLCWJ1A0pgJrhIWDSQ06lVBqqs3k6hc/DYt8gHq4wV3LySyT8xT8hYbjfUKim 47A+EeqjrxMxqrhFbQa3w== X-UI-Out-Filterresults: notjunk:1; V01:K0:YfKvNmz+Zo0=:dOSeJY7os5pDleac/3Z7Hl L2aXcPrdxMW46mgMqB/oTvVm7tf0xGnX8K+D98E0vSCqJfbowWKhe+Wiv8iyb1biSntnLX101 D+rI+5yC85bCL1YdiGDeLBhCGnX0MeaKzP6ktc6jCOZ/mkcYOBa+FAMRcfHi3cXUu3OfSRzcp 8yyNbrlPEKwHKjNfLITyttGYlsmymVWnjjYYXM+WzKeB4yJTdA/03Iktlu04V7AzY1ZczLkfx xOwu49wT3HWSktsNuLF/fwUuUK+8qmb80rO7nEIv3sSWtSNlO5EZ5XiRtdunMYgW5VoFebnnB Z/TvjEELNayTmzIJz6mesFUidnnnn8CuqQZ2apes+t6nu77wuSlPN1yWNVClF46Qb9IObz6Ab gHrqA88ojNTFxChxd8XmXovdXcRFPle3nArfV+C3iw9K0WVopqZTFIB9n4Z3baaV/I+kJmX9e J3nPBH6BEHiUKM1+naH7qD8vLlXc0wr1utrSJ0mWfefgI7lYMU/ZxAOk5dSQwtjwXpo8bsgZ/ gBt/jJJGHrqfUlcb1/llC8PUzBTwmaR3kivY86vTOTqq9kFhjup8RMrXL5XAkiW1BSBrn0Tk/ 7MxESwu6iRQ6HaFrmEXqUeu9BGIvqZxvUDTXAuVJ1723NetpznHo+3O07D8xyd4T0DZRIYTjo 48Ai3Cr51/XPdlRtOfY95NoUy1Nu3mft9NAtFSA3Ds7ryztYPhlXUxmnQ47OQR/mwwIXLsEXy k/l1p/gEiVIcwb8YcHp3U8lTLgNN/w6M2V5aPZm67XC64XGmOjjRDzFrt1A= X-Mailman-Approved-At: Mon, 22 Aug 2016 00:39:59 +0000 Cc: Heinrich Schuchardt , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Components m1, m2, p2, dot, vco of variable clock should be initialized to avoid bytes from the kernel stack to be exposed. Signed-off-by: Heinrich Schuchardt --- 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 da9fd34..28bd8f3 100644 --- a/drivers/gpu/drm/gma500/oaktrail_crtc.c +++ b/drivers/gpu/drm/gma500/oaktrail_crtc.c @@ -138,6 +138,7 @@ static bool mrst_sdvo_find_best_pll(const struct gma_limit_t *limit, u32 target_vco, actual_freq; s32 freq_error, min_error = 100000; + 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++) {