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: 123558 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp1322661qgn; Fri, 5 Jan 2018 13:43:01 -0800 (PST) X-Google-Smtp-Source: ACJfBovvbyzPjsxpl9F5yGY6EVNiVdKGyJa0ysL9Jr9FeNt/fdNJiuvyoYVCf4eXwI6ENbx1o/Nd X-Received: by 10.98.253.16 with SMTP id p16mr4120596pfh.22.1515188581713; Fri, 05 Jan 2018 13:43:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515188581; cv=none; d=google.com; s=arc-20160816; b=N3whxi14qbmPHTyr3pnb/1VptKPVkcQBOcR/6XeykNBfxEUMuOTuGeJHp5vt7ZKd7D yw9WWRFSe+pzUYYzIlDPoBNuez2m60pq0qNrriF7FdDeM5bix/nwwRMNf4sXH0adzaA6 0UChQbpveOJpzHjzDsjyeNCs10L69frrvcb58RNaml3785RA5SZhu066Ab31A3Vf/+lT usytOVcRxje7yRd52kuRnHwGFw300izD1mC2nGi0wvhiC9wbq9+5vh34P2NwglxVIhZ3 p9miQzxvZRJ8ms87a00TEAQmHHlor7YSXUK5xXGkrJxAjfFt9Q81PCCbii26zwZyG+IH LrTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :subject:cc:to:from:date:dkim-signature:arc-authentication-results; bh=rYHbOg19Me7aMCeJa+RzvAoyibdOyXB2SyMIf4xNyok=; b=XAg7MrQfZKayhcqdQ6JQdi/+8GiggoAl5JREeCUWI6CCLS28E2WEdqANt5tJR6b/2h fu5Qk6ukOLwcyxt8O+lsXLpA4mH8Y7u0B+iCIrHCsg9HMaao3gpVi56ucmJHrrfSwJJU IHE1UxcEISIj7Rsqnb4/TRzAVrDxaS5MNwXmhzR76/GntxIxElG243seFU4CBuxGN+Uc nMRNsQ1lWvJFLP400M1fzTt0emqyP7dYQDfDdZprVEFMWfbnlhuHTdddnz3hNFPJTlbq fGFW/g5ejCVrLKfhtWVSAmKNa3y388GW37+/6oYBJwaUMdiUYaJ6dmNwiomDoVrQqyma SfTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=LCZwa0jp; spf=pass (google.com: best guess record for domain of linux-fbdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-fbdev-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e12si4012751pgu.403.2018.01.05.13.43.01; Fri, 05 Jan 2018 13:43:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-fbdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=LCZwa0jp; spf=pass (google.com: best guess record for domain of linux-fbdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-fbdev-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753080AbeAEVnB (ORCPT + 2 others); 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-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 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, };