8cc95f3fd3
Add a firewall that validates jobs before submission to ensure they don't do anything they aren't allowed to do, like accessing memory they should not access. The firewall is functionality-wise a copy of the firewall already implemented in gpu/host1x. It is copied here as it makes more sense for it to live on the DRM side, as it is only needed for userspace job submissions, and generally the data it needs to do its job is easier to access here. In the future, the other implementation will be removed. Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
22 lines
511 B
C
22 lines
511 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/* Copyright (c) 2020 NVIDIA Corporation */
|
|
|
|
#ifndef _TEGRA_DRM_UAPI_SUBMIT_H
|
|
#define _TEGRA_DRM_UAPI_SUBMIT_H
|
|
|
|
struct tegra_drm_used_mapping {
|
|
struct tegra_drm_mapping *mapping;
|
|
u32 flags;
|
|
};
|
|
|
|
struct tegra_drm_submit_data {
|
|
struct tegra_drm_used_mapping *used_mappings;
|
|
u32 num_used_mappings;
|
|
};
|
|
|
|
int tegra_drm_fw_validate(struct tegra_drm_client *client, u32 *data, u32 start,
|
|
u32 words, struct tegra_drm_submit_data *submit,
|
|
u32 *job_class);
|
|
|
|
#endif
|