viviskas / github-slideshow

A robot powered training repository :robot:
https://lab.github.com/githubtraining/introduction-to-github
MIT License
0 stars 1 forks source link

Sec- #19

Open viviskas opened 3 years ago

viviskas commented 3 years ago
    • [ ] # []()@snyk-bot This XML file does not appear to have any style information associated with it. The document tree is shown below.

<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">

Recent changes to 315: Kernel 2043 does not boot https://sourceforge.net/p/freedos/bugs/315/ Recent changes to 315: Kernel 2043 does not boot en Tue, 29 Jun 2021 20:17:20 -0000 #315 Kernel 2043 does not boot https://sourceforge.net/p/freedos/bugs/315/?limit=25#d209
  • status: open --> closed-fixed
  • assigned_to: Kenneth Davis
Jim Hall Tue, 29 Jun 2021 20:17:20 -0000 https://sourceforge.netc14bbf39c4eca8c8066876b1a8567ebabb0f5045
#315 Kernel 2043 does not boot https://sourceforge.net/p/freedos/bugs/315/?limit=25#cb1b

This bug can be closed then (by whomever has access to do so) and I will create another bug to track upx --lzma support

Kenneth Davis Tue, 29 Jun 2021 19:26:56 -0000 https://sourceforge.net938e6e514f2cd5c82efb4a47cad8813e8f44f63e
#315 Kernel 2043 does not boot https://sourceforge.net/p/freedos/bugs/315/?limit=25#f635/04fa

BINGO!

replacing --lzma with --best and everything is back to normal!

however this is strange, as I have compiled quite a few kernels using --lzma.

however this can wait to another day; case closed for me for now.

tom ehlert Tue, 29 Jun 2021 18:17:04 -0000 https://sourceforge.net9109ccd773a17ec2bddd09d769ab7cee202d952a
#315 Kernel 2043 does not boot https://sourceforge.net/p/freedos/bugs/315/?limit=25#f635

I need to look into the upx decompressor logic to see why though; the kernel jumps past the config section, then jumps past size bytes (where size is the packed kernel size) to the trailer which shifts the kernel down and then jumps to the start of the packed kernel. I wonder how much stack the lzma decompressor needs or if it is some other change ... Please let me know if changing the UPX setting gets your compiled kernel to boot for you?

Kenneth Davis Tue, 29 Jun 2021 18:09:30 -0000 https://sourceforge.net095f92da3be282d465f8fd8f1a7e5517aea46988
#315 Kernel 2043 does not boot https://sourceforge.net/p/freedos/bugs/315/?limit=25#20b5

lzma isn't supported for upx
change:
set XUPX=upx --lzma
to:
set XUPX=upx --8086 --best
or something similar

Kenneth Davis Tue, 29 Jun 2021 17:48:29 -0000 https://sourceforge.netf3d656a92b7e1c076a1fc3bee77e3a799bf126bc
#315 Kernel 2043 does not boot https://sourceforge.net/p/freedos/bugs/315/?limit=25#d747

I attach the output of the build process.

yes, UPX. I also don't remember seeing these EXEFLAT messages, but I can be wrong.

of course if EXEFLAT doesn't work proper, this would look similar ;)

tom ehlert Tue, 29 Jun 2021 17:26:11 -0000 https://sourceforge.nete668647dd222b78505623445cadefc1227ecbd30
#315 Kernel 2043 does not boot https://sourceforge.net/p/freedos/bugs/315/?limit=25#76e9

The boot code you are using is from 2002, in 2003 and 2004 there were several changes including one Bart has as fix FAT12 - not saying it is related, but it may be worthwhile to update your boot sector at some point. That said, nothing in the boot protocol should have changed since then so it should work. You don't mention seeing the 123 portions from the kernel, so it looks like the issue is when control is transferred to the kernel as the first thing the kernel should do is print 1. Are you using a UPX'd kernel? The releases are. I suspect an issue with exeflat. The differences in GetFatBlock are from compiling for 8086 vs 386; I have attached the corresponding disassembly from my 386 build which is identical to yours except my wdis doesn't add all the word ptr comments, the binary values are the same.

I am going to do some testing to see if I can reproduce the boot issue - try older boot.asm source and with/without UPX/386/etc.

Kenneth Davis Tue, 29 Jun 2021 17:06:35 -0000 https://sourceforge.neteb3c2fb259ec738491d902029fe825ce0227df07
#315 Kernel 2043 does not boot https://sourceforge.net/p/freedos/bugs/315/?limit=25#317c/bba4

Hallo Herr Kenneth Davis,

am Dienstag, 29. Juni 2021 um 15:46 schrieben Sie:

I will have a look this afternoon. What version of Watcom are you
using,
when comparing the .MAP files, I noticed that I had watcom 1.9
installed, while you used 2.0. so I installed the most recent windows
watcom, but the result (non bootable) remained the same.

by looking at the getFATblock code, I see that register calling
conventions are used. could this be the difference?

what os are you building from,
Windows XP

and what command are you using
to build?
windows cmd

Did you make the disk bootable with sys built at same
time or some other method?
long time ago, I don't know. but replacing kernel.sys by older kernels
reproducibly cures the problem.

Thank you.

tom ehlert Tue, 29 Jun 2021 15:52:45 -0000 https://sourceforge.net676f2c998393ea3137be16db382381084d73fbe1
#315 Kernel 2043 does not boot https://sourceforge.net/p/freedos/bugs/315/?limit=25#317c

I will have a look this afternoon. What version of Watcom are you using, what os are you building from, and what command are you using to build? Did you make the disk bootable with sys built at same time or some other method? Thank you.

Kenneth Davis Tue, 29 Jun 2021 13:46:35 -0000 https://sourceforge.netbaee3556c079b12445019550480b5c42c6065df8
#315 Kernel 2043 does not boot https://sourceforge.net/p/freedos/bugs/315/?limit=25#804a

follow up:
when I replace my kernel.sys with the kernel from https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/dos/kernel/2043/ everything works fine. that's good.

now I note that my fat32 kernel has a size of 44.489 byte, while the official is 46.485 byte.
that's really strange as I have no options added or removed wrt the distribution.

comparing the map files (official KWC.map to my kernel.map), I note size differences between almost all functions. a few bytes may or may be not expected, when the compiler is of slight different age. But I note that the size of my GetFatBlock at 0x7d is significant smaller then official 0x96.

could someone compare these few lines of disassembly and see if that makes any sense?
use
WDIS fattab.obj > fattab.cod
for disassembly.

I have so far no idea what this might be related to ...

tom ehlert Tue, 29 Jun 2021 12:18:49 -0000 https://sourceforge.netc30c4d3715591e5ba2add5a0aca191b5e7352451

_ Help critical secure !

viviskas commented 3 years ago

<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">

Recent changes to 315: Kernel 2043 does not boot https://sourceforge.net/p/freedos/bugs/315/ Recent changes to 315: Kernel 2043 does not boot en Tue, 29 Jun 2021 20:17:20 -0000 #315 Kernel 2043 does not boot https://sourceforge.net/p/freedos/bugs/315/?limit=25#d209
  • status: open --> closed-fixed
  • assigned_to: Kenneth Davis
Jim Hall Tue, 29 Jun 2021 20:17:20 -0000 https://sourceforge.netc14bbf39c4eca8c8066876b1a8567ebabb0f5045
#315 Kernel 2043 does not boot https://sourceforge.net/p/freedos/bugs/315/?limit=25#cb1b

This bug can be closed then (by whomever has access to do so) and I will create another bug to track upx --lzma support

Kenneth Davis Tue, 29 Jun 2021 19:26:56 -0000 https://sourceforge.net938e6e514f2cd5c82efb4a47cad8813e8f44f63e
#315 Kernel 2043 does not boot https://sourceforge.net/p/freedos/bugs/315/?limit=25#f635/04fa

BINGO!

replacing --lzma with --best and everything is back to normal!

however this is strange, as I have compiled quite a few kernels using --lzma.

however this can wait to another day; case closed for me for now.

tom ehlert Tue, 29 Jun 2021 18:17:04 -0000 https://sourceforge.net9109ccd773a17ec2bddd09d769ab7cee202d952a
#315 Kernel 2043 does not boot https://sourceforge.net/p/freedos/bugs/315/?limit=25#f635

I need to look into the upx decompressor logic to see why though; the kernel jumps past the config section, then jumps past size bytes (where size is the packed kernel size) to the trailer which shifts the kernel down and then jumps to the start of the packed kernel. I wonder how much stack the lzma decompressor needs or if it is some other change ... Please let me know if changing the UPX setting gets your compiled kernel to boot for you?

Kenneth Davis Tue, 29 Jun 2021 18:09:30 -0000 https://sourceforge.net095f92da3be282d465f8fd8f1a7e5517aea46988
#315 Kernel 2043 does not boot https://sourceforge.net/p/freedos/bugs/315/?limit=25#20b5

lzma isn't supported for upx
change:
set XUPX=upx --lzma
to:
set XUPX=upx --8086 --best
or something similar

Kenneth Davis Tue, 29 Jun 2021 17:48:29 -0000 https://sourceforge.netf3d656a92b7e1c076a1fc3bee77e3a799bf126bc
#315 Kernel 2043 does not boot https://sourceforge.net/p/freedos/bugs/315/?limit=25#d747

I attach the output of the build process.

yes, UPX. I also don't remember seeing these EXEFLAT messages, but I can be wrong.

of course if EXEFLAT doesn't work proper, this would look similar ;)

tom ehlert Tue, 29 Jun 2021 17:26:11 -0000 https://sourceforge.nete668647dd222b78505623445cadefc1227ecbd30
#315 Kernel 2043 does not boot https://sourceforge.net/p/freedos/bugs/315/?limit=25#76e9

The boot code you are using is from 2002, in 2003 and 2004 there were several changes including one Bart has as fix FAT12 - not saying it is related, but it may be worthwhile to update your boot sector at some point. That said, nothing in the boot protocol should have changed since then so it should work. You don't mention seeing the 123 portions from the kernel, so it looks like the issue is when control is transferred to the kernel as the first thing the kernel should do is print 1. Are you using a UPX'd kernel? The releases are. I suspect an issue with exeflat. The differences in GetFatBlock are from compiling for 8086 vs 386; I have attached the corresponding disassembly from my 386 build which is identical to yours except my wdis doesn't add all the word ptr comments, the binary values are the same.

I am going to do some testing to see if I can reproduce the boot issue - try older boot.asm source and with/without UPX/386/etc.

Kenneth Davis Tue, 29 Jun 2021 17:06:35 -0000 https://sourceforge.neteb3c2fb259ec738491d902029fe825ce0227df07
#315 Kernel 2043 does not boot https://sourceforge.net/p/freedos/bugs/315/?limit=25#317c/bba4

Hallo Herr Kenneth Davis,

am Dienstag, 29. Juni 2021 um 15:46 schrieben Sie:

I will have a look this afternoon. What version of Watcom are you
using,
when comparing the .MAP files, I noticed that I had watcom 1.9
installed, while you used 2.0. so I installed the most recent windows
watcom, but the result (non bootable) remained the same.

by looking at the getFATblock code, I see that register calling
conventions are used. could this be the difference?

what os are you building from,
Windows XP

and what command are you using
to build?
windows cmd

Did you make the disk bootable with sys built at same
time or some other method?
long time ago, I don't know. but replacing kernel.sys by older kernels
reproducibly cures the problem.

Thank you.

tom ehlert Tue, 29 Jun 2021 15:52:45 -0000 https://sourceforge.net676f2c998393ea3137be16db382381084d73fbe1
#315 Kernel 2043 does not boot https://sourceforge.net/p/freedos/bugs/315/?limit=25#317c

I will have a look this afternoon. What version of Watcom are you using, what os are you building from, and what command are you using to build? Did you make the disk bootable with sys built at same time or some other method? Thank you.

Kenneth Davis Tue, 29 Jun 2021 13:46:35 -0000 https://sourceforge.netbaee3556c079b12445019550480b5c42c6065df8
#315 Kernel 2043 does not boot https://sourceforge.net/p/freedos/bugs/315/?limit=25#804a

follow up:
when I replace my kernel.sys with the kernel from https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/dos/kernel/2043/ everything works fine. that's good.

now I note that my fat32 kernel has a size of 44.489 byte, while the official is 46.485 byte.
that's really strange as I have no options added or removed wrt the distribution.

comparing the map files (official KWC.map to my kernel.map), I note size differences between almost all functions. a few bytes may or may be not expected, when the compiler is of slight different age. But I note that the size of my GetFatBlock at 0x7d is significant smaller then official 0x96.

could someone compare these few lines of disassembly and see if that makes any sense?
use
WDIS fattab.obj > fattab.cod
for disassembly.

I have so far no idea what this might be related to ...

tom ehlert Tue, 29 Jun 2021 12:18:49 -0000 https://sourceforge.netc30c4d3715591e5ba2add5a0aca191b5e7352451