Skip to content

Commit 0de8faa

Browse files
authored
Merge branch 'master' into master
2 parents bc29f84 + 254a27c commit 0de8faa

File tree

7 files changed

+508
-23
lines changed

7 files changed

+508
-23
lines changed

.github/workflows/gemini-pr-review.yml

Lines changed: 474 additions & 0 deletions
Large diffs are not rendered by default.

dashboard/app/templates/templates.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ <h1>{{.Caption}}:</h1>
631631
<td class="stat">{{link $item.KernelCommitLink (formatTagHash $item.KernelCommit)}}</td>
632632
<td>
633633
{{if $item.ReproCLink}}<a href="{{$item.ReproCLink}}">C</a>
634-
{{else if $item.ReproSyzLink}}<a href="{{$item.ReproSyzLink}}">C</a>{{end}}
634+
{{else if $item.ReproSyzLink}}<a href="{{$item.ReproSyzLink}}">syz</a>{{end}}
635635
</td>
636636
{{if ne $item.CrashTitle ""}}
637637
<td class="status-crashed">

pkg/build/linux.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,6 @@ func runMake(params Params, extraArgs ...string) error {
175175
"KBUILD_BUILD_TIMESTAMP=now",
176176
"KBUILD_BUILD_USER=syzkaller",
177177
"KBUILD_BUILD_HOST=syzkaller",
178-
"KERNELVERSION=syzkaller",
179-
"KERNELRELEASE=syzkaller",
180-
"LOCALVERSION=-syzkaller",
181178
)
182179
output, err := osutil.Run(time.Hour, cmd)
183180
params.Tracer.Log("Build log:\n%s", output)
@@ -186,6 +183,11 @@ func runMake(params Params, extraArgs ...string) error {
186183

187184
func LinuxMakeArgs(target *targets.Target, compiler, linker, ccache, buildDir string, jobs int) []string {
188185
args := []string{
186+
// Make still overrides these if they are passed as env variables.
187+
// Let's pass them directly as make arguments.
188+
"KERNELVERSION=syzkaller",
189+
"KERNELRELEASE=syzkaller",
190+
"LOCALVERSION=-syzkaller",
189191
"-j", fmt.Sprint(jobs),
190192
"ARCH=" + target.KernelArch,
191193
}

pkg/rpcserver/rpcserver.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,11 @@ type server struct {
111111
}
112112

113113
type Stats struct {
114-
StatExecs *stat.Val
115-
StatNumFuzzing *stat.Val
116-
StatVMRestarts *stat.Val
117-
StatModules *stat.Val
114+
StatExecs *stat.Val
115+
StatNumFuzzing *stat.Val
116+
StatVMRestarts *stat.Val
117+
StatModules *stat.Val
118+
StatExecutorRestarts *stat.Val
118119
}
119120

120121
func NewStats() Stats {
@@ -139,6 +140,8 @@ func NewNamedStats(name string) Stats {
139140
stat.Rate{}, stat.NoGraph),
140141
StatModules: stat.New("modules"+suffix, "Number of loaded kernel modules",
141142
stat.NoGraph, stat.Link("/modules"+linkSuffix)),
143+
StatExecutorRestarts: stat.New("executor restarts"+suffix,
144+
"Number of times executor process was restarted", stat.Rate{}, stat.Graph("executor")),
142145
}
143146
}
144147

@@ -209,8 +212,7 @@ func newImpl(cfg *Config, mgr Manager) *server {
209212
statExecRetries: stat.New("exec retries",
210213
"Number of times a test program was restarted because the first run failed",
211214
stat.Rate{}, stat.Graph("executor")),
212-
statExecutorRestarts: stat.New("executor restarts",
213-
"Number of times executor process was restarted", stat.Rate{}, stat.Graph("executor")),
215+
statExecutorRestarts: cfg.Stats.StatExecutorRestarts,
214216
statExecBufferTooSmall: queue.StatExecBufferTooSmall,
215217
statExecs: cfg.Stats.StatExecs,
216218
statNoExecRequests: queue.StatNoExecRequests,

pkg/symbolizer/addr2line.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func parse(interner *Interner, s *bufio.Scanner) ([]Frame, error) {
138138
var frames []Frame
139139
for s.Scan() {
140140
ln := s.Text()
141-
if len(ln) > 3 && ln[0] == '0' && ln[1] == 'x' {
141+
if len(ln) >= 3 && ln[0] == '0' && ln[1] == 'x' {
142142
break
143143
}
144144
fn := ln

syz-cluster/pkg/db/stats_repo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func (repo *StatsRepository) FindingsPerWeek(ctx context.Context) (
4646
TIMESTAMP_TRUNC(Sessions.FinishedAt, WEEK) as Date,
4747
COUNT(*) as Count
4848
FROM Findings
49-
JOIN Sessions ON Sessions.ID = Findings.SessionID
49+
JOIN Sessions ON Sessions.ID = Findings.SessionID AND Sessions.FinishedAt IS NOT NULL
5050
GROUP BY Date
5151
ORDER BY Date`,
5252
})

syz-cluster/pkg/db/stats_repo_test.go

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,26 @@ func TestStatsSQLs(t *testing.T) {
1515
// That already brings a lot of value.
1616
client, ctx := NewTransientDB(t)
1717

18-
// Add some data to test field decoding as well.
18+
checkStats := func() {
19+
statsRepo := NewStatsRepository(client)
20+
_, err := statsRepo.ProcessedSeriesPerWeek(ctx)
21+
assert.NoError(t, err)
22+
_, err = statsRepo.FindingsPerWeek(ctx)
23+
assert.NoError(t, err)
24+
_, err = statsRepo.SessionStatusPerWeek(ctx)
25+
assert.NoError(t, err)
26+
_, err = statsRepo.DelayPerWeek(ctx)
27+
assert.NoError(t, err)
28+
}
29+
1930
dtd := &dummyTestData{t, ctx, client}
2031
session := dtd.dummySession(dtd.dummySeries())
32+
checkStats()
2133
dtd.startSession(session)
34+
dtd.addSessionTest(session, "test")
35+
checkStats()
36+
dtd.addFinding(session, "test", "test")
37+
checkStats()
2238
dtd.finishSession(session)
23-
24-
statsRepo := NewStatsRepository(client)
25-
_, err := statsRepo.ProcessedSeriesPerWeek(ctx)
26-
assert.NoError(t, err)
27-
_, err = statsRepo.FindingsPerWeek(ctx)
28-
assert.NoError(t, err)
29-
_, err = statsRepo.SessionStatusPerWeek(ctx)
30-
assert.NoError(t, err)
31-
_, err = statsRepo.DelayPerWeek(ctx)
32-
assert.NoError(t, err)
39+
checkStats()
3340
}

0 commit comments

Comments
 (0)