All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Pavel Machek <pavel@ucw.cz>, Julia Lawall <julia@diku.dk>,
	tglx@linutronix.de, viro@ftp.linux.org.uk,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/3] arch/x86: Use offsetof
Date: Thu, 27 Dec 2007 01:21:34 +0000	[thread overview]
Message-ID: <4772FE1E.3040401@zytor.com> (raw)
In-Reply-To: <20071227011712.GG27894@ZenIV.linux.org.uk>

Al Viro wrote:
> On Wed, Dec 26, 2007 at 05:01:38PM -0800, H. Peter Anvin wrote:
> 
>> The right way to do it is:
>>
>> 	memset(&info.vm86plus, 0, sizeof info.vm86plus);
> 
> If it's just one field _and_ we don't have padding we want to zero out -
> certainly...

It is - [comments removed for clarity]:

struct kernel_vm86_struct {
         struct kernel_vm86_regs regs;
#define VM86_TSS_ESP0 flags
         unsigned long flags;
         unsigned long screen_bitmap;
         unsigned long cpu_type;
         struct revectored_struct int_revectored;
         struct revectored_struct int21_revectored;
         struct vm86plus_info_struct vm86plus;
         struct pt_regs *regs32;
};

WARNING: multiple messages have this Message-ID (diff)
From: "H. Peter Anvin" <hpa@zytor.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Pavel Machek <pavel@ucw.cz>, Julia Lawall <julia@diku.dk>,
	tglx@linutronix.de, viro@ftp.linux.org.uk,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/3] arch/x86: Use offsetof
Date: Wed, 26 Dec 2007 17:21:34 -0800	[thread overview]
Message-ID: <4772FE1E.3040401@zytor.com> (raw)
In-Reply-To: <20071227011712.GG27894@ZenIV.linux.org.uk>

Al Viro wrote:
> On Wed, Dec 26, 2007 at 05:01:38PM -0800, H. Peter Anvin wrote:
> 
>> The right way to do it is:
>>
>> 	memset(&info.vm86plus, 0, sizeof info.vm86plus);
> 
> If it's just one field _and_ we don't have padding we want to zero out -
> certainly...

It is - [comments removed for clarity]:

struct kernel_vm86_struct {
         struct kernel_vm86_regs regs;
#define VM86_TSS_ESP0 flags
         unsigned long flags;
         unsigned long screen_bitmap;
         unsigned long cpu_type;
         struct revectored_struct int_revectored;
         struct revectored_struct int21_revectored;
         struct vm86plus_info_struct vm86plus;
         struct pt_regs *regs32;
};

  reply	other threads:[~2007-12-27  1:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-26 16:13 [PATCH 1/3] arch/x86: Use offsetof Julia Lawall
2007-12-26 16:13 ` Julia Lawall
2007-12-26 19:47 ` Pavel Machek
2007-12-26 19:47   ` Pavel Machek
2007-12-27  1:01   ` H. Peter Anvin
2007-12-27  1:01     ` H. Peter Anvin
2007-12-27  1:17     ` Al Viro
2007-12-27  1:21       ` H. Peter Anvin [this message]
2007-12-27  1:21         ` H. Peter Anvin
2007-12-30 13:54         ` Ingo Molnar
2007-12-30 13:54           ` Ingo Molnar
2007-12-27  1:44     ` Jan Engelhardt
2007-12-27  1:44       ` Jan Engelhardt
2007-12-27  1:49       ` H. Peter Anvin
2007-12-27  1:49         ` H. Peter Anvin

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=4772FE1E.3040401@zytor.com \
    --to=hpa@zytor.com \
    --cc=julia@diku.dk \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=tglx@linutronix.de \
    --cc=viro@ZenIV.linux.org.uk \
    --cc=viro@ftp.linux.org.uk \
    /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.