[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [PATCH v2] efifb: ignore frame buffer with invalid configuration


  • To: Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Mon, 21 Nov 2022 11:14:32 +0000
  • Accept-language: zh-CN, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fr8Jxdu00rHfsJfBUD0rCF1ad1sc/8lJ/F5h0Q/2xlc=; b=mxyu3mFbxSCFEINXby86CntXI0uxYGxz+joWJnKPBPkxTVAT/uHZtcCdzj+nZqXThLVzelnAYAuESwLZvkCwCOV2wyoDMvf5UhP1D8gS6Pt+fAmM4sXyJFMi647h9/2t+rxcd31vKp9ZzxhsZTvwVAYpVdaoWWfwlvdh2s8iuUVi71f5t31uhHyBUUpVXmEeneeyBoLICbIVxTxFkfPwTMS/NOR6CV5Ru85uvTnCOR1Bc7RZxNKTG/M1+JHntp60j2PR4NIjtWt+boxB7ywJIipWW9xU54qUBKQ1b3v2dmsSOo793I6mtf9JAYQeWom20iiFCPsvYThMQEgBt9cymg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MaNmNM+jDSCrluv0Cl8aveTtGwI/V3d6wVJ8KWkgg0KRuhvMBfSuor+hKtPYwdB3e6X23tlhtizODnDmag3iSY2bh2i1GtzN5RI9gwZAkknAtfxs5NGiP/Lt11Wr32u61A4hdkRVG7APdkhNTVuYZGhCGBxXZ2WlkieeuZ60TOWEcwBezSu5J1v6RITAI4IoIa4Xr+QYTwcQLbg3tsMxc19KHk3cPXs15C5fcrAkFOhwnFXiI5G+g/5P0gcWtfghyUJIMGoO6E94Dx8GR1TUZ4o7+HIjXlwq9eAMr6+M5oRzCt8knOcL4uFGye7iAMbnTdtuhOcjBzVEwT/ESrJkeQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 21 Nov 2022 11:14:55 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHY+1fO1GnKKHbNPku6hX+/5ZUkBa5JDEEAgAAxRhA=
  • Thread-topic: [PATCH v2] efifb: ignore frame buffer with invalid configuration

Hi Roger and Jan,

> -----Original Message-----
> Subject: Re: [PATCH v2] efifb: ignore frame buffer with invalid configuration
> 
> On 18.11.2022 15:11, Roger Pau Monne wrote:
> > On one of my boxes when the HDMI cable is not plugged in the
> > FrameBufferBase of the EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE
> structure is
> > set to 0 by the firmware (while some of the other fields looking
> > plausible).
> >
> > Such (bogus address) ends up mapped in vesa_init(), and since it
> > overlaps with a RAM region the whole system goes down pretty badly,
> > see:
> >
> > (XEN) vesafb: framebuffer at 0x0000000000000000, mapped to
> 0xffff82c000201000, using 35209k, total 35209k
> > (XEN) vesafb: mode is 0x37557x32, linelength=960, font 8x16
> > (XEN) vesafb: Truecolor: size=8:8:8:8, shift=24:0:8:16
> > (XEN) (XEN) (XEN) (XEN) (XEN) (XEN) (XEN) (XEN) �ERROR: Class:0;
> Subclass:0; Operation: 0
> > ERROR: No ConOut
> > ERROR: No ConIn
> >
> > Do like Linux and prevent using the EFI Frame Buffer if the base
> > address is 0.  This is inline with the logic in Linuxes
> > fb_base_is_valid() function at drivers/video/fbdev/efifb.c v6.0.9.
> >
> > See also Linux commit 133bb070e94ab41d750c6f2160c8843e46f11b78 for
> > further reference.
> >
> > Also prevent using Frame Buffers that have a 0 height or width, as
> > those are also invalid.
> >
> > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> 
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

I saw the IRC/Matrix message from both of you. Since Jan mentioned
that this patch will be backported anyway and this is a bugfix patch
for safety of the code. I am giving my release-ack to reduce the
maintenance/backport burden for committers.

Release-acked-by: Henry Wang <Henry.Wang@xxxxxxx>

Kind regards,
Henry

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.