mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Cree <mcree@orcon.net.nz>
To: Sergei Trofimovich <slyfox@gentoo.org>
Cc: linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org,
	Richard Henderson <rth@twiddle.net>,
	Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
	Matt Turner <mattst88@gmail.com>
Subject: Re: [PATCH v2] Alpha: unbreak osf_setsysinfo(SSI_NVPAIRS, [SSIN_UACPROC, UAC_SIGBUS])
Date: Sat, 13 Aug 2011 09:55:55 +1200	[thread overview]
Message-ID: <4E45A16B.9060007@orcon.net.nz> (raw)
In-Reply-To: <1313182881-21266-1-git-send-email-slyfox@gentoo.org>

On 13/08/11 09:01, Sergei Trofimovich wrote:
> The bug was accidentally found by the following program:
>     #include <asm/sysinfo.h>
>     #include <asm/unistd.h>
>     #include <sys/syscall.h>
>     static int setsysinfo(unsigned long op, void *buffer, unsigned long size,
>                           int *start, void *arg, unsigned long flag) {
>         return syscall(__NR_osf_setsysinfo, op, buffer, size, start, arg, flag);
>     }
> 
>     int main(int argc, char **argv) {
>         short x[10];
>         unsigned int buf[2] = { SSIN_UACPROC, UAC_SIGBUS, };
>         setsysinfo(SSI_NVPAIRS, buf, 1, 0, 0, 0);
> 
>         int  *y = (int*) (x+1);
>         *y = 0;
>         return 0;
>     }
> 
> The program shoud fail on SIGBUS, but didn't.
> 
> The patch is a second part of userspace flag fix:
>> commit 745dd2405e281d96c0a449103bdf6a895048f28c
>> Author: Michael Cree <mcree@orcon.net.nz>
>> Date:   Mon Nov 30 22:44:40 2009 -0500
>>
>>    Alpha: Rearrange thread info flags fixing two regressions
>>
>>    Both regressions fixed by (1) rearranging TIF_NOTIFY_RESUME flag to be
>>    in lower 8 bits of the thread info flags, and (2) making sure that
>>    ALPHA_UAC_SHIFT matches the rearrangement of the thread info flags.
> 
> Deleted outdated out-of-sync 'UAC_SHIFT' (the cause of bug) in favour of 'ALPHA_UAC_SHIFT'.
> 
> Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
> Cc: linux-alpha@vger.kernel.org
> Cc: Michael Cree <mcree@orcon.net.nz>
> Cc: Richard Henderson <rth@twiddle.net>
> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
> Cc: Matt Turner <mattst88@gmail.com>
> ---
>  arch/alpha/include/asm/sysinfo.h     |    9 ---------
>  arch/alpha/include/asm/thread_info.h |    8 ++++----
>  arch/alpha/kernel/osf_sys.c          |    7 ++++---
>  3 files changed, 8 insertions(+), 16 deletions(-)

Looks good to me.

Acked-by: Michael Cree <mcree@orcon.net.nz>

Thanks
Michael.

  reply	other threads:[~2011-08-12 21:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-12 21:01 Sergei Trofimovich
2011-08-12 21:55 ` Michael Cree [this message]
2011-08-15  0:32 ` Matt Turner

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=4E45A16B.9060007@orcon.net.nz \
    --to=mcree@orcon.net.nz \
    --cc=ink@jurassic.park.msu.ru \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mattst88@gmail.com \
    --cc=rth@twiddle.net \
    --cc=slyfox@gentoo.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

all inboxes | Powered by JetHome®