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]
Message-ID: <20211015131016.GA14244@asgard.redhat.com>
Date:   Fri, 15 Oct 2021 15:10:16 +0200
From:   Eugene Syromiatnikov <esyr@...hat.com>
To:     Jeremy Kerr <jk@...econstruct.com.au>
Cc:     netdev@...r.kernel.org, Matt Johnston <matt@...econstruct.com.au>,
        Andrew Jeffery <andrew@...id.au>,
        Jakub Kicinski <kuba@...nel.org>,
        "David S. Miller" <davem@...emloft.net>, linux-doc@...r.kernel.org,
        Jonathan Corbet <corbet@....net>
Subject: Re: [PATCH net-next v4 15/15] mctp: Add MCTP overview document

On Thu, Jul 29, 2021 at 10:20:53AM +0800, Jeremy Kerr wrote:
> This change adds a brief document about the sockets API provided for
> sending and receiving MCTP messages from userspace.

[...]

> diff --git a/Documentation/networking/mctp.rst b/Documentation/networking/mctp.rst

[...]

> +``bind()`` : set local socket address
> +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> +
> +Sockets that receive incoming request packets will bind to a local address,
> +using the ``bind()`` syscall.
> +
> +.. code-block:: C
> +
> +    struct sockaddr_mctp addr;
> +
> +    addr.smctp_family = AF_MCTP;
> +    addr.smctp_network = MCTP_NET_ANY;
> +    addr.smctp_addr.s_addr = MCTP_ADDR_ANY;
> +    addr.smctp_type = MCTP_TYPE_PLDM;

[...]

> +``sendto()``, ``sendmsg()``, ``send()`` : transmit an MCTP message
> +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> +
> +An MCTP message is transmitted using one of the ``sendto()``, ``sendmsg()`` or
> +``send()`` syscalls. Using ``sendto()`` as the primary example:
> +
> +.. code-block:: C
> +
> +    struct sockaddr_mctp addr;
> +    char buf[14];
> +    ssize_t len;
> +
> +    /* set message destination */
> +    addr.smctp_family = AF_MCTP;
> +    addr.smctp_network = 0;
> +    addr.smctp_addr.s_addr = 8;
> +    addr.smctp_tag = MCTP_TAG_OWNER;
> +    addr.smctp_type = MCTP_TYPE_ECHO;

While MCTP_TYPE_PLDM and MCTP_TYPE_ECHO are mentioned
in the documentation, their definition is currently missing in the UAPI
header (or anywhere in the source tree at all).  Is that expected?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ