diff options
author | Rob Herring <robh@kernel.org> | 2023-02-03 16:13:46 +0100 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2023-02-06 18:03:00 +0100 |
commit | ec340077a8477020a347ee2e7cd7415efeec3898 (patch) | |
tree | 01cadb9c82185ae81aa0b669ccebdc40db39c49f /scripts/dtc/dtc-parser.y | |
parent | of: make of_node_ktype constant (diff) | |
download | linux-ec340077a8477020a347ee2e7cd7415efeec3898.tar.xz linux-ec340077a8477020a347ee2e7cd7415efeec3898.zip |
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>
Diffstat (limited to 'scripts/dtc/dtc-parser.y')
-rw-r--r-- | scripts/dtc/dtc-parser.y | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/dtc/dtc-parser.y b/scripts/dtc/dtc-parser.y index 46457d4bc0aa..bff1337ec266 100644 --- a/scripts/dtc/dtc-parser.y +++ b/scripts/dtc/dtc-parser.y @@ -404,9 +404,14 @@ arrayprefix: * within the mask to one (i.e. | in the * mask), all bits are one. */ - if (($2 > mask) && (($2 | mask) != -1ULL)) - ERROR(&@2, "Value out of range for" - " %d-bit array element", $1.bits); + if (($2 > mask) && (($2 | mask) != -1ULL)) { + char *loc = srcpos_string(&@2); + fprintf(stderr, + "WARNING: %s: Value 0x%016" PRIx64 + " truncated to 0x%0*" PRIx64 "\n", + loc, $2, $1.bits / 4, ($2 & mask)); + free(loc); + } } $$.data = data_append_integer($1.data, $2, $1.bits); |