All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Stefano Stabellini <sstabellini@kernel.org>, jgross@suse.com
Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pvcalls-front: 64-bit align flags
Date: Tue, 27 Feb 2018 16:19:33 -0500	[thread overview]
Message-ID: <b7ec592a-bbd1-48d3-1a1f-92a8ed4a1e48@oracle.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1802271150020.4239@sstabellini-ThinkPad-X260>

On 02/27/2018 02:54 PM, Stefano Stabellini wrote:
> We are using test_and_* operations on the status and flag fields of
> struct sock_mapping. However, these functions require the operand to be
> 64-bit aligned on arm64. Currently, only status is 64-bit aligned.
>
> Make flags 64-bit aligned by introducing an explicit padding field.
>
> Signed-off-by: Stefano Stabellini <stefano@aporeto.com>
>
> diff --git a/drivers/xen/pvcalls-front.c b/drivers/xen/pvcalls-front.c
> index ca5b773..aa07b2a 100644
> --- a/drivers/xen/pvcalls-front.c
> +++ b/drivers/xen/pvcalls-front.c
> @@ -78,6 +78,7 @@ struct sock_mapping {
>  #define PVCALLS_STATUS_BIND          1
>  #define PVCALLS_STATUS_LISTEN        2
>  			uint8_t status;
> +			uint8_t pad[7];

Does this guarantee alignment (for either status or flag)?

-boris

>  		/*
>  		 * Internal state-machine flags.
>  		 * Only one accept operation can be inflight for a socket.

  reply	other threads:[~2018-02-27 21:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-27 19:54 [PATCH] pvcalls-front: 64-bit align flags Stefano Stabellini
2018-02-27 21:19 ` Boris Ostrovsky [this message]
2018-02-27 21:32   ` Stefano Stabellini
2018-02-27 21:32   ` Stefano Stabellini
2018-02-27 21:45     ` Boris Ostrovsky
2018-02-27 21:45     ` Boris Ostrovsky
2018-02-27 21:50       ` Stefano Stabellini
2018-02-27 21:50       ` Stefano Stabellini
2018-02-27 21:19 ` Boris Ostrovsky
2018-02-28  9:06 ` David Laight
2018-02-28  9:06 ` David Laight
2018-02-27 19:54 Stefano Stabellini

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=b7ec592a-bbd1-48d3-1a1f-92a8ed4a1e48@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sstabellini@kernel.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 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.