Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scripts/dtc: Update to upstream version v1.6.1-66-gabbd523bae6e

This adds the following commits from upstream:

abbd523bae6e pylibfdt: Work-around SWIG limitations with flexible arrays
a41509bea3e7 libfdt: Replace deprecated 0-length arrays with proper flexible arrays
2cd89f862cdb dtc: Warning rather than error on possible truncation of cell values

Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/all/20230203172430.474431-1-robh@kernel.org/
Signed-off-by: Rob Herring <robh@kernel.org>

+11 -6
+8 -3
scripts/dtc/dtc-parser.y
··· 404 404 * within the mask to one (i.e. | in the 405 405 * mask), all bits are one. 406 406 */ 407 - if (($2 > mask) && (($2 | mask) != -1ULL)) 408 - ERROR(&@2, "Value out of range for" 409 - " %d-bit array element", $1.bits); 407 + if (($2 > mask) && (($2 | mask) != -1ULL)) { 408 + char *loc = srcpos_string(&@2); 409 + fprintf(stderr, 410 + "WARNING: %s: Value 0x%016" PRIx64 411 + " truncated to 0x%0*" PRIx64 "\n", 412 + loc, $2, $1.bits / 4, ($2 & mask)); 413 + free(loc); 414 + } 410 415 } 411 416 412 417 $$.data = data_append_integer($1.data, $2, $1.bits);
+2 -2
scripts/dtc/libfdt/fdt.h
··· 35 35 36 36 struct fdt_node_header { 37 37 fdt32_t tag; 38 - char name[0]; 38 + char name[]; 39 39 }; 40 40 41 41 struct fdt_property { 42 42 fdt32_t tag; 43 43 fdt32_t len; 44 44 fdt32_t nameoff; 45 - char data[0]; 45 + char data[]; 46 46 }; 47 47 48 48 #endif /* !__ASSEMBLY */
+1 -1
scripts/dtc/version_gen.h
··· 1 - #define DTC_VERSION "DTC 1.6.1-g55778a03" 1 + #define DTC_VERSION "DTC 1.6.1-gabbd523b"