Debian Bug report logs - #637528
certain %fs values are not accepted in i386_set_fsbase()

version graph

Package: kfreebsd-image-8.1-1-amd64; Maintainer for kfreebsd-image-8.1-1-amd64 is GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>;

Reported by: Robert Millan <rmh@debian.org>

Date: Fri, 12 Aug 2011 11:54:43 UTC

Severity: normal

Found in version 8.1+dfsg-9

Done: Petr Salinger <Petr.Salinger@seznam.cz>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>:
Bug#637528; Package kfreebsd-image-8.1-1-amd64. (Fri, 12 Aug 2011 11:54:46 GMT) Full text and rfc822 format available.

Acknowledgement sent to Robert Millan <rmh@debian.org>:
New Bug report received and forwarded. Copy sent to GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>. (Fri, 12 Aug 2011 11:54:49 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Robert Millan <rmh@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: certain %fs values are not accepted in i386_set_fsbase()
Date: Fri, 12 Aug 2011 12:56:41 +0200
[Message part 1 (text/plain, inline)]
Package: kfreebsd-image-8.1-1-amd64
Version: 8.1+dfsg-9
Severity: normal

This test case shows how i386_set_fsbase() works fine when its argument is a
pointer to the BSS, but doesn't when its argument is a pointer to the heap:

$ gcc i386_set_fsbase_test.c -o test -m32 && ./test
0x80496cc, 0x80496cc
0x8049720, 0x0

(first line is for BSS, output matches with input; second line is for heap,
output is 0x0 and doesn't match)

I initially suspected this is a re-incarnation of upstram bug 130526:

  http://www.freebsd.org/cgi/query-pr.cgi?pr=130526

but response from upstream indicates they can't reproduce it anymore.  I've
been able to reproduce this with different combinations of kFreeBSD 8.1, 8.2
and 9.0~svn224698 with i386 and amd64, with GNU userland and with FreeBSD
userland.

Any help would be appreciated.

-- System Information:
Debian Release: 6.0.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: kfreebsd-amd64 (x86_64)

Kernel: kFreeBSD 8.2-1-amd64
Locale: LANG=ca_AD.utf8, LC_CTYPE=ca_AD.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages kfreebsd-image-8.1-1-amd64 depends on:
ii  freebsd-utils                 8.1-5      FreeBSD utilities needed for GNU/k
ii  kldutils                      8.1-4+b1   tools for managing kFreeBSD module

kfreebsd-image-8.1-1-amd64 recommends no packages.

kfreebsd-image-8.1-1-amd64 suggests no packages.

-- no debconf information
[i386_set_fsbase_test.c (text/x-c, attachment)]

Reply sent to Petr Salinger <Petr.Salinger@seznam.cz>:
You have taken responsibility. (Mon, 15 Aug 2011 22:18:11 GMT) Full text and rfc822 format available.

Notification sent to Robert Millan <rmh@debian.org>:
Bug acknowledged by developer. (Mon, 15 Aug 2011 22:18:11 GMT) Full text and rfc822 format available.

Message #10 received at 637528-done@bugs.debian.org (full text, mbox):

From: Petr Salinger <Petr.Salinger@seznam.cz>
To: 637528-done@bugs.debian.org
Subject: Re: certain %fs values are not accepted in i386_set_fsbase()
Date: Tue, 16 Aug 2011 00:26:14 +0200 (CEST)
Hi,

the problem is not in the kernel, but in test program.
It's main() should be as bellow.

Petr

main()
{
  void *val[1];

  p = &p;
  val[0] = p;
  sysarch(I386_SET_FSBASE, val);
  sysarch(I386_GET_FSBASE, &check);
  printf ("0x%x, 0x%x\n", *val, check);

  p = malloc (1);
  val[0] = p;
  sysarch(I386_SET_FSBASE, val);
  sysarch(I386_GET_FSBASE, &check);
  printf ("0x%x, 0x%x\n", *val, check);

  val[0] = 0x12345678;
  sysarch(I386_SET_FSBASE, val);
  sysarch(I386_GET_FSBASE, &check);
  printf ("0x%x, 0x%x\n", *val, check);


  val[0] = 0xFEDCBA90;
  sysarch(I386_SET_FSBASE, val);
  sysarch(I386_GET_FSBASE, &check);
  printf ("0x%x, 0x%x\n", *val, check);

}





Information forwarded to debian-bugs-dist@lists.debian.org, GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>:
Bug#637528; Package kfreebsd-image-8.1-1-amd64. (Tue, 16 Aug 2011 16:30:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Robert Millan <rmh@debian.org>:
Extra info received and forwarded to list. Copy sent to GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>. (Tue, 16 Aug 2011 16:30:03 GMT) Full text and rfc822 format available.

Message #15 received at 637528@bugs.debian.org (full text, mbox):

From: Robert Millan <rmh@debian.org>
To: 637528@bugs.debian.org
Subject: Re: Bug#637528 closed by Petr Salinger <Petr.Salinger@seznam.cz> (Re: certain %fs values are not accepted in i386_set_fsbase())
Date: Tue, 16 Aug 2011 18:27:49 +0200
2011/8/16 Debian Bug Tracking System <owner@bugs.debian.org>:
> the problem is not in the kernel, but in test program.
> It's main() should be as bellow.

Oops.  I didn't think the pointer could be passed by reference even in
setters.  It seems my patch in #637424 will need some adjustment.

Thanks

-- 
Robert Millan




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Wed, 14 Sep 2011 07:33:16 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Apr 20 11:41:14 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.