All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Hangbin Liu <liuhangbin@gmail.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] Doc: netlink: support unterminated-ok
Date: Thu, 7 Mar 2024 20:35:24 -0800	[thread overview]
Message-ID: <20240307203524.34895501@kernel.org> (raw)
In-Reply-To: <20240307070106.1784076-1-liuhangbin@gmail.com>

On Thu,  7 Mar 2024 15:01:06 +0800 Hangbin Liu wrote:
> Subject: [PATCH net-next] Doc: netlink: support unterminated-ok

I'd use this subject:

	netlink: specs: support unterminated-ok

> ynl-gen-c.py supports check unterminated-ok, but the yaml schemas don't
> have this key. Add this to the yaml files.

> diff --git a/Documentation/netlink/genetlink-c.yaml b/Documentation/netlink/genetlink-c.yaml
> index c58f7153fcf8..7094d619cbb6 100644
> --- a/Documentation/netlink/genetlink-c.yaml
> +++ b/Documentation/netlink/genetlink-c.yaml
> @@ -208,6 +208,9 @@ properties:
>                    exact-len:
>                      description: Exact length for a string or a binary attribute.
>                      $ref: '#/$defs/len-or-define'
> +                  unterminated-ok:
> +                    description: Allow the string to not use terminator.
> +                    type: boolean

Can we expand the doc a little? How about:

	description: |
		For string attributes, do not check whether attribute
		contains the terminating null character.

Also maybe let's leave this out of the spec for:

	Documentation/netlink/genetlink.yaml

that spec is supposed to be simplified, supporting both string flavors
just complicates things.

      reply	other threads:[~2024-03-08  4:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-07  7:01 [PATCH net-next] Doc: netlink: support unterminated-ok Hangbin Liu
2024-03-08  4:35 ` Jakub Kicinski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240307203524.34895501@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuhangbin@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.