ANDROID: KVM: arm64: allow trace file to be open for read
Userspace tools might want to open trace files for read (e.g. to check if they have access to the tracing interface), so instead of returning -EPERM we make this a no-op. Bug: 428904926 Test: presubmit Change-Id: I32b1b6db543f462dc986578cebd803d8312fe6bb Signed-off-by: Nikita Ioffe <ioffe@google.com>
This commit is contained in:
@@ -858,13 +858,10 @@ static int hyp_trace_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
int cpu = (s64)inode->i_private;
|
||||
|
||||
if (file->f_mode & FMODE_WRITE) {
|
||||
if (file->f_mode & FMODE_WRITE)
|
||||
hyp_trace_reset(cpu);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -EPERM;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static ssize_t hyp_trace_write(struct file *filp, const char __user *ubuf,
|
||||
|
||||
Reference in New Issue
Block a user