All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] runqemu: drop RPC ports
@ 2017-06-22  8:30 Robert Yang
  2017-06-22  8:30 ` [PATCH 1/1] " Robert Yang
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Yang @ 2017-06-22  8:30 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 9ea5a31776440abd6468f003c5e1905f079446d3:

  ovmf: fix secureboot PACKAGECONFIG + OpenSSL update (2017-06-16 10:58:23 +0100)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib rbt/runqemu
  http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/runqemu

Robert Yang (1):
  runqemu: drop RPC ports

 scripts/runqemu | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

-- 
2.11.0



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/1] runqemu: drop RPC ports
  2017-06-22  8:30 [PATCH 0/1] runqemu: drop RPC ports Robert Yang
@ 2017-06-22  8:30 ` Robert Yang
  2017-06-22 14:57   ` Brian Avery
  2017-06-22 15:07   ` Bruce Ashfield
  0 siblings, 2 replies; 6+ messages in thread
From: Robert Yang @ 2017-06-22  8:30 UTC (permalink / raw)
  To: openembedded-core

The following commit has removed rpc ports from runqemu-export-rootfs, so
runqemu should also remove them, otherwise "runqemu nfs" doesn't work. And use
abspath for nfsroot, otherwise it doesn't work when it is a relative path.

commit 6bb9860ef7ba9c84fe9bd3a81aa6555f67ebd38e
Author: Cody P Schafer <dev@codyps.com>
Date:   Tue Jun 6 18:30:49 2017 -0400

    runqemu-export-rootfs: don't change RPC ports

[YOCTO #11687]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 scripts/runqemu | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 26328e5b512..41b870c9f7c 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -784,16 +784,12 @@ class BaseConfig(object):
             all_instances.sort(key=int)
             self.nfs_instance = int(all_instances.pop()) + 1
 
-        mountd_rpcport = 21111 + self.nfs_instance
-        nfsd_rpcport = 11111 + self.nfs_instance
         nfsd_port = 3049 + 2 * self.nfs_instance
         mountd_port = 3048 + 2 * self.nfs_instance
 
         # Export vars for runqemu-export-rootfs
         export_dict = {
             'NFS_INSTANCE': self.nfs_instance,
-            'MOUNTD_RPCPORT': mountd_rpcport,
-            'NFSD_RPCPORT': nfsd_rpcport,
             'NFSD_PORT': nfsd_port,
             'MOUNTD_PORT': mountd_port,
         }
@@ -801,7 +797,7 @@ class BaseConfig(object):
             # Use '%s' since they are integers
             os.putenv(k, '%s' % v)
 
-        self.unfs_opts="nfsvers=3,port=%s,mountprog=%s,nfsprog=%s,udp,mountport=%s" % (nfsd_port, mountd_rpcport, nfsd_rpcport, mountd_port)
+        self.unfs_opts="nfsvers=3,port=%s,udp,mountport=%s" % (nfsd_port, mountd_port)
 
         # Extract .tar.bz2 or .tar.bz if no nfs dir
         if not (self.rootfs and os.path.isdir(self.rootfs)):
@@ -1006,7 +1002,7 @@ class BaseConfig(object):
 
         if self.fstype == 'nfs':
             self.rootfs_options = ''
-            k_root = '/dev/nfs nfsroot=%s:%s,%s' % (self.nfs_server, self.rootfs, self.unfs_opts)
+            k_root = '/dev/nfs nfsroot=%s:%s,%s' % (self.nfs_server, os.path.abspath(self.rootfs), self.unfs_opts)
             self.kernel_cmdline = 'root=%s rw highres=off' % k_root
 
         if self.fstype == 'none':
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] runqemu: drop RPC ports
  2017-06-22  8:30 ` [PATCH 1/1] " Robert Yang
@ 2017-06-22 14:57   ` Brian Avery
  2017-06-22 15:07   ` Bruce Ashfield
  1 sibling, 0 replies; 6+ messages in thread
From: Brian Avery @ 2017-06-22 14:57 UTC (permalink / raw)
  To: Robert Yang; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 2795 bytes --]

looks good 2 me!
ty,
b
an intel employee

On Thu, Jun 22, 2017 at 1:30 AM, Robert Yang <liezhi.yang@windriver.com>
wrote:

> The following commit has removed rpc ports from runqemu-export-rootfs, so
> runqemu should also remove them, otherwise "runqemu nfs" doesn't work. And
> use
> abspath for nfsroot, otherwise it doesn't work when it is a relative path.
>
> commit 6bb9860ef7ba9c84fe9bd3a81aa6555f67ebd38e
> Author: Cody P Schafer <dev@codyps.com>
> Date:   Tue Jun 6 18:30:49 2017 -0400
>
>     runqemu-export-rootfs: don't change RPC ports
>
> [YOCTO #11687]
>
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>  scripts/runqemu | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/scripts/runqemu b/scripts/runqemu
> index 26328e5b512..41b870c9f7c 100755
> --- a/scripts/runqemu
> +++ b/scripts/runqemu
> @@ -784,16 +784,12 @@ class BaseConfig(object):
>              all_instances.sort(key=int)
>              self.nfs_instance = int(all_instances.pop()) + 1
>
> -        mountd_rpcport = 21111 + self.nfs_instance
> -        nfsd_rpcport = 11111 + self.nfs_instance
>          nfsd_port = 3049 + 2 * self.nfs_instance
>          mountd_port = 3048 + 2 * self.nfs_instance
>
>          # Export vars for runqemu-export-rootfs
>          export_dict = {
>              'NFS_INSTANCE': self.nfs_instance,
> -            'MOUNTD_RPCPORT': mountd_rpcport,
> -            'NFSD_RPCPORT': nfsd_rpcport,
>              'NFSD_PORT': nfsd_port,
>              'MOUNTD_PORT': mountd_port,
>          }
> @@ -801,7 +797,7 @@ class BaseConfig(object):
>              # Use '%s' since they are integers
>              os.putenv(k, '%s' % v)
>
> -        self.unfs_opts="nfsvers=3,port=%s,mountprog=%s,nfsprog=%s,udp,mountport=%s"
> % (nfsd_port, mountd_rpcport, nfsd_rpcport, mountd_port)
> +        self.unfs_opts="nfsvers=3,port=%s,udp,mountport=%s" %
> (nfsd_port, mountd_port)
>
>          # Extract .tar.bz2 or .tar.bz if no nfs dir
>          if not (self.rootfs and os.path.isdir(self.rootfs)):
> @@ -1006,7 +1002,7 @@ class BaseConfig(object):
>
>          if self.fstype == 'nfs':
>              self.rootfs_options = ''
> -            k_root = '/dev/nfs nfsroot=%s:%s,%s' % (self.nfs_server,
> self.rootfs, self.unfs_opts)
> +            k_root = '/dev/nfs nfsroot=%s:%s,%s' % (self.nfs_server,
> os.path.abspath(self.rootfs), self.unfs_opts)
>              self.kernel_cmdline = 'root=%s rw highres=off' % k_root
>
>          if self.fstype == 'none':
> --
> 2.11.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 3981 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] runqemu: drop RPC ports
  2017-06-22  8:30 ` [PATCH 1/1] " Robert Yang
  2017-06-22 14:57   ` Brian Avery
@ 2017-06-22 15:07   ` Bruce Ashfield
  2017-06-23  1:48     ` Robert Yang
  1 sibling, 1 reply; 6+ messages in thread
From: Bruce Ashfield @ 2017-06-22 15:07 UTC (permalink / raw)
  To: Robert Yang; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 3046 bytes --]

On Thu, Jun 22, 2017 at 4:30 AM, Robert Yang <liezhi.yang@windriver.com>
wrote:

> The following commit has removed rpc ports from runqemu-export-rootfs, so
> runqemu should also remove them, otherwise "runqemu nfs" doesn't work. And
> use
> abspath for nfsroot, otherwise it doesn't work when it is a relative path.
>
>
That change in question was discussed on list and was supposed to be
optional.

Can you confirm that a non-root user can still do a NFS root with both of
these changes applied ?

Bruce


> commit 6bb9860ef7ba9c84fe9bd3a81aa6555f67ebd38e
> Author: Cody P Schafer <dev@codyps.com>
> Date:   Tue Jun 6 18:30:49 2017 -0400
>
>     runqemu-export-rootfs: don't change RPC ports
>
> [YOCTO #11687]
>
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>  scripts/runqemu | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/scripts/runqemu b/scripts/runqemu
> index 26328e5b512..41b870c9f7c 100755
> --- a/scripts/runqemu
> +++ b/scripts/runqemu
> @@ -784,16 +784,12 @@ class BaseConfig(object):
>              all_instances.sort(key=int)
>              self.nfs_instance = int(all_instances.pop()) + 1
>
> -        mountd_rpcport = 21111 + self.nfs_instance
> -        nfsd_rpcport = 11111 + self.nfs_instance
>          nfsd_port = 3049 + 2 * self.nfs_instance
>          mountd_port = 3048 + 2 * self.nfs_instance
>
>          # Export vars for runqemu-export-rootfs
>          export_dict = {
>              'NFS_INSTANCE': self.nfs_instance,
> -            'MOUNTD_RPCPORT': mountd_rpcport,
> -            'NFSD_RPCPORT': nfsd_rpcport,
>              'NFSD_PORT': nfsd_port,
>              'MOUNTD_PORT': mountd_port,
>          }
> @@ -801,7 +797,7 @@ class BaseConfig(object):
>              # Use '%s' since they are integers
>              os.putenv(k, '%s' % v)
>
> -        self.unfs_opts="nfsvers=3,port=%s,mountprog=%s,nfsprog=%s,udp,mountport=%s"
> % (nfsd_port, mountd_rpcport, nfsd_rpcport, mountd_port)
> +        self.unfs_opts="nfsvers=3,port=%s,udp,mountport=%s" %
> (nfsd_port, mountd_port)
>
>          # Extract .tar.bz2 or .tar.bz if no nfs dir
>          if not (self.rootfs and os.path.isdir(self.rootfs)):
> @@ -1006,7 +1002,7 @@ class BaseConfig(object):
>
>          if self.fstype == 'nfs':
>              self.rootfs_options = ''
> -            k_root = '/dev/nfs nfsroot=%s:%s,%s' % (self.nfs_server,
> self.rootfs, self.unfs_opts)
> +            k_root = '/dev/nfs nfsroot=%s:%s,%s' % (self.nfs_server,
> os.path.abspath(self.rootfs), self.unfs_opts)
>              self.kernel_cmdline = 'root=%s rw highres=off' % k_root
>
>          if self.fstype == 'none':
> --
> 2.11.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"

[-- Attachment #2: Type: text/html, Size: 4502 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] runqemu: drop RPC ports
  2017-06-22 15:07   ` Bruce Ashfield
@ 2017-06-23  1:48     ` Robert Yang
  2017-06-23  3:52       ` Bruce Ashfield
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Yang @ 2017-06-23  1:48 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: Patches and discussions about the oe-core layer



On 06/22/2017 11:07 PM, Bruce Ashfield wrote:
>
>
> On Thu, Jun 22, 2017 at 4:30 AM, Robert Yang <liezhi.yang@windriver.com
> <mailto:liezhi.yang@windriver.com>> wrote:
>
>     The following commit has removed rpc ports from runqemu-export-rootfs, so
>     runqemu should also remove them, otherwise "runqemu nfs" doesn't work. And use
>     abspath for nfsroot, otherwise it doesn't work when it is a relative path.
>
>
> That change in question was discussed on list and was supposed to be optional.
>
> Can you confirm that a non-root user can still do a NFS root with both of these
> changes applied ?

The runqemu-export-rootfs uses UNFS, no root privilege is required, I can 
confirm that both "runqemu slirp nfs" and "runqemu nfs" work well, so I assume
the answer is yes.

// Robert

>
> Bruce
>
>
>     commit 6bb9860ef7ba9c84fe9bd3a81aa6555f67ebd38e
>     Author: Cody P Schafer <dev@codyps.com <mailto:dev@codyps.com>>
>     Date:   Tue Jun 6 18:30:49 2017 -0400
>
>         runqemu-export-rootfs: don't change RPC ports
>
>     [YOCTO #11687]
>
>     Signed-off-by: Robert Yang <liezhi.yang@windriver.com
>     <mailto:liezhi.yang@windriver.com>>
>     ---
>      scripts/runqemu | 8 ++------
>      1 file changed, 2 insertions(+), 6 deletions(-)
>
>     diff --git a/scripts/runqemu b/scripts/runqemu
>     index 26328e5b512..41b870c9f7c 100755
>     --- a/scripts/runqemu
>     +++ b/scripts/runqemu
>     @@ -784,16 +784,12 @@ class BaseConfig(object):
>                  all_instances.sort(key=int)
>                  self.nfs_instance = int(all_instances.pop()) + 1
>
>     -        mountd_rpcport = 21111 + self.nfs_instance
>     -        nfsd_rpcport = 11111 + self.nfs_instance
>              nfsd_port = 3049 + 2 * self.nfs_instance
>              mountd_port = 3048 + 2 * self.nfs_instance
>
>              # Export vars for runqemu-export-rootfs
>              export_dict = {
>                  'NFS_INSTANCE': self.nfs_instance,
>     -            'MOUNTD_RPCPORT': mountd_rpcport,
>     -            'NFSD_RPCPORT': nfsd_rpcport,
>                  'NFSD_PORT': nfsd_port,
>                  'MOUNTD_PORT': mountd_port,
>              }
>     @@ -801,7 +797,7 @@ class BaseConfig(object):
>                  # Use '%s' since they are integers
>                  os.putenv(k, '%s' % v)
>
>     -
>     self.unfs_opts="nfsvers=3,port=%s,mountprog=%s,nfsprog=%s,udp,mountport=%s"
>     % (nfsd_port, mountd_rpcport, nfsd_rpcport, mountd_port)
>     +        self.unfs_opts="nfsvers=3,port=%s,udp,mountport=%s" % (nfsd_port,
>     mountd_port)
>
>              # Extract .tar.bz2 or .tar.bz <http://tar.bz> if no nfs dir
>              if not (self.rootfs and os.path.isdir(self.rootfs)):
>     @@ -1006,7 +1002,7 @@ class BaseConfig(object):
>
>              if self.fstype == 'nfs':
>                  self.rootfs_options = ''
>     -            k_root = '/dev/nfs nfsroot=%s:%s,%s' % (self.nfs_server,
>     self.rootfs, self.unfs_opts)
>     +            k_root = '/dev/nfs nfsroot=%s:%s,%s' % (self.nfs_server,
>     os.path.abspath(self.rootfs), self.unfs_opts)
>                  self.kernel_cmdline = 'root=%s rw highres=off' % k_root
>
>              if self.fstype == 'none':
>     --
>     2.11.0
>
>     --
>     _______________________________________________
>     Openembedded-core mailing list
>     Openembedded-core@lists.openembedded.org
>     <mailto:Openembedded-core@lists.openembedded.org>
>     http://lists.openembedded.org/mailman/listinfo/openembedded-core
>     <http://lists.openembedded.org/mailman/listinfo/openembedded-core>
>
>
>
>
> --
> "Thou shalt not follow the NULL pointer, for chaos and madness await thee at its
> end"


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/1] runqemu: drop RPC ports
  2017-06-23  1:48     ` Robert Yang
@ 2017-06-23  3:52       ` Bruce Ashfield
  0 siblings, 0 replies; 6+ messages in thread
From: Bruce Ashfield @ 2017-06-23  3:52 UTC (permalink / raw)
  To: Robert Yang; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 4272 bytes --]

On Thu, Jun 22, 2017 at 9:48 PM, Robert Yang <liezhi.yang@windriver.com>
wrote:

>
>
> On 06/22/2017 11:07 PM, Bruce Ashfield wrote:
>
>>
>>
>> On Thu, Jun 22, 2017 at 4:30 AM, Robert Yang <liezhi.yang@windriver.com
>> <mailto:liezhi.yang@windriver.com>> wrote:
>>
>>     The following commit has removed rpc ports from
>> runqemu-export-rootfs, so
>>     runqemu should also remove them, otherwise "runqemu nfs" doesn't
>> work. And use
>>     abspath for nfsroot, otherwise it doesn't work when it is a relative
>> path.
>>
>>
>> That change in question was discussed on list and was supposed to be
>> optional.
>>
>> Can you confirm that a non-root user can still do a NFS root with both of
>> these
>> changes applied ?
>>
>
> The runqemu-export-rootfs uses UNFS, no root privilege is required, I can
> confirm that both "runqemu slirp nfs" and "runqemu nfs" work well, so I
> assume
> the answer is yes.
>

Yes, that's good enough to confirm the old functionality. As long as
non-privileged ports can be used, we should be fine.

Bruce


>
> // Robert
>
>
>> Bruce
>>
>>
>>     commit 6bb9860ef7ba9c84fe9bd3a81aa6555f67ebd38e
>>     Author: Cody P Schafer <dev@codyps.com <mailto:dev@codyps.com>>
>>     Date:   Tue Jun 6 18:30:49 2017 -0400
>>
>>         runqemu-export-rootfs: don't change RPC ports
>>
>>     [YOCTO #11687]
>>
>>     Signed-off-by: Robert Yang <liezhi.yang@windriver.com
>>     <mailto:liezhi.yang@windriver.com>>
>>
>>     ---
>>      scripts/runqemu | 8 ++------
>>      1 file changed, 2 insertions(+), 6 deletions(-)
>>
>>     diff --git a/scripts/runqemu b/scripts/runqemu
>>     index 26328e5b512..41b870c9f7c 100755
>>     --- a/scripts/runqemu
>>     +++ b/scripts/runqemu
>>     @@ -784,16 +784,12 @@ class BaseConfig(object):
>>                  all_instances.sort(key=int)
>>                  self.nfs_instance = int(all_instances.pop()) + 1
>>
>>     -        mountd_rpcport = 21111 + self.nfs_instance
>>     -        nfsd_rpcport = 11111 + self.nfs_instance
>>              nfsd_port = 3049 + 2 * self.nfs_instance
>>              mountd_port = 3048 + 2 * self.nfs_instance
>>
>>              # Export vars for runqemu-export-rootfs
>>              export_dict = {
>>                  'NFS_INSTANCE': self.nfs_instance,
>>     -            'MOUNTD_RPCPORT': mountd_rpcport,
>>     -            'NFSD_RPCPORT': nfsd_rpcport,
>>                  'NFSD_PORT': nfsd_port,
>>                  'MOUNTD_PORT': mountd_port,
>>              }
>>     @@ -801,7 +797,7 @@ class BaseConfig(object):
>>                  # Use '%s' since they are integers
>>                  os.putenv(k, '%s' % v)
>>
>>     -
>>     self.unfs_opts="nfsvers=3,port=%s,mountprog=%s,nfsprog=%s,
>> udp,mountport=%s"
>>     % (nfsd_port, mountd_rpcport, nfsd_rpcport, mountd_port)
>>     +        self.unfs_opts="nfsvers=3,port=%s,udp,mountport=%s" %
>> (nfsd_port,
>>     mountd_port)
>>
>>              # Extract .tar.bz2 or .tar.bz <http://tar.bz> if no nfs dir
>>              if not (self.rootfs and os.path.isdir(self.rootfs)):
>>     @@ -1006,7 +1002,7 @@ class BaseConfig(object):
>>
>>              if self.fstype == 'nfs':
>>                  self.rootfs_options = ''
>>     -            k_root = '/dev/nfs nfsroot=%s:%s,%s' % (self.nfs_server,
>>     self.rootfs, self.unfs_opts)
>>     +            k_root = '/dev/nfs nfsroot=%s:%s,%s' % (self.nfs_server,
>>     os.path.abspath(self.rootfs), self.unfs_opts)
>>                  self.kernel_cmdline = 'root=%s rw highres=off' % k_root
>>
>>              if self.fstype == 'none':
>>     --
>>     2.11.0
>>
>>     --
>>     _______________________________________________
>>     Openembedded-core mailing list
>>     Openembedded-core@lists.openembedded.org
>>     <mailto:Openembedded-core@lists.openembedded.org>
>>     http://lists.openembedded.org/mailman/listinfo/openembedded-core
>>     <http://lists.openembedded.org/mailman/listinfo/openembedded-core>
>>
>>
>>
>>
>> --
>> "Thou shalt not follow the NULL pointer, for chaos and madness await thee
>> at its
>> end"
>>
>


-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"

[-- Attachment #2: Type: text/html, Size: 6759 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-06-23  3:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-22  8:30 [PATCH 0/1] runqemu: drop RPC ports Robert Yang
2017-06-22  8:30 ` [PATCH 1/1] " Robert Yang
2017-06-22 14:57   ` Brian Avery
2017-06-22 15:07   ` Bruce Ashfield
2017-06-23  1:48     ` Robert Yang
2017-06-23  3:52       ` Bruce Ashfield

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.