All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] setexpr: Correct various bugs and add tests plus string support
@ 2020-11-01 21:15 Simon Glass
  2020-11-01 21:15 ` [PATCH 01/10] test: Add some tests for setexpr Simon Glass
                   ` (9 more replies)
  0 siblings, 10 replies; 38+ messages in thread
From: Simon Glass @ 2020-11-01 21:15 UTC (permalink / raw)
  To: u-boot

This command has several bugs that were discovered in trying to get zboot
to make use of regular expression substitution:

- reads the wrong values with 'setexpr.l' or 'setexpr' on 64-bit machines
- buffer overflow of main string buffer
- buffer overflow of 'new' string buffer
- produces the wrong string in some cases when using back references

This series corrects these bugs and adds regression tests for them. It
also adds several other tests for the command and the core logic of
setexpr.

Finally, with Chrome OS boot it is necessary to read a command-line string
from memory, process it with a regex and then provide it to the zboot
command. So this series adds support for these features, as well as string
concatenation.

This series is available at u-boot-dm/sete-working


Simon Glass (10):
  test: Add some tests for setexpr
  command: Add constants for cmd_get_data_size string / error
  setexpr: Add explicit support for 32- and 64-bit ints
  test: Add some setexpr regex tests
  setexpr: Split the core logic into its own function
  setexpr: Add some tests for buffer overflow and backref
  setexpr: Correct dropping of final unmatched string
  setexpr: Correct buffer overflow bug and enable tests
  setexpr: Convert to use a struct for values
  setexpr: Add support for strings

 cmd/itest.c           |   4 +-
 cmd/mem.c             |   2 +-
 cmd/setexpr.c         | 336 ++++++++++++++++++++++++------------
 common/command.c      |   4 +-
 include/command.h     |  43 ++++-
 include/test/suites.h |   2 +
 test/cmd/Makefile     |   1 +
 test/cmd/setexpr.c    | 384 ++++++++++++++++++++++++++++++++++++++++++
 test/cmd_ut.c         |   3 +
 9 files changed, 664 insertions(+), 115 deletions(-)
 create mode 100644 test/cmd/setexpr.c

-- 
2.29.1.341.ge80a0c044ae-goog

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2021-01-20  0:17 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-01 21:15 [PATCH 00/10] setexpr: Correct various bugs and add tests plus string support Simon Glass
2020-11-01 21:15 ` [PATCH 01/10] test: Add some tests for setexpr Simon Glass
2020-12-02 21:22   ` Tom Rini
2020-11-01 21:15 ` [PATCH 02/10] command: Add constants for cmd_get_data_size string / error Simon Glass
2020-12-02 21:22   ` Tom Rini
2020-11-01 21:15 ` [PATCH 03/10] setexpr: Add explicit support for 32- and 64-bit ints Simon Glass
2020-12-02 21:22   ` Tom Rini
2020-11-01 21:15 ` [PATCH 04/10] test: Add some setexpr regex tests Simon Glass
2020-12-02 21:22   ` Tom Rini
2020-11-01 21:15 ` [PATCH 05/10] setexpr: Split the core logic into its own function Simon Glass
2020-12-02 21:22   ` Tom Rini
2020-11-01 21:15 ` [PATCH 06/10] setexpr: Add some tests for buffer overflow and backref Simon Glass
2020-12-02 21:23   ` Tom Rini
2021-01-17 22:52   ` CRASH caused by: " Heinrich Schuchardt
2021-01-19 18:06     ` Simon Glass
2021-01-19 19:07       ` Heinrich Schuchardt
2021-01-19 19:45       ` Tom Rini
2021-01-20  0:17         ` Simon Glass
2020-11-01 21:15 ` [PATCH 07/10] setexpr: Correct dropping of final unmatched string Simon Glass
2020-12-02 21:23   ` Tom Rini
2020-11-01 21:15 ` [PATCH 08/10] setexpr: Correct buffer overflow bug and enable tests Simon Glass
2020-12-02 21:23   ` Tom Rini
2020-11-01 21:15 ` [PATCH 09/10] setexpr: Convert to use a struct for values Simon Glass
2020-12-02 21:23   ` Tom Rini
2020-11-01 21:15 ` [PATCH 10/10] setexpr: Add support for strings Simon Glass
2020-11-01 23:08   ` Marek Behun
2020-11-03 15:12     ` Simon Glass
2020-11-03 16:30       ` Marek Behun
2020-11-05 16:49         ` Wolfgang Denk
2020-11-05 17:27         ` Simon Glass
2020-11-06 20:58           ` Tom Rini
2020-11-06 21:48             ` Simon Glass
2020-11-05 16:47       ` Wolfgang Denk
2020-11-05 17:27         ` Simon Glass
2020-11-05 17:50           ` Marek Behun
2020-11-05 19:10           ` Wolfgang Denk
2020-11-05 20:15             ` Simon Glass
2020-12-02 21:23   ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.