All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: Toomas Soome <tsoome@me.com>,
	 The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: latest grub2 & unaligned pointer in gfxmenu
Date: Mon, 16 Feb 2015 09:14:32 +0100	[thread overview]
Message-ID: <54E1A6E8.7070902@gmail.com> (raw)
In-Reply-To: <01167E52-2B3A-4BAB-AFED-7DAACBCBE3D8@me.com>

[-- Attachment #1: Type: text/plain, Size: 1374 bytes --]

On 15.02.2015 16:57, Toomas Soome wrote:
> 
> ah, nevermind the gfxmenu;
> 
> the bug was triggered by [ -s filename ] test, with non-existing file. what happens is that grub_zfs_open() will get an error,  calls zfs_unmount and returns error code. then grub_file_open() jumps to fail_ label, calls grub_file_close(), which in turn gets back to zfs_unmount() and you get null pointer dereferences. 
> 
> so, the bug is about zfs_unmount() function and the fix is also simple, zfs_unmount should return if data == NULL.
> 
Sorry, it doesn't make any sense. In kern/file.c at fail label you have:
  if (device)
    grub_device_close (device);

  /* if (net) grub_net_close (net);  */

  grub_free (file);

  grub_memcpy (grub_file_filters_enabled, grub_file_filters_all,
	       sizeof (grub_file_filters_enabled));

Which has only grub_free, no grub_file_close call. Do you see sth
different there?
What kind of ZFS is it? Is it a simple one-device one or something more
complicated?
> 
> 
>> On 12.02.2015, at 20:28, Toomas Soome <tsoome@me.com> wrote:
>>
>>
>> hi!
>>
>> is there any known bugs related gfxmenu?  i’m getting unaligned pointer error on binary built on illumos (gcc-4.4.4).
>>
>> the issue only appears when theme is configured in grub.cfg, without it and gfxterm in cli mode does work.
>>
>> rgds,
>> toomas
> 
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 213 bytes --]

       reply	other threads:[~2015-02-16  9:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <6DC188A9-830D-4B44-8444-83A52B768F4A@me.com>
     [not found] ` <01167E52-2B3A-4BAB-AFED-7DAACBCBE3D8@me.com>
2015-02-16  8:14   ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2015-02-16 11:01     ` latest grub2 & unaligned pointer in gfxmenu Toomas Soome

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=54E1A6E8.7070902@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    --cc=tsoome@me.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: link
Be 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.