9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: puta2001-goo@yahoo.com, 9fans@9fans.net
Subject: Re: [9fans] syscall 53
Date: Sat, 17 May 2014 08:11:27 -0400	[thread overview]
Message-ID: <b2c8158c5fccdf2a4203bcd0a720e8ca@brasstown.quanstro.net> (raw)
In-Reply-To: <1400322208.6926.YahooMailNeo@web160803.mail.bf1.yahoo.com>

On Sat May 17 06:28:02 EDT 2014, puta2001-goo@yahoo.com wrote:

> Hello, help please, after recent (15 May) "pull":
> 
> mntgen 31: bad sys call number 53 pc 813f
> ipconfig, keyfs, webfs webcookies, faces = the same.
> ls -l for example shows
> ls 222: bad sys call number 53 pc bb8f
> ls 222: suicide: sys: bad sys call pc=0x0000bb8f
> acid leads to /sys/src/libc/386/main9.s:16

looks like nsec() in the c library was replaced with a syscall, and
this was put into libc, and many things were recompiled.  unfortunately
pull does not update your kernel, and your kernel doesn't support nsec.

if you have a dump file system, i would recommend copying /386/bin
executables back from before the may 15 update.

if you don't, the next best option is to copy mk from my contrib, then

	r=/n/sources/contrib/quanstro/rescue
	9fs sources &&
		cp $r/mk /386/bin/mk
	cd /sys/src/libc/9sys
	cp $r/mkfile $r/nsec.c .
	mk

now you can rebuild /sys/src/cmd as needed to build a kernel with nsec.

by the way, i'm currenttly using this version of nsec and i prefer it, though
it requires 3 syscalls and not two, and takes about 2x as long.  it's still
just around 1µs on most of my machines.  if nsec() is causing issues, i would
think that cycles(2) would be a good option, and much faster than a syscall.

; cat nsec.c
#include <u.h>
#include <libc.h>

vlong
nsec(void)
{
	uchar b[8];
	int fd;

	fd = open("/dev/bintime", OREAD);
	if(fd != -1)
	if(pread(fd, b, sizeof b, 0) == sizeof b){
		close(fd);
		return getbe(b, sizeof b);
	}
	close(fd);
	return 0;
}



  reply	other threads:[~2014-05-17 12:11 UTC|newest]

Thread overview: 90+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-17 10:23 goo
2014-05-17 12:11 ` erik quanstrom [this message]
2014-05-17 12:23   ` David du Colombier
2014-05-17 12:12 ` erik quanstrom
2014-05-17 13:53 goo
2014-05-17 14:56 ` erik quanstrom
2014-05-17 16:54 goo
2014-05-17 19:11 goo
2014-05-17 21:17 ` Jeff Sickel
2014-05-17 22:21   ` Jeff Sickel
2014-05-17 22:45   ` Skip Tavakkolian
2014-05-18  4:34     ` lucio
2014-05-18  8:29       ` David du Colombier
2014-05-18 15:28         ` Jeff Sickel
2014-05-18 15:32         ` Skip Tavakkolian
2014-05-18 15:34           ` Skip Tavakkolian
2014-05-18 15:38           ` Jeff Sickel
2014-05-18 16:03             ` Skip Tavakkolian
2014-05-18 22:55               ` Skip Tavakkolian
2014-05-19  1:54                 ` erik quanstrom
2014-05-19  2:27                   ` Jeff Sickel
2014-05-19  4:18                     ` lucio
2014-05-19 12:50                       ` erik quanstrom
2014-05-19 14:01                         ` lucio
2014-05-19 16:24                           ` erik quanstrom
2014-05-19 16:54                             ` erik quanstrom
2014-05-19 17:16                               ` lucio
2014-05-19 17:22                                 ` erik quanstrom
2014-05-19 17:13                             ` lucio
2014-05-19 17:25                               ` erik quanstrom
2014-05-19 19:50                                 ` Bakul Shah
2014-05-19 19:59                                   ` erik quanstrom
2014-05-19 20:54                                     ` ron minnich
2014-05-19 21:30                                       ` Charles Forsyth
2014-05-19 21:41                                         ` ron minnich
2014-05-19 23:02                                           ` Kurt H Maier
2014-05-19 23:06                                             ` andrey mirtchovski
2014-05-19 23:12                                               ` Kurt H Maier
2014-05-19 23:17                                                 ` andrey mirtchovski
2014-05-20  0:09                                                   ` Jeff Sickel
2014-05-19 21:34                                       ` Anthony Sorace
2014-05-20 14:04                                         ` erik quanstrom
2014-05-20 16:41                                           ` ron minnich
2014-05-20 17:14                                             ` erik quanstrom
2014-05-20 18:32                                             ` Kurt H Maier
2014-05-20 19:49                                               ` ron minnich
2014-05-20 19:54                                                 ` erik quanstrom
2014-05-20 20:06                                                 ` Kurt H Maier
2014-05-21 10:23                                                 ` hiro
2014-05-20 20:33                                             ` Jeff Sickel
2014-05-21  1:37                                               ` Skip Tavakkolian
2014-05-21 15:40                                                 ` lucio
2014-05-21 16:25                                                   ` erik quanstrom
2014-05-21 16:56                                                     ` Skip Tavakkolian
2014-05-21 20:05                                                       ` Steffen Nurpmeso
2014-05-22  0:13                                                       ` Bakul Shah
2014-05-22  3:43                                                       ` Kurt H Maier
2014-05-22  5:12                                                         ` lucio
2014-05-22 16:15                                                           ` Kurt H Maier
2014-05-22  5:36                                                         ` Bakul Shah
2014-05-22 10:50                                                           ` Aram Hăvărneanu
2014-05-21 17:01                                                     ` lucio
2014-05-21 17:41                                                       ` erik quanstrom
2014-05-21 19:08                                                         ` lucio
2014-05-21 20:36                                                           ` erik quanstrom
2014-05-22  4:46                                                             ` lucio
2014-05-22 13:18                                                               ` erik quanstrom
2014-05-22 13:39                                                                 ` lucio
2014-05-22 14:22                                                                   ` Riddler
2014-05-22  4:54                                                             ` lucio
2014-05-22 13:07                                                               ` erik quanstrom
2014-05-21  1:21                                             ` Skip Tavakkolian
2014-05-21 15:36                                               ` lucio
2014-05-21 15:57                                                 ` erik quanstrom
2014-05-21 17:03                                                   ` lucio
2014-05-21 16:50                                                 ` Kurt H Maier
2014-05-21 18:02                                                   ` hiro
2014-05-20 17:05                                         ` Bakul Shah
2014-05-20 17:28                                           ` erik quanstrom
2014-05-19 17:26                               ` Charles Forsyth
2014-05-19 17:29                                 ` erik quanstrom
2014-05-19 19:15                                   ` Aram Hăvărneanu
2014-05-19 19:44                                     ` Charles Forsyth
2014-05-19 20:51                                     ` erik quanstrom
2014-05-20  3:52                                     ` cinap_lenrek
2014-05-19  4:15                   ` lucio
2014-05-18  0:34 ` erik quanstrom
2014-05-18  7:35 goo
2014-05-21 18:26 sl
2014-05-21 18:31 ` erik quanstrom

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=b2c8158c5fccdf2a4203bcd0a720e8ca@brasstown.quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    --cc=puta2001-goo@yahoo.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;
as well as URLs for NNTP newsgroup(s).