You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C strings instead of hex digits? It will make the reproducer much
more human understandable, as well making it easier to edit the string
when the developer is trying to do a better job minimizing the test
case than syzbot. For example:
memcpy(
(void*)0x20000000,
"\x6e\x6f\x75\x73\x65\x72\x5f\x78\x61\x74\x74\x72\x2c\x61\x63\x6c\x2c\x64"
"\x65\x62\x75\x67\x5f\x77\x61\x6e\x74\x5f\x65\x78\x74\x72\x61\x5f\x69\x73"
"\x69\x7a\x65\x3d\x30\x78\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30"
"\x30\x30\x38\x30\x2c\x6c\x61\x7a\x79\x74\x69\x6d\x65\x2c\x6e\x6f\x62\x68"
"\x2c\x71\x75\x6f\x74\x61\x2c\x00\x3d\x93\x09\x61\x36\x5d\x73\x58\x9c",
89);
Would be *much* more understable if it were:
memcpy(
(void*)0x20000000,
"nouser_xattr,acl,debug_want_extra_isize=0x0000000000000080,lazytime,nobh,quota,",
80);
In that particular case, it was apparently already squashed and therefore treated as a byte blob, but normally the printed operations are also far from being most concise. E.g.:
Add a new readable struct/union attribute to let users indicate that, when generating a C reproducer, this particular attribute should be squashed and printed as a human-readable string. E.g.
type fs_options[ELEMS] {
elems array[fs_opt_elem[ELEMS]]
common array[fs_opt_elem[fs_options_common]]
null const[0, int8]
} [packed, readable]
Questions
Are there any other cases where it can be helpful?
A related (but not exactly the same) scenario are network packets, where it might be better to copy raw packets as a whole, rather than many small memcpy operations.
The text was updated successfully, but these errors were encountered:
A more global issue: #1070
Context
An email from Ted:
Show
In that particular case, it was apparently already squashed and therefore treated as a byte blob, but normally the printed operations are also far from being most concise. E.g.:
Proposal
Currently we rely on
isReadableDataType
when we determine whether to print a value as a byte array or as a string:syzkaller/prog/encoding.go
Lines 951 to 953 in 1dac8c7
Add a new
readable
struct/union attribute to let users indicate that, when generating a C reproducer, this particular attribute should be squashed and printed as a human-readable string. E.g.Questions
Are there any other cases where it can be helpful?
A related (but not exactly the same) scenario are network packets, where it might be better to copy raw packets as a whole, rather than many small
memcpy
operations.The text was updated successfully, but these errors were encountered: