linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linuxppc-dev@lists.ozlabs.org, Jiri Slaby <jirislaby@kernel.org>,
	linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2] xen/hvc: replace BUG_ON() with negative return value
Date: Wed, 7 Jul 2021 12:40:54 +0200	[thread overview]
Message-ID: <dd32b09b-7345-664b-165d-dfb30c285448@suse.com> (raw)
In-Reply-To: <9e45c5f8-0ac0-e1bb-4703-838679285e80@suse.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 1245 bytes --]

On 07.07.21 11:57, Jan Beulich wrote:
> On 07.07.2021 11:10, Juergen Gross wrote:
>> Xen frontends shouldn't BUG() in case of illegal data received from
>> their backends. So replace the BUG_ON()s when reading illegal data from
>> the ring page with negative return values.
>>
>> Signed-off-by: Juergen Gross <jgross@suse.com>
> 
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
> 
>> --- a/drivers/tty/hvc/hvc_xen.c
>> +++ b/drivers/tty/hvc/hvc_xen.c
>> @@ -86,7 +86,11 @@ static int __write_console(struct xencons_info *xencons,
>>   	cons = intf->out_cons;
>>   	prod = intf->out_prod;
>>   	mb();			/* update queue values before going on */
> 
> Largely unrelated note: While in general the barriers here may want
> switching to virt_*mb(), this particular one looks to be too heavy
> anyway: a read barrier is all that's needed here afaict, just like
> there's only a write barrier between ring contents and producer
> writing in __write_console().

I agree.

> And btw, since I've got puzzled by the linuxppc-dev@ in the recipients
> list, I did look up relevant entries in ./MAINTAINERS. Shouldn't the
> file be part of "XEN HYPERVISOR INTERFACE"?

I wouldn't mind. Greg, Jiri, what do you think?


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3135 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

  reply	other threads:[~2021-07-07 10:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-07  9:10 [PATCH v2] xen/hvc: replace BUG_ON() with negative return value Juergen Gross
2021-07-07  9:57 ` Jan Beulich
2021-07-07 10:40   ` Juergen Gross [this message]
2021-07-07 10:58     ` Jiri Slaby

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=dd32b09b-7345-664b-165d-dfb30c285448@suse.com \
    --to=jgross@suse.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jbeulich@suse.com \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=xen-devel@lists.xenproject.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;
as well as URLs for NNTP newsgroup(s).