From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> To: David Herrmann <dh.herrmann@gmail.com> Cc: "linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>, James Bates <james.h.bates@gmail.com>, linux-kernel <linux-kernel@vger.kernel.org>, Tomi Valkeinen <tomi.valkeinen@ti.com>, James Bates <james.h.bates@yahoo.com> Subject: Re: [PATCH v2] efifb: prevent null-deref when iterating dmi_list Date: Fri, 1 Nov 2013 12:10:20 +0100 [thread overview] Message-ID: <20131101111020.GD18477@ns203013.ovh.net> (raw) In-Reply-To: <CANq1E4QAwOG8Vdw2nCb8+LirZ278w58j+wpieeKvnNepga+baw@mail.gmail.com> On 17:17 Thu 31 Oct , David Herrmann wrote: > Hi > > On Thu, Oct 31, 2013 at 11:45 AM, Jean-Christophe PLAGNIOL-VILLARD > <plagnioj@jcrosoft.com> wrote: > > On 18:40 Wed 02 Oct , David Herrmann wrote: > >> The dmi_list array is initialized using gnu designated initializers, and > >> therefore may contain fewer explicitly defined entries as there are > >> elements in it. This is because the enum above with M_xyz constants > >> contains more items than the designated initializer. Those elements not > >> explicitly initialized are implicitly set to 0. > >> > >> Now efifb_setup() loops through all these array elements, and performs > >> a strcmp on each item. For non explicitly initialized elements this will > >> be a null pointer: > >> > >> This patch swaps the check order in the if statement, thus checks first > >> whether dmi_list[i].base is null. > >> > >> Signed-off-by: James Bates <james.h.bates@yahoo.com> > >> Signed-off-by: David Herrmann <dh.herrmann@gmail.com> > > > > with the simpleDRM arriving next merge I'm wondering if we need to keep it? > > SimpleDRM is not coming next merge-window. It's basically finished, > but I'm still working on the user-space side as its KMS api is highly > reduced compared to fully-featured DRM/KMS drivers. Maybe 3.13 will > work out. do you have a git tree for the simpleDRM that I can pull? > > Anyhow, this patch is still needed as it fixes a serious bug for simplefb. ok > > Thanks > David
WARNING: multiple messages have this Message-ID (diff)
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> To: David Herrmann <dh.herrmann@gmail.com> Cc: "linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>, James Bates <james.h.bates@gmail.com>, linux-kernel <linux-kernel@vger.kernel.org>, Tomi Valkeinen <tomi.valkeinen@ti.com>, James Bates <james.h.bates@yahoo.com> Subject: Re: [PATCH v2] efifb: prevent null-deref when iterating dmi_list Date: Fri, 01 Nov 2013 11:10:20 +0000 [thread overview] Message-ID: <20131101111020.GD18477@ns203013.ovh.net> (raw) In-Reply-To: <CANq1E4QAwOG8Vdw2nCb8+LirZ278w58j+wpieeKvnNepga+baw@mail.gmail.com> On 17:17 Thu 31 Oct , David Herrmann wrote: > Hi > > On Thu, Oct 31, 2013 at 11:45 AM, Jean-Christophe PLAGNIOL-VILLARD > <plagnioj@jcrosoft.com> wrote: > > On 18:40 Wed 02 Oct , David Herrmann wrote: > >> The dmi_list array is initialized using gnu designated initializers, and > >> therefore may contain fewer explicitly defined entries as there are > >> elements in it. This is because the enum above with M_xyz constants > >> contains more items than the designated initializer. Those elements not > >> explicitly initialized are implicitly set to 0. > >> > >> Now efifb_setup() loops through all these array elements, and performs > >> a strcmp on each item. For non explicitly initialized elements this will > >> be a null pointer: > >> > >> This patch swaps the check order in the if statement, thus checks first > >> whether dmi_list[i].base is null. > >> > >> Signed-off-by: James Bates <james.h.bates@yahoo.com> > >> Signed-off-by: David Herrmann <dh.herrmann@gmail.com> > > > > with the simpleDRM arriving next merge I'm wondering if we need to keep it? > > SimpleDRM is not coming next merge-window. It's basically finished, > but I'm still working on the user-space side as its KMS api is highly > reduced compared to fully-featured DRM/KMS drivers. Maybe 3.13 will > work out. do you have a git tree for the simpleDRM that I can pull? > > Anyhow, this patch is still needed as it fixes a serious bug for simplefb. ok > > Thanks > David
next prev parent reply other threads:[~2013-11-01 11:46 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-10-02 16:40 [PATCH v2] efifb: prevent null-deref when iterating dmi_list David Herrmann 2013-10-02 16:40 ` David Herrmann 2013-10-02 16:43 ` [PATCH v3] " David Herrmann 2013-10-02 16:43 ` David Herrmann 2013-10-19 10:40 ` David Herrmann 2013-10-19 10:40 ` David Herrmann 2013-10-29 10:42 ` Tomi Valkeinen 2013-10-29 10:42 ` Tomi Valkeinen 2013-10-31 10:45 ` [PATCH v2] " Jean-Christophe PLAGNIOL-VILLARD 2013-10-31 10:45 ` Jean-Christophe PLAGNIOL-VILLARD 2013-10-31 16:17 ` David Herrmann 2013-10-31 16:17 ` David Herrmann 2013-11-01 11:10 ` Jean-Christophe PLAGNIOL-VILLARD [this message] 2013-11-01 11:10 ` Jean-Christophe PLAGNIOL-VILLARD 2013-11-01 12:09 ` David Herrmann 2013-11-01 12:09 ` David Herrmann
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20131101111020.GD18477@ns203013.ovh.net \ --to=plagnioj@jcrosoft.com \ --cc=dh.herrmann@gmail.com \ --cc=james.h.bates@gmail.com \ --cc=james.h.bates@yahoo.com \ --cc=linux-fbdev@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=tomi.valkeinen@ti.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.