Re: GRUB2 Build on Mac OS X

2005-12-10 Thread Peter Jones
On Sat, 2005-12-10 at 01:23 +0100, Yoshinori K. Okuji wrote: > On Saturday 10 December 2005 12:32 am, Marco Gerards wrote: > > Anyways, my primary concerns are making things work and moving > > forwards to something that is releasable. Making GRUB work in a way > > so it works like everyone wants

Re: GRUB2 Build on Mac OS X

2005-12-10 Thread Marco Gerards
"Yoshinori K. Okuji" <[EMAIL PROTECTED]> writes: > On Friday 09 December 2005 12:40 am, Peter Jones wrote: >> Now, the obvious retort to this is that no setuid programs are calling >> grub, so it's not even one of those cases. That's not a good answer >> either. I've got one I'd really *like* to

Re: GRUB2 Build on Mac OS X

2005-12-09 Thread Yoshinori K. Okuji
On Saturday 10 December 2005 12:32 am, Marco Gerards wrote: > Wouldn't it be possible to use some other memory than the stack to > implement trampolines? It's documented quite well: By modifying GCC and a dynamic linker, it is possible. > Anyways, my primary concerns are making things work and m

Re: GRUB2 Build on Mac OS X

2005-12-09 Thread Yoshinori K. Okuji
On Friday 09 December 2005 12:40 am, Peter Jones wrote: > Now, the obvious retort to this is that no setuid programs are calling > grub, so it's not even one of those cases. That's not a good answer > either. I've got one I'd really *like* to call grub from, and it is > pm-hibernate, through cons

Re: GRUB2 Build on Mac OS X

2005-12-09 Thread Marco Gerards
Peter Jones <[EMAIL PROTECTED]> writes: >> Would be alright if we could enable execute permission only on the specific >> pages needed (as known by GCC)? GCC provides an ENABLE_EXECUTE_STACK macro, >> but it seems that is not currently used on Linux. It is used on the various >> BSDs. > > It wo

Re: GRUB2 Build on Mac OS X

2005-12-09 Thread Marco Gerards
Hollis Blanchard <[EMAIL PROTECTED]> writes: >> I really hope you're willing to entertain patches that remove use of >> nested functions.  If so, I'll certainly put some effort that direction >> when next I look at moving RHEL and Fedora to GRUB 2. > > I am willing to entertain them. > > Marco fou

Re: GRUB2 Build on Mac OS X

2005-12-09 Thread Peter Jones
On Fri, 2005-12-09 at 16:49 -0600, Hollis Blanchard wrote: > On Thursday 08 December 2005 10:27, Peter Jones wrote: > > > > That being said, what's the reasoning for using this uncommon and > > lossely defined extension in the first place? The way GRUB (both 2 and > > Legacy) uses nested functions

Re: GRUB2 Build on Mac OS X

2005-12-09 Thread Hollis Blanchard
On Thursday 08 December 2005 10:27, Peter Jones wrote: > > That being said, what's the reasoning for using this uncommon and > lossely defined extension in the first place?  The way GRUB (both 2 and > Legacy) uses nested functions, it's no better than just having a method > vector, and certainly no

Re: GRUB2 Build on Mac OS X

2005-12-09 Thread Marco Gerards
[EMAIL PROTECTED] writes: > Since the GRUB2 tools built using a Linux GCC compiler will suffice at > the moment, I can see why the team is not overly concerned with this > issue. If GRUB2 is going to be portable(Mac OS X), then some changes > will be needed to accomplish this goal. GCC is a GNU p

Re: GRUB2 Build on Mac OS X

2005-12-09 Thread Marco Gerards
Andrei Warkentin <[EMAIL PROTECTED]> writes: > On Dec 8, 2005, at 4:01 PM, [EMAIL PROTECTED] wrote: > >> The Mac OS X GCC compiler will not build GRUB2, due static linking >> at address 0x2000; this error can be confirmed during the configure >> process. If I could build GRUB2 using the Mac OS X G

Re: GRUB2 Build on Mac OS X

2005-12-08 Thread Peter Jones
On Thu, 2005-12-08 at 19:25 +0100, Yoshinori K. Okuji wrote: > > There's a major point of contention being ignored here. OS vendors > > don't want to ship executables which require an executable stack. Full > > stop. > > I'd like to hear your opinion as a distributor about the trend of prohibit

Re: GRUB2 Build on Mac OS X

2005-12-08 Thread Andrei Warkentin
Aside from compiling/linking issues, there is another thing to keep in mind should there ever be a port of bootable GRUB2 parts to OF/ Mach-O. OS X uses a different calling convention, so any assembly bits would have to be properly adjusted. I still think the best solution here would be to c

Re: GRUB2 Build on Mac OS X

2005-12-08 Thread Andrei Warkentin
December 8, 2005 08:10 PM To: 'The development of GRUB 2' Subject: Re: GRUB2 Build on Mac OS X I understand (still had my mind on GRUB 1 :)) - then looks like two GCC installations will be required to construct GRUB2 on OS X - one to generate OS X-hosted GRUB utilities (which will be Mac

Re: GRUB2 Build on Mac OS X

2005-12-08 Thread andre-smith
Thursday, December 8, 2005 08:10 PM > To: 'The development of GRUB 2' > Subject: Re: GRUB2 Build on Mac OS X > > I understand (still had my mind on GRUB 1 :)) - then looks like two > GCC installations will be > required to construct GRUB2 on OS X - one to generate OS X-hosted &

Re: GRUB2 Build on Mac OS X

2005-12-08 Thread Andrei Warkentin
Hmm, I just tried ./configure-ing.I have my powerpc-linux crosscompiler tools as powerpc-linux-{gcc, ld, ar, objcopy, etc}. It seems the configuration utility makes no distinction between compiler toolchain to make system utilities and compiler chain to make bootable executables.Naturally, this bei

Re: GRUB2 Build on Mac OS X

2005-12-08 Thread Marco Gerards
Andrei Warkentin <[EMAIL PROTECTED]> writes: > I understand (still had my mind on GRUB 1 :)) - then looks like two > GCC installations will be > required to construct GRUB2 on OS X - one to generate OS X-hosted > GRUB utilities (which will > be Mach-O files), and one to generate ELF files that wi

Re: GRUB2 Build on Mac OS X

2005-12-08 Thread Andrei Warkentin
I understand (still had my mind on GRUB 1 :)) - then looks like two GCC installations will be required to construct GRUB2 on OS X - one to generate OS X-hosted GRUB utilities (which will be Mach-O files), and one to generate ELF files that will be used in the booting process. On Dec 8, 200

Re: GRUB2 Build on Mac OS X

2005-12-08 Thread Marco Gerards
Andrei Warkentin <[EMAIL PROTECTED]> writes: Hi Andrei, > There is another issue with GRUB2 on OS X which I am not sure has > been brought up yet. > Right now, AFAIK (but I haven't tested it), GRUB2 (the part that runs > from OpenFrimware) can be built > with a bootstrap powerpc-elf-targetted GCC

Re: GRUB2 Build on Mac OS X

2005-12-08 Thread Andrei Warkentin
Hello, There is another issue with GRUB2 on OS X which I am not sure has been brought up yet. Right now, AFAIK (but I haven't tested it), GRUB2 (the part that runs from OpenFrimware) can be built with a bootstrap powerpc-elf-targetted GCC hosted on OS X. However, the local GRUB2 binary (one

Re: GRUB2 Build on Mac OS X

2005-12-08 Thread Marco Gerards
Peter Jones <[EMAIL PROTECTED]> writes: > On Thu, 2005-12-08 at 13:26 +0100, Marco Gerards wrote: > >> It's not acceptable to me to just remove the nested functions because >> someone broke some unofficial build of gcc. When an executable stack >> is not available, there are the following options

Re: GRUB2 Build on Mac OS X

2005-12-08 Thread Yoshinori K. Okuji
On Thursday 08 December 2005 05:27 pm, Peter Jones wrote: > That being said, what's the reasoning for using this uncommon and > lossely defined extension in the first place? Because it is documented very well in the manual and it makes our development easier. If you don't use nested functions, yo

Re: GRUB2 Build on Mac OS X

2005-12-08 Thread Peter Jones
On Thu, 2005-12-08 at 13:26 +0100, Marco Gerards wrote: > It's not acceptable to me to just remove the nested functions because > someone broke some unofficial build of gcc. When an executable stack > is not available, there are the following options (as I see them): I could be wrong, but GCC ap

Re: GRUB2 Build on Mac OS X

2005-12-08 Thread Andrei Warkentin
I think the best solution would be to entirely avoid Apple's bundled OS X-specific GCC. An powerpc-elf -targetted GCC cross-compiler hosted on OS X should be perfect for both OpenSolaris and for GRUB2. On Dec 8, 2005, at 12:10 AM, Andre Smith wrote: The GRUB2 build fails on Mac OS X, due to

Re: GRUB2 Build on Mac OS X

2005-12-08 Thread Marco Gerards
Andre Smith <[EMAIL PROTECTED]> writes: Hi Andre, > The GRUB2 build fails on Mac OS X, due to non-support of nested > functions in GCC on OS X. The reasoning behind this, the GCC > implementation of nested functions uses stack based execution. > Hackers use buffer overflows, along with stack base