On 22.10.20 13:35, Ralf Ramsauer wrote: > > > On 22/10/2020 13:04, Jan Kiszka wrote: >> On 22.10.20 13:01, Ralf Ramsauer wrote: >>> Hi, >>> >>> On 10/22/20 12:09 PM, Andrea Bastoni wrote: >>>> Hi, >>>> >>>> On 20/10/2020 12:19, Jari Ronkainen wrote: >>>>> I noticed that dmesg gives me >>>>> >>>>> jailhouse: not as system configuration >>>> >>>> I'm hitting likely the same with Ubuntu 20.04, but not under Debian >>>> testing. >>>> >>>> It seems that the .note.gnu.property section is interfering with objcpy and >>>> causes the "JHSYST" identification to be removed from the .cell. >>>> >>>> Removing the section while copying the .o fixes the issue: >>>> >>>> objcopy --version >>>> GNU objcopy (GNU Binutils for Ubuntu) 2.34 >>>> >>>> readelf -a jailhouse/configs/x86/qemu-x86.o >>>> ... >>>> Displaying notes found in: .note.gnu.property >>>> Owner Data size Description >>>> GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0 >>>> Properties: x86 feature: IBT, SHSTK >>>> >>>> hexdump -C jailhouse/configs/x86/qemu-x86.cell >>>> 00000000 04 00 00 00 10 00 00 00 05 00 00 00 47 4e 55 00 >>>> |............GNU.| >>> >>> And the Gnu comes around and drops its own magic cowpat. ;-) >>> >> >> Hehe :) >> >>> Jan, maybe it's time to use a linker script for configs? This should >>> avoid such errors in the future. I think we have already seen something >>> similar in the past. >> >> I think it's rather time to make use of pyjailhouse, define a simple >> yaml equivalent of the C-based config format, and generate them without >> any C toolchain. I just received (valid) complaints about all that >> fragile num_whatever_elements and indexes again. > > Let me Cc Andrej, he's into the config stuff. What do you exactly > envision? I guess you would then also replace all configs with yaml > equivalents?
I was always hoping to find a magic higher expression from, but that will not happen anytime soon. So the most conservative approach would be defining a low-level equivalent that allows adding the same resources as the C-form permits, just resolving their counting and the reference-by-index issues. > > Makes it really hard to debug if we have a bug in our generator, as we > only have the raw binary. (Not saying that we don't see the same issues > with the GNU toolchain) > > I'd at least like to have something like a 'jailhouse config dump' that > creates a yaml from a given .cell file. This could also be used for the > initial conversion of our C configs. Exactly. We have a checker tool now, we should also add such a decompiler. Plus, we can (and should) fix that latest objcopy issue so that the current approach could be kept, at least as reference and while converting (sigh) existing configs. Jan -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/f16b13ef-0ae0-bd2a-dce6-0307e441d800%40siemens.com.
