* grub2 claims grub.cfg is out of partition
@ 2011-07-20 21:50 Svante Signell
2011-07-20 22:02 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 1 reply; 8+ messages in thread
From: Svante Signell @ 2011-07-20 21:50 UTC (permalink / raw)
To: grub-devel
Have you seen this: Debian bug #634799. Seems to be a problem with Linux
on kvm too.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: grub2 claims grub.cfg is out of partition
2011-07-20 21:50 grub2 claims grub.cfg is out of partition Svante Signell
@ 2011-07-20 22:02 ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-07-20 22:17 ` Svante Signell
0 siblings, 1 reply; 8+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2011-07-20 22:02 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 484 bytes --]
On 20.07.2011 23:50, Svante Signell wrote:
> Have you seen this: Debian bug #634799. Seems to be a problem with Linux
> on kvm too.
>
Such bug forwarding requiring the potential bugfixer to search the
actual description somewhere lese is automatically ignored
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: grub2 claims grub.cfg is out of partition
2011-07-20 22:02 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2011-07-20 22:17 ` Svante Signell
2011-07-20 22:28 ` Samuel Thibault
0 siblings, 1 reply; 8+ messages in thread
From: Svante Signell @ 2011-07-20 22:17 UTC (permalink / raw)
To: Vladimir 'φ-coder/phcoder' Serbinenko; +Cc: grub-devel
On Thu, 2011-07-21 at 00:02 +0200, Vladimir 'φ-coder/phcoder' Serbinenko
wrote:
> On 20.07.2011 23:50, Svante Signell wrote:
> > Have you seen this: Debian bug #634799. Seems to be a problem with Linux
> > on kvm too.
> >
> Such bug forwarding requiring the potential bugfixer to search the
> actual description somewhere lese is automatically ignored
Sorry: Here is the link.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=634799
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: grub2 claims grub.cfg is out of partition
2011-07-20 22:17 ` Svante Signell
@ 2011-07-20 22:28 ` Samuel Thibault
2011-07-20 22:31 ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-07-20 22:33 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 2 replies; 8+ messages in thread
From: Samuel Thibault @ 2011-07-20 22:28 UTC (permalink / raw)
To: The development of GNU GRUB
Cc: Vladimir 'φ-coder/phcoder' Serbinenko, 634799
[-- Attachment #1: Type: text/plain, Size: 371 bytes --]
tags 634799 + upstream patch
thanks
Hello,
Digging a bit with the issue, it seems grub2 does not ignore entries
with inode == 0 while it should. See linux' ext2_readdir() in
fs/ext2/dir.c doing it:
for ( ;(char*)de <= limit; de = ext2_next_entry(de)) {
if (de->inode) {
...
}
}
The attached patch fixes it. Shall I commit it to upstream grub2?
Samuel
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 421 bytes --]
=== modified file 'grub-core/fs/ext2.c'
--- grub-core/fs/ext2.c 2011-04-11 21:01:51 +0000
+++ grub-core/fs/ext2.c 2011-07-20 22:20:43 +0000
@@ -689,7 +689,7 @@ grub_ext2_iterate_dir (grub_fshelp_node_
if (dirent.direntlen == 0)
return 0;
- if (dirent.namelen != 0)
+ if (dirent.inode != 0 && dirent.namelen != 0)
{
char filename[dirent.namelen + 1];
struct grub_fshelp_node *fdiro;
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: grub2 claims grub.cfg is out of partition
2011-07-20 22:28 ` Samuel Thibault
@ 2011-07-20 22:31 ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-07-20 22:54 ` Samuel Thibault
2011-07-20 22:33 ` Vladimir 'φ-coder/phcoder' Serbinenko
1 sibling, 1 reply; 8+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2011-07-20 22:31 UTC (permalink / raw)
To: Samuel Thibault; +Cc: The development of GNU GRUB, 634799
[-- Attachment #1: Type: text/plain, Size: 822 bytes --]
On 21.07.2011 00:28, Samuel Thibault wrote:
> tags 634799 + upstream patch
> thanks
>
> Hello,
>
I've looked into it and arrived to the similar conclusion that the
grub.cfg.new with inode = 0 is the problem. However I think no such
entries should be there in the first place. In any case GRUB must be
robust to such corruptions but I'd recommend to fix Hurd ext2
implementation as well.
> Digging a bit with the issue, it seems grub2 does not ignore entries
> with inode == 0 while it should. See linux' ext2_readdir() in
> fs/ext2/dir.c doing it:
>
> for ( ;(char*)de <= limit; de = ext2_next_entry(de)) {
> if (de->inode) {
> ...
> }
> }
>
> The attached patch fixes it. Shall I commit it to upstream grub2?
>
> Samuel
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: grub2 claims grub.cfg is out of partition
2011-07-20 22:28 ` Samuel Thibault
2011-07-20 22:31 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2011-07-20 22:33 ` Vladimir 'φ-coder/phcoder' Serbinenko
1 sibling, 0 replies; 8+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2011-07-20 22:33 UTC (permalink / raw)
To: Samuel Thibault; +Cc: The development of GNU GRUB, 634799
[-- Attachment #1: Type: text/plain, Size: 673 bytes --]
On 21.07.2011 00:28, Samuel Thibault wrote:
> The attached patch fixes it. Shall I commit it to upstream grub2?
>
Go ahead
> Samuel
> patch
>
>
> === modified file 'grub-core/fs/ext2.c'
> --- grub-core/fs/ext2.c 2011-04-11 21:01:51 +0000
> +++ grub-core/fs/ext2.c 2011-07-20 22:20:43 +0000
> @@ -689,7 +689,7 @@ grub_ext2_iterate_dir (grub_fshelp_node_
> if (dirent.direntlen == 0)
> return 0;
>
> - if (dirent.namelen != 0)
> + if (dirent.inode != 0 && dirent.namelen != 0)
> {
> char filename[dirent.namelen + 1];
> struct grub_fshelp_node *fdiro;
>
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: grub2 claims grub.cfg is out of partition
2011-07-20 22:31 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2011-07-20 22:54 ` Samuel Thibault
2011-07-20 23:14 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 1 reply; 8+ messages in thread
From: Samuel Thibault @ 2011-07-20 22:54 UTC (permalink / raw)
To: Vladimir 'φ-coder/phcoder' Serbinenko
Cc: The development of GNU GRUB, 634799
Vladimir 'φ-coder/phcoder' Serbinenko, le Thu 21 Jul 2011 00:31:51 +0200, a écrit :
> On 21.07.2011 00:28, Samuel Thibault wrote:
> > tags 634799 + upstream patch
> > thanks
> >
> > Hello,
> >
> I've looked into it and arrived to the similar conclusion that the
> grub.cfg.new with inode = 0 is the problem. However I think no such
> entries should be there in the first place.
Mmm, the following spec seems to say it is valid:
http://www.nongnu.org/ext2-doc/ext2.html#IFDIR-INODE
A value of 0 indicate that the entry is not used.
Samuel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: grub2 claims grub.cfg is out of partition
2011-07-20 22:54 ` Samuel Thibault
@ 2011-07-20 23:14 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 0 replies; 8+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2011-07-20 23:14 UTC (permalink / raw)
To: Samuel Thibault; +Cc: The development of GNU GRUB, 634799
[-- Attachment #1: Type: text/plain, Size: 994 bytes --]
On 21.07.2011 00:54, Samuel Thibault wrote:
> Vladimir 'φ-coder/phcoder' Serbinenko, le Thu 21 Jul 2011 00:31:51 +0200, a écrit :
>> On 21.07.2011 00:28, Samuel Thibault wrote:
>>> tags 634799 + upstream patch
>>> thanks
>>>
>>> Hello,
>>>
>> I've looked into it and arrived to the similar conclusion that the
>> grub.cfg.new with inode = 0 is the problem. However I think no such
>> entries should be there in the first place.
> Mmm, the following spec seems to say it is valid:
>
> http://www.nongnu.org/ext2-doc/ext2.html#IFDIR-INODE
>
> A value of 0 indicate that the entry is not used.
>
Even in this case I'd recommend avoiding creating such entries since
various third-party extN software (inclusive readers for other OS) is
tailored for Linux flavour. Being nearer to this de-facto reference
would facilitate interoperation. (but as I said GRUB implementation is
to be fixed regardless)
> Samuel
>
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-07-20 23:14 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-20 21:50 grub2 claims grub.cfg is out of partition Svante Signell
2011-07-20 22:02 ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-07-20 22:17 ` Svante Signell
2011-07-20 22:28 ` Samuel Thibault
2011-07-20 22:31 ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-07-20 22:54 ` Samuel Thibault
2011-07-20 23:14 ` Vladimir 'φ-coder/phcoder' Serbinenko
2011-07-20 22:33 ` Vladimir 'φ-coder/phcoder' Serbinenko
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.