[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [PATCH 2/2] Makefile.uk: workaround the string operation corruption



Hi Justin,

Following up on our offline discussion, and also inline with Costin's comment, 
I have just submitted a patch that solved this problem for me in what I think 
is a more robust way. Please have a look at that patch and potentially drop 
this one?

Thanks and best,
Santiago

On 19.12.19, 12:11, "Minios-devel on behalf of Costin Lupu" 
<minios-devel-bounces@xxxxxxxxxxxxxxxxxxxx on behalf of costin.lupu@xxxxxxxxx> 
wrote:

    Hi Justin,
    
    I don't think it's a good idea to upstream workarounds. You should
    actually investigate how -DPREFER_SIZE_OVER_SPEED affects the build.
    Were you using optimizations for your build?
    
    Cheers,
    Costin
    
    On 12/19/19 11:23 AM, Jia He wrote:
    > When start a helloworld app with newlib, there will be a boot crash
    > on arm64 plat:
    > [    0.000000] Info: [libkvmplat] setup.clibkvmplat @ 51   : Found device 
tree on: 0x40000000
    > [    0.000000] Info: [libkvmplat] pl011.clibkvmplat @ 119  : Serial 
initializing
    > [    0.000000] Info: [libkvmplat] pl011.clibkvmplat @ 139  : Found PL011 
UART on: 0x9000000
    > [    0.000000] Info: [libkvmplat] pl011.clibkvmplat @ 142  : PL011 UART 
initialized
    > [    0.000000] Info: [libkvmplat] setup.clibkvmplat @ 213  : Entering 
from KVM (arm64)...
    > [    0.000000] Info: [libkvmplat] setup.clibkvmplat @ 199  : No command 
line found
    > [    0.000000] Info: [libkvmplat] setup.clibkvmplat @ 69   : No PSCI 
conduit found in DTB
    > [    0.000000] Info: [libkvmplat] setup.clibkvmplat @ 93   : Support PSCI 
from PSCI-0.2
    > [    0.000000] Warn: [libkvmplat] setup.clibkvmplat @ 112  : No memory 
found in DTB
    > [    0.000000] Info: [libkvmgicv2] gic-v2.c @ 423  : Probing GICv2...
    > [    0.000000] dbg:  [libkvmofw] fdt.clibkvmofw @ 173  : reached root node
    > [    0.000000] dbg:  [libkvmofw] fdt.clibkvmofw @ 173  : reached root node
    > [    0.000000] Info: [libkvmgicv2] gic-v2.c @ 442  : Found GICv2 on:
    > 
    > Some fdt nodes are parsed incorrectly, especially for those compatible
    > strings with "\0“.
    > 
    > To work around the bug in newlib, we'd better enable 
PREFER_SIZE_OVER_SPEED
    > before we resolve the bug.
    > 
    > Signed-off-by: Jia He <justin.he@xxxxxxx>
    > ---
    >  Makefile.uk | 2 +-
    >  1 file changed, 1 insertion(+), 1 deletion(-)
    > 
    > diff --git a/Makefile.uk b/Makefile.uk
    > index 54efe1a..279954a 100644
    > --- a/Makefile.uk
    > +++ b/Makefile.uk
    > @@ -81,7 +81,7 @@ LIBNEWLIBM_CXXINCLUDES += -I$(LIBNEWLIB_LIBM)/common
    >  
################################################################################
    >  # Global flags
    >  
################################################################################
    > -LIBNEWLIB_GLOBAL_FLAGS-y  += -DMISSING_SYSCALL_NAMES -DMALLOC_PROVIDED
    > +LIBNEWLIB_GLOBAL_FLAGS-y  += -DMISSING_SYSCALL_NAMES -DMALLOC_PROVIDED 
-DPREFER_SIZE_OVER_SPEED
    >  LIBNEWLIB_GLOBAL_FLAGS-y  += -D_POSIX_REALTIME_SIGNALS
    >  LIBNEWLIB_GLOBAL_FLAGS-$(CONFIG_LIBNEWLIBC_WANT_IO_C99_FORMATS) += 
-D_WANT_IO_C99_FORMATS
    >  LIBNEWLIB_GLOBAL_FLAGS-$(CONFIG_LIBNEWLIBC_LINUX_ERRNO_EXTENSIONS) += 
-D__LINUX_ERRNO_EXTENSIONS__
    > 
    
    _______________________________________________
    Minios-devel mailing list
    Minios-devel@xxxxxxxxxxxxxxxxxxxx
    https://lists.xenproject.org/mailman/listinfo/minios-devel

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.