public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: John Keeping <jkeeping@inmusicbrands.com>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: gadget: f_uac2: fix non-newline-terminated function name
Date: Wed, 10 Jul 2024 13:53:22 +0200	[thread overview]
Message-ID: <2024071022-exemplary-zipping-1f34@gregkh> (raw)
In-Reply-To: <20240708142553.3995022-1-jkeeping@inmusicbrands.com>

On Mon, Jul 08, 2024 at 03:25:53PM +0100, John Keeping wrote:
> Most writes to configfs handle an optional newline, but do not require
> it.  By using the number of bytes written as the limit for scnprintf()
> it is guaranteed that the final character in the buffer will be
> overwritten.
> 
> This is expected if it is a newline but is undesirable when a string is
> written "as-is" (as libusbgx does, for example).

So we are changing kernel functionality because a userspace program does
not work?  Why not fix the userspace program?

> Update the store function to strip an optional newline, matching the
> behaviour of usb_string_copy().

This changes the behaviour of a lot of configfs files right?  What will
break if this happens?

thanks,

greg k-h

  reply	other threads:[~2024-07-10 11:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-08 14:25 [PATCH] usb: gadget: f_uac2: fix non-newline-terminated function name John Keeping
2024-07-10 11:53 ` Greg Kroah-Hartman [this message]
2024-07-10 13:30   ` John Keeping
2024-07-10 13:40     ` Greg Kroah-Hartman

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=2024071022-exemplary-zipping-1f34@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=jkeeping@inmusicbrands.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox