[google/syzkaller] 230553: prog/types.go: add Type.Alignment() and TypeCommon...

3 views
Skip to first unread message

Albert van der Linde

unread,
Jul 14, 2020, 6:20:57 AM7/14/20
to syzk...@googlegroups.com
Branch: refs/heads/master
Home: https://github.com/google/syzkaller
Commit: 230553f68fcaa90508b724edd0dfc806669c1f22
https://github.com/google/syzkaller/commit/230553f68fcaa90508b724edd0dfc806669c1f22
Author: Albert van der Linde <ali...@google.com>
Date: 2020-07-14 (Tue, 14 Jul 2020)

Changed paths:
M pkg/compiler/gen.go
M pkg/compiler/types.go
M prog/types.go

Log Message:
-----------
prog/types.go: add Type.Alignment() and TypeCommon.TypeAlign

Type.Alignment() can be used to obtain byte alignment for
correctly allocating aligned memory for the Type.


Commit: 6f4580264a29fa73097e96b436141a8594b97610
https://github.com/google/syzkaller/commit/6f4580264a29fa73097e96b436141a8594b97610
Author: Albert van der Linde <ali...@google.com>
Date: 2020-07-14 (Tue, 14 Jul 2020)

Changed paths:
M prog/alloc.go
M prog/alloc_test.go
M prog/encoding.go
M prog/rand.go
M prog/target.go
M tools/syz-trace2syz/proggen/proggen.go

Log Message:
-----------
prog/alloc: align address allocation for aligned[addr]

Calls to alloc didn't respect the alignment attribute. Now
Type.Alignment() is used to ensure each type is correctly
aligned. Existing descriptions with [align[X]] don't have an
issue as they align to small blocks and default align is to
64 bytes. This commits adds support for [align[X]] for an X
larger than 64.


Compare: https://github.com/google/syzkaller/compare/ce4c95b3a67e...6f4580264a29
Reply all
Reply to author
Forward
0 new messages