From patchwork Fri Jan 5 21:42:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 10147107 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 2383D60159 for ; Fri, 5 Jan 2018 21:43:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7300427F4B for ; Fri, 5 Jan 2018 21:43:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6728728458; Fri, 5 Jan 2018 21:43:02 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF7AC27F4B for ; Fri, 5 Jan 2018 21:43:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753080AbeAEVnB (ORCPT ); Fri, 5 Jan 2018 16:43:01 -0500 Received: from mail-qk0-f193.google.com ([209.85.220.193]:45454 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750980AbeAEVnA (ORCPT ); Fri, 5 Jan 2018 16:43:00 -0500 Received: by mail-qk0-f193.google.com with SMTP id o126so7639659qke.12 for ; Fri, 05 Jan 2018 13:43:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:user-agent:mime-version; bh=TzSx2YIqmc/q0U9gAIvRQKX3iRlB1gRfc7BNNuN5moc=; b=LCZwa0jp+fllvRsqYi8W9LhX/euzdvoTtCO8dlrTpKSiJo71LCUQ+MbEU/lgVuAwCd uQdQQcYE6UxmNG3noUTkx7rtbFFPYyFD79ozNtrCsgXWgYb5athreI1+t7YNOawEz0+0 jHgqnKvVfcuTKFmZR7loEr0H5JqHqgkTQtXfk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:user-agent :mime-version; bh=TzSx2YIqmc/q0U9gAIvRQKX3iRlB1gRfc7BNNuN5moc=; b=ry+xWFAHdluT1/PKW1ZodwGk1j8jdF1jMzbxMReVrKpEEMQ4M37MU/HAz/Npomx9AH k8ZvvpWV8Qg9q0oVlIGy0AjF/Mw+vcR0oqg3xHW2qbRROLphIXJ4/LNgP6KaRIbMscfY ufAY89zRdVEC2Njo2DaYuZHP4gJ1ucX37J9pZBhmfF9a2LfPIYbYrEbLTN8midQktOSH XiLv7y4ZcjpG+En1NMX+0u4oxzseG1KbMfaXsV+0yfZVhat8caY+ogeYPgPBaccJxQ6T xR0675B5I/vypB2K8pkLB9K61RSlmuIS9yyUmJvhCJ7a/6tK2E8zsOtG9ok9kKCvIpMs XvGQ== X-Gm-Message-State: AKwxyteigjuZ2lDK+E1yQDVDxXi+gaRcmx1zpDseiIX2pvYo1TdJmnLX IDPl14B7v9U2KBhsQFMuN9Y07Q== X-Google-Smtp-Source: ACJfBov9ywXHr3nqqI492ppugxoB/3i945FGJhQgpFQTueC6BAVEJ9dhLSJnCcQEGWcdtV0khFwfXA== X-Received: by 10.55.217.90 with SMTP id u87mr5402330qki.343.1515188579673; Fri, 05 Jan 2018 13:42:59 -0800 (PST) Received: from xanadu.home (modemcable228.104-82-70.mc.videotron.ca. [70.82.104.228]) by smtp.gmail.com with ESMTPSA id u50sm4115068qth.39.2018.01.05.13.42.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jan 2018 13:42:58 -0800 (PST) Date: Fri, 5 Jan 2018 16:42:58 -0500 (EST) From: Nicolas Pitre To: Bartlomiej Zolnierkiewicz cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] console/dummy: leave .con_font_get set to NULL Message-ID: User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When this method is set, the caller expects struct console_font fields to be properly initialized when it returns. Leave it unset otherwise nonsensical (leaked kernel stack) values are returned to user space. Signed-off-by: Nicolas Pitre Cc: stable@kernel.org --- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c index 9269d56852..b90ef96e43 100644 --- a/drivers/video/console/dummycon.c +++ b/drivers/video/console/dummycon.c @@ -67,7 +67,6 @@ const struct consw dummy_con = { .con_switch = DUMMY, .con_blank = DUMMY, .con_font_set = DUMMY, - .con_font_get = DUMMY, .con_font_default = DUMMY, .con_font_copy = DUMMY, };