| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Add flag values and update constants.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* sys/linux: fix count_encoders
The count_encoders field gives the length of the encoders_ptr field, not
count_modes field.
* sys/linux: make modes_ptr array of drm_mode_modeinfo structures
The modes_ptr is actually some number of drm_mode_modeinfo structures,
so make the array be properly sized.
* sys/linux: make drm_crtc_id into a resource
Calling the DRM_IOCTL_MODE_GETRESOURCES ioctl gets you available crtc
ids. Make a resource for drm_crtc_id and use it instead of trying to
guess the random number. Mark ioctl$DRM_IOCTL_MODE_GETPLANE as inout as
well so that we know it outputs a drm_crtc_id.
* sys/linux: make encoder_id into a resource
Make a resource for the encoder_id so that the
DRM_IOCTL_MODE_GETCONNECTOR ioctl can generate encoder ids. Otherwise
you have to hope that the random int32 matches the allocated number from
the kernel's idr.
* sys/linux: make prop_id into a resource
The DRM_IOCTL_MODE_GETCONNECTOR can be used to get available properties
and their ids. Otherwise you have to hope that the random int32 matches
the allocated number from the kernel's idr. Make this into a resource so
it can be used in other places as a known value.
* sys/linux: make connector_id into a resource
Use the DRM_IOCTL_GETRESOURCES ioctl to get the connector id. Make the
id into a resource so it can be used throughout instead of guessing the
int32. Similarly mark DRM_IOCTL_GETRESOURCES pointer argument as 'inout'
because the whole structure is an output that is used to get the
resources associated with a card (or fd_dri).
* sys/linux: make fb_id into a resource
Use the DRM_IOCTL_GETRESOURCES ioctl to get the framebuffer id. Make the
id into a resource so it can be used throughout instead of guessing the
int32.
* sys/linux: make a resource for base drm mode object
The drm UAPI treats an object id as generic int32 in the
DRM_IOCTL_MODE_OBJ_GETPROPERTIES ioctl. You use the id along with the
type field to find the properties associated with a particular object.
Make the object id be the base int32 that all other drm mode objects
inherit from.
* sys/linux: split DRM get/set crtc ioctls into two
These ioctls use the same structure but in the "get" case everything
besides the crtc_id is an output and the set_connectors_ptr is unused.
Split the ioctls into two so we can describe the differences.
* sys/linux: drm's DRM_IOCTL_VERSION takes an inout pointer
This is actually an inout pointer. Mark it as such although this
probably won't really do much because no resource is created by this
ioctl.
* sys/linux: indicate in and out for DRM_IOCTL_IRQ_BUSID
Mark the structure argument to this ioctl as inout and indicate that the
irq is the only element that is an output. This clarifies how this ioctl
works, although it is deprecated and is largely useless.
* sys/linux: handles for drm_mode_fb_cmd2 are GEM handles
The handles member of drm_mode_fb_cmd2 is an array of 4 drm_gem_handle
resources. Mark it as such.
* sys/linux: mark pointer to DRM_IOCTL_MODE_GETPLANERESOURCES inout
This ioctl is inout, because it gets the number of planes and their ids.
* sys/linux: add DRM_IOCTL_MODE_GETFB2 ioctl
This ioctl is missing from dev_dri.txt
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SHSTK(Shadow Stack) test file
CET(Control-flow Enforcement Technology) is a security feature that includes
shadow stack and end branch to prevent ROP(Return Oriented programming)/JOP
(Jump Oriented Programming) attack from the root cause.
User space SHSTK which prevents ROP attack for user space process is in Linux
tip repo:
https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/log/?h=x86/shstk
Add CET user space SHSTK test file in syzkaller to cover related fuzzing
tests.
Signed-off-by: Pengfei Xu <pengfei.xu@intel.com>
|
| |
|
|
|
| |
Add a regression test for:
https://github.com/torvalds/linux/commit/1c5950fc6fe996235f1d18539b9c6b64b597f50f
|
| |
|
|
|
|
|
| |
The msm gpu driver has a submit queue and some associated ioctls for it.
The driver uses an 'id' to identify an element in the queue. Make a
resource for this id and update the descriptions to use the resource so
we can provide better hints about what sorts of numbers to try here.
|
| |
|
|
| |
This comment is no longer relevant once we removed fd_msm_fence.
|
| |
|
|
|
| |
The handle is an output value, used for other gem handle inputs. Mark it
as such to clarify where gem handles come from.
|
| |
|
|
|
|
|
| |
Add test program for ioctl$IOMMU_TEST_OP_MD_CHECK_MAP and
ioctl$IOMMU_TEST_OP_MD_CHECK_REFS to hit them quickly.
Signed-off-by: yantingj <yanting.jiang@intel.com>
|
| |
|
|
| |
The syscall sets PKRU register which is part of protection keys (pkey).
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Background:
Linux kernel v6.2-rc1 and later versions have merged IOMMU_TEST_OP_MD_CHECK_MAP
and IOMMU_TEST_OP_MD_CHECK_REFS ioctl syscalls:
https://elixir.bootlin.com/linux/v6.2-rc1/source/drivers/iommu/iommufd/iommufd_test.h#L13
The Problem:
Syzkaller accidentally found a bug related to IOMMU_TEST_OP_MD_CHECK_REFS after
about 3 weeks fuzzing, and Jason Gunthorpe fixed it after the issue report:
Reported link: https://lore.kernel.org/all/Y%2FhOiilV1wJvu%2FHv@xpf.sh.intel.com/
Final fixed patch: https://lore.kernel.org/linux-iommu/0-v1-95390ed1df8d+8f-iommufd_mock_overflow_jgg@nvidia.com/
The Improvement:
Let syzkaller hit IOMMU_TEST_OP_MD_CHECK_MAP and IOMMU_TEST_OP_MD_CHECK_REFS
related syscalls easily and quickly, add these 2 new iommufd ioctl syscall
descriptions:
1. ioctl$IOMMU_TEST_OP_MD_CHECK_MAP(...);
2. ioctl$IOMMU_TEST_OP_MD_CHECK_REFS(...).
Signed-off-by: Pengfei Xu <pengfei.xu@intel.com>
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
We already try as hard as possible to not generate escaping (global) filenames.
However, it's possible we read them from the corpus if it happens to contain some.
Also check for escaping filenames during deserialization.
Fixes #3678
|
| | |
|
| |
|
|
|
| |
Fill fake images with unique 4-byte values.
This allows hints mutation to easily guess magic numbers and checksums.
|
| |
|
|
|
|
| |
Now that images are not linux-specific,
we can move all image-related logic directly into prog package
and significantly simplify the logic.
|
| |
|
|
|
|
|
| |
Move image compression-related function to a separate package.
In preperation for subsequent changes that make decompression
more complex. Prog package is already large and complex.
Also makes running compression tests/benchmarks much faster.
|
| |
|
|
| |
MADV_COLLAPSE was added to Linux in 6.1.
|
| |
|
|
| |
NFS is not image-based filesystem.
|
| |
|
|
|
| |
afs is not image-based filesystems.
It accepts some server/cell as source argument.
|
| |
|
|
|
| |
Common options like ro/rw/sync/async can be used with any mount.
Add them to the options used by syz_mount_image.
|
| |
|
|
| |
These are now present in the syzbot kernel (see /proc/filesystems).
|
| |
|
|
| |
It's not image-based filesystem.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Currently we uncompress all images in Deserialize to check that the data is valid.
As the result deserializing all seeds we have takes ~40 seconds of real time
and ~125 seconds of CPU time. And we do this during every syz-manager start.
Don't materialize the uncompressed image.
This reduces real time to ~15 seconds and CPU time to 18 seconds (no garbage collections).
In syz-manager the benefit is even larger since garbage collections take longer (larger heap).
|
| |
|
|
|
| |
Since syz_mount_image calls are no_generate we need to add at least some
empty seeds for all for filesystems.
|
| | |
|
| | |
|
| |
|
|
|
| |
This ioctl accepts blkpg_partition struct:
https://elixir.bootlin.com/linux/v6.1-rc6/source/block/ioctl.c#L20
|
| |
|
|
| |
In my runs these calls take 80-100ms, so increase it to 200ms.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This will allow us to mutate the image size.
Fixes #3527
|
| |
|
|
|
|
|
|
| |
Fuse does not need an image and we don't pass image size anyway.
But we still pass/mutate an image.
Moreover with the no_generate attribute we can't call it at all
since we don't have seeds.
Fix that.
|
| |
|
| |
It is an external test. It uses only exported "linux" package functions.
|