[U-Boot] [PATCH 1/1] vsprintf.c: add EFI device path printing

Heinrich Schuchardt xypron.glpk at gmx.de
Sun Nov 26 13:21:29 UTC 2017


On 11/26/2017 02:11 PM, Wolfgang Denk wrote:
> Dear Heinrich,
> 
> In message <3e2e7f27-2fb6-97ad-bbab-f014b7ef684b at gmx.de> you wrote:
>>
>> You are absolutely right. The C standard defines printf as returning a
>> negative number if an error arises.
> 
> This is what we (what to) have in U-Boot, too.
> 
>> set_config_filename, dbg_snprintf_key(), bootstage_mark_code() - to name
>> a few - will access illegal memory addresses.
> 
> In this case you have identified a number of bugs, that need fixing.
> 
>> As long as we cannot assure that each and every caller of a printf
>> function handles negative return values correctly the only safe handling
>> of errors is to return 0 or panic().
> 
> Come on, be serious.  Of course we MUST assume that all callaers of
> a function behave according o the specs.  If they don;t then need
> fixing.  But you must NEVEr change behaviour of any code to deviate
> from the spec and documention just because you fear thay you lose
> bug compatibility.  That would be crazy.
> 
> 
> Best regards,
> 
> Wolfgang Denk
> 
Hello Wolfgang,

to cut it short, would you prefer

https://patchwork.ozlabs.org/patch/840912/

or

https://github.com/xypron/u-boot-odroid-c2/blob/qemu-x86_64/patch/0001-vsprintf.c-add-EFI-device-path-printing.patch

Best regards

Heinrich


More information about the U-Boot mailing list