mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-30 14:50:36 +00:00
365fba2440
Surround the main data mapping with PROT_NONE pages to make virtual address layout more consistent across different configurations (static/non-static build) and C repros. One observed case before: executor had a mapping above the data mapping (output region), while C repros did not have that mapping above, as the result in one case VMA had next link, while in the other it didn't and it caused a bug to not reproduce with the C repro. The bug that reproduces only with the mapping above: https://lkml.org/lkml/2020/4/17/819
23 lines
540 B
Go
23 lines
540 B
Go
// Copyright 2017 syzkaller project authors. All rights reserved.
|
|
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
|
|
|
package freebsd
|
|
|
|
import (
|
|
"github.com/google/syzkaller/prog"
|
|
"github.com/google/syzkaller/sys/targets"
|
|
)
|
|
|
|
func InitTarget(target *prog.Target) {
|
|
arch := &arch{
|
|
unix: targets.MakeUnixNeutralizer(target),
|
|
}
|
|
|
|
target.MakeDataMmap = targets.MakePosixMmap(target, true, false)
|
|
target.Neutralize = arch.unix.Neutralize
|
|
}
|
|
|
|
type arch struct {
|
|
unix *targets.UnixNeutralizer
|
|
}
|