lkml.org 
[lkml]   [2022]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 06/10] KVM: selftests: Add NX huge pages test
On Thu, Apr 14, 2022, Ben Gardon wrote:
> On Wed, Apr 13, 2022 at 3:35 PM Sean Christopherson <seanjc@google.com> wrote:
> > > diff --git a/tools/testing/selftests/kvm/x86_64/nx_huge_pages_test.sh b/tools/testing/selftests/kvm/x86_64/nx_huge_pages_test.sh
> > > new file mode 100755
> > > index 000000000000..19fc95723fcb
> > > --- /dev/null
> > > +++ b/tools/testing/selftests/kvm/x86_64/nx_huge_pages_test.sh
> > > @@ -0,0 +1,25 @@
> > > +#!/bin/bash
> > > +# SPDX-License-Identifier: GPL-2.0-only */
> > > +
> > > +# tools/testing/selftests/kvm/nx_huge_page_test.sh
> > > +# Copyright (C) 2022, Google LLC.
> >
> > This should either check for root or use sudo.
>
> Is there not any scenario where the below setup commands could work
> without root?

Technically, yes, someone could be running the test as a non-root user with
the necessary permissions. Practically speaking, I would be surprised if anyone
configures module params in that way.

That said, there's certainly no harm in using sudo as a fall back.

\
 
 \ /
  Last update: 2022-04-14 23:38    [W:0.043 / U:1.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site