From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Helge Deller <deller@gmx.de>, Parisc List <linux-parisc@vger.kernel.org>
Subject: Re: Do NOT upgrade to palo v2.10
Date: Tue, 30 Jul 2019 14:47:53 -0700 [thread overview]
Message-ID: <1564523273.4300.43.camel@HansenPartnership.com> (raw)
In-Reply-To: <1564522225.4300.39.camel@HansenPartnership.com>
On Tue, 2019-07-30 at 14:30 -0700, James Bottomley wrote:
> On Tue, 2019-07-30 at 22:58 +0200, Helge Deller wrote:
> > PALO version 2.10 was released last week, but it has a bug
> > which may prevent that you are able to boot your kernels:
> >
> > Entry 000e0000 first 000e0000 n 2
> > Segment 0 load 000e0000 size 8249207 mediaptr 0x1000
> > Abort: Would overwrite palo 00060000-000f8e30 or data 3faef580
> > areas.
> > ERROR: failed to load kernel
>
> Ah, that's unfortunate. It must be an artifact of compressed kernels
> because my uncompressed one boots here:
>
> Entry 00100000 first 00100000 n 5
> Segment 0 load 00100000 size 508616 mediaptr 0x1000
> Segment 1 load 0017d000 size 370864 mediaptr 0x7e000
> Segment 2 load 00200000 size 12026224 mediaptr 0xd9000
> Segment 3 load 00d79000 size 3850884 mediaptr 0xc52000
> Segment 4 load 01200000 size 2690120 mediaptr 0xfff000
> Loading ramdisk 24263780 bytes @ 3e8ca000...
>
> which would be why I never saw this.
This is what I'm currently testing as the fix; it reduces the bss from
6 .bss 0008d8b0 0006b580 0006b580 0000b5f8 2**6
ALLOC
To
6 .bss 0003d8b0 0006b600 0006b600 0000b654 2**6
ALLOC
Which will get us under 0x000e0000 assuming that's the lowest address a
kernel can be loaded at ...
James
---
diff --git a/ipl/ext2.c b/ipl/ext2.c
index 31b8469..d8b0c2f 100644
--- a/ipl/ext2.c
+++ b/ipl/ext2.c
@@ -475,17 +475,25 @@ static int ext3_extent_node_find(struct ext2_inode *ip,
static int ext3_extent_load_find(struct ext2_inode *ip, int leaf, int d,
int blkoff)
{
- static char blockbuf[EXTENT_MAX_DEPTH][EXT2_MAX_BLOCK_SIZE];
+ static char *blockbuf;
static int cached_blockno[EXTENT_MAX_DEPTH];
struct ext3_extent_header *hdr;
- hdr = (struct ext3_extent_header *)blockbuf[d];
+ if (!blockbuf) {
+ blockbuf = malloc(EXTENT_MAX_DEPTH*EXT2_MAX_BLOCK_SIZE);
+ if (!blockbuf) {
+ printf("Failed to allocate memory for block buffer\n");
+ return -1;
+ }
+ }
+
+ hdr = (struct ext3_extent_header *)&blockbuf[d * EXT2_MAX_BLOCK_SIZE];
if (cached_blockno[d] != leaf) {
printf("load extent tree[%d] block at %d\n", d, leaf);
- if (cons_read(dev, blockbuf[d], sizeof(blockbuf[d]),
+ if (cons_read(dev, hdr, EXT2_MAX_BLOCK_SIZE,
leaf * ext2_blocksize) !=
- sizeof(blockbuf[d])) {
+ EXT2_MAX_BLOCK_SIZE) {
printf("ext3_extent_load_find: read error\n");
return -1;
}
@@ -504,7 +512,7 @@ static int ext3_extent_load_find(struct ext2_inode *ip, int leaf, int d,
return -1;
}
if (sizeof(hdr) + sizeof(struct ext3_extent)*hdr->eh_entries >
- sizeof(blockbuf[d])) {
+ EXT2_MAX_BLOCK_SIZE) {
printf("ext3_extent_load_find: extent is larger than buffer\n");
return -1;
}
next prev parent reply other threads:[~2019-07-30 21:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-30 20:58 Do NOT upgrade to palo v2.10 Helge Deller
2019-07-30 21:30 ` James Bottomley
2019-07-30 21:47 ` James Bottomley [this message]
2019-07-30 21:54 ` Helge Deller
2019-07-31 14:45 ` James Bottomley
2019-07-31 14:49 ` Helge Deller
2019-07-31 8:04 ` Helge Deller
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=1564523273.4300.43.camel@HansenPartnership.com \
--to=james.bottomley@hansenpartnership.com \
--cc=deller@gmx.de \
--cc=linux-parisc@vger.kernel.org \
/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.