public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Mike Waychison <mikew@google.com>
Cc: Olof Johansson <olofj@chromium.org>,
	Andi Kleen <andi@firstfloor.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Robert Lippert <rlippert@google.com>,
	Jon Mayer <jonmayer@google.com>, Tony Luck <tony.luck@intel.com>,
	Duncan Laurie <dlaurie@google.com>,
	Aaron Durbin <adurbin@google.com>,
	linux-kernel@vger.kernel.org, Tim Hockin <thockin@google.com>,
	David Hendrix <dhendrix@chromium.org>,
	linux-api@vger.kernel.org
Subject: Re: [PATCH v2 6/5] Fix unaligned memory accesses in dmi-sysfs
Date: Fri, 25 Feb 2011 15:20:39 -0800	[thread overview]
Message-ID: <20110225232039.GA10930@kroah.com> (raw)
In-Reply-To: <4D6835F1.2050304@google.com>

On Fri, Feb 25, 2011 at 03:06:25PM -0800, Mike Waychison wrote:
> DMI entries are arranged in memory back to back with no alignment
> guarantees. This means that the struct dmi_header passed to callbacks
> from dmi_walk() itself isn't byte aligned.  This causes problems on
> architectures that expect aligned data, such as IA64.
> 
> The dmi-sysfs patchset introduced structure member accesses through
> this passed in dmi_header.  Fix this by memcpy()ing the structures to
> temporary locations on stack when inspecting/copying them.
> 
> Signed-off-by: Mike Waychison <mikew@google.com>
> Tested-by: Tony Luck <tony.luck@intel.com>
> ---
>  dmi-sysfs.c |   28 +++++++++++++---------------
>  1 file changed, 13 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/firmware/dmi-sysfs.c b/drivers/firmware/dmi-sysfs.c
> index a5afd80..eb26d62 100644
> --- a/drivers/firmware/dmi-sysfs.c
> +++ b/drivers/firmware/dmi-sysfs.c
> @@ -263,20 +263,16 @@ struct dmi_system_event_log {
>  	u8	supported_log_type_descriptos[0];
>  } __packed;
> 
> -static const struct dmi_system_event_log *to_sel(const struct
> dmi_header *dh)

This patch is corrupted.  I tried to edit it by hand, but git still
didn't like it.

Please resend using whatever you did for your other patches, as this way
was not correct :(

thanks,

greg k-h

  reply	other threads:[~2011-02-25 23:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-23  1:53 [PATCH v2 0/5] Exporting DMI entries via sysfs Mike Waychison
2011-02-23  1:53 ` [PATCH v2 1/5] firmware: Add DMI entry types to the headers Mike Waychison
2011-02-23  1:53 ` [PATCH v2 2/5] firmware: Basic dmi-sysfs support Mike Waychison
2011-02-23 19:43   ` Tony Luck
2011-02-23 20:28     ` Mike Waychison
2011-02-23 21:29       ` Tony Luck
2011-02-25 19:58         ` Greg KH
2011-02-23  1:53 ` [PATCH v2 3/5] firmware: Break out system_event_log in dmi-sysfs Mike Waychison
2011-02-23  1:53 ` [PATCH v2 4/5] firmware: Expose DMI type 15 System Event Log Mike Waychison
2011-02-23  1:53 ` [PATCH v2 5/5] firmware: Add documentation for /sys/firmware/dmi Mike Waychison
2011-02-25 20:03 ` [PATCH v2 0/5] Exporting DMI entries via sysfs Greg KH
2011-02-25 23:06 ` [PATCH v2 6/5] Fix unaligned memory accesses in dmi-sysfs Mike Waychison
2011-02-25 23:20   ` Greg KH [this message]
2011-02-25 23:41 ` [resend PATCH " Mike Waychison

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=20110225232039.GA10930@kroah.com \
    --to=greg@kroah.com \
    --cc=adurbin@google.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andi@firstfloor.org \
    --cc=dhendrix@chromium.org \
    --cc=dlaurie@google.com \
    --cc=jonmayer@google.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikew@google.com \
    --cc=olofj@chromium.org \
    --cc=rlippert@google.com \
    --cc=thockin@google.com \
    --cc=tony.luck@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox