lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 13 Jun 2019 08:14:23 -0500
From:   Eric Blake <eblake@...hat.com>
To:     roman.stratiienko@...ballogic.com, linux-kernel@...r.kernel.org,
        josef@...icpanda.com, nbd@...er.debian.org,
        A.Bulyshchenko@...ballogic.com, linux-block@...r.kernel.org,
        axboe@...nel.dkn.org, "Richard W.M. Jones" <rjones@...hat.com>
Subject: Re: [PATCH 2/2] nbd: add support for nbd as root device

On 6/13/19 8:02 AM, Eric Blake wrote:
> On 6/12/19 11:31 AM, roman.stratiienko@...ballogic.com wrote:
>> From: Roman Stratiienko <roman.stratiienko@...ballogic.com>
>>
>> Adding support to nbd to use it as a root device. This code essentially
>> provides a minimal nbd-client implementation within the kernel. It opens
>> a socket and makes the negotiation with the server. Afterwards it passes
>> the socket to the normal nbd-code to handle the connection.
>>
>> The arguments for the server are passed via kernel command line.
>> The kernel command line has the format
>> 'nbdroot=[<SERVER_IP>:]<SERVER_PORT>/<EXPORT_NAME>'.
> 
> Did you intend for nbdroot=1234 to connect to port 1234 or to server
> 1234 port 10809?  Is an export name mandatory even when it is the empty
> string, in which case, is the / character mandatory?  Maybe this would
> be better written as:
> 
>  [<SERVER_IP>[:<SERVER_PORT]][/<EXPORT_NAME]

Make that:

 [[<SERVER_IP>][:<SERVER_PORT>]][/[<EXPORT_NAME>]]

as well as a blurb that IPv6 requires use of [] around SERVER_IP to
avoid ambiguity between IP address and the port designator.  That would
allow variations such as:

nbdroot=1.2.3.4          # port 10809 and export name '' defaulted
nbdroot=1.2.3.4:10809/   # fully explicit, export name ''
nbdroot=:10810/export    # host defaulted by DHCP, rest is explicit
nbdroot=/                # host and port are defaulted, export is ''
nbdroot=[::1]:10810      # IPv6 localhost and port 10810
nbdroot=::1              # IPv6 localhost, default port 10809

[I'm aware that localhost is probably not going to work based on how
early this is encountered during the boot; rather, consider ::1 as a
placeholder for a more realistic IPv6 address]

> 
> although that would allow nbdroot= using all defaults (will that still
> do the right thing?).

nbdroot=                # host from DHCP, port 10809, export ''

> 
> Should we support nbdroot=URI, and tie this in to Rich's proposal [1] on
> standardizing the set of URIs that refer to an NBD export?  It seems
> like you are still limited to a TCP socket (not Unix) with no
> encryption, so this would be equivalent to the URI:
> 
> nbd://[server[:port]][/export]
> 
> [1] https://lists.debian.org/nbd/2019/06/msg00011.html
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ