9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Creating a custom jmp_buf; libthread implementation question
@ 2006-11-14  3:23 Joel Salomon
  2006-11-14  3:33 ` Joel Salomon
  2006-11-14  5:44 ` [9fans] Skip Tavakkolian
  0 siblings, 2 replies; 32+ messages in thread
From: Joel Salomon @ 2006-11-14  3:23 UTC (permalink / raw)
  To: 9fans

For my next homework in my Operating Systems class, the professor has
assigned the equivalent of a simple libthread.  I’ve been looking
through the libthread code and getting lost ☹.  I don’t need procs,
only threads (except for the oh-so-fun complication of user-level
pre-emptive scheduling, but I can worry about that mañana).  I do,
however, need to create per-thread stacks, probably by massaging
jmp_bufs in malloc()ed memory.

Where in libthread does the stack get set up, and could somebody
please give me a high-level overview of what the code is doing?

Thanks, --Joel



^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [9fans] Creating a custom jmp_buf; libthread implementation question
  2006-11-14  3:23 [9fans] Creating a custom jmp_buf; libthread implementation question Joel Salomon
@ 2006-11-14  3:33 ` Joel Salomon
  2006-11-14  9:39   ` Bruce Ellis
  2006-11-14  9:58   ` Gorka guardiola
  2006-11-14  5:44 ` [9fans] Skip Tavakkolian
  1 sibling, 2 replies; 32+ messages in thread
From: Joel Salomon @ 2006-11-14  3:33 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> Where in libthread does the stack get set up, and could somebody
> please give me a high-level overview of what the code is doing?

Specifically, in create.c, what is newthread doing—and how?  Unless
that is the wrong place to look, in which case I really am lost.

--Joel

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [9fans]
  2006-11-14  3:23 [9fans] Creating a custom jmp_buf; libthread implementation question Joel Salomon
  2006-11-14  3:33 ` Joel Salomon
@ 2006-11-14  5:44 ` Skip Tavakkolian
  1 sibling, 0 replies; 32+ messages in thread
From: Skip Tavakkolian @ 2006-11-14  5:44 UTC (permalink / raw)
  To: 9fans

> I’ve been looking
> through the libthread code and getting lost ☹.

might want to also checkout Russ' libtask (at swtch.com).



^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [9fans] Creating a custom jmp_buf; libthread implementation question
  2006-11-14  3:33 ` Joel Salomon
@ 2006-11-14  9:39   ` Bruce Ellis
  2006-11-14 12:34     ` Russ Cox
  2006-11-14  9:58   ` Gorka guardiola
  1 sibling, 1 reply; 32+ messages in thread
From: Bruce Ellis @ 2006-11-14  9:39 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I think you are lost, and not many people want to do your homework.

brucee

On 11/14/06, Joel Salomon <joelcsalomon@gmail.com> wrote:
> > Where in libthread does the stack get set up, and could somebody
> > please give me a high-level overview of what the code is doing?
>
> Specifically, in create.c, what is newthread doing—and how?  Unless
> that is the wrong place to look, in which case I really am lost.
>
> --Joel
>


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [9fans] Creating a custom jmp_buf; libthread implementation question
  2006-11-14  3:33 ` Joel Salomon
  2006-11-14  9:39   ` Bruce Ellis
@ 2006-11-14  9:58   ` Gorka guardiola
  2006-11-14 16:25     ` Joel Salomon
  1 sibling, 1 reply; 32+ messages in thread
From: Gorka guardiola @ 2006-11-14  9:58 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Take a look at the implementation of set_jmp and long_jmp in assembler.
Take a look also at the messages about the stack I originated in
9fans not very long (a year?) ago. Once you understand how the stack
works, things should be smoother.

On 11/14/06, Joel Salomon <joelcsalomon@gmail.com> wrote:
> > Where in libthread does the stack get set up, and could somebody
> > please give me a high-level overview of what the code is doing?
>
> Specifically, in create.c, what is newthread doing—and how?  Unless
> that is the wrong place to look, in which case I really am lost.
>
> --Joel
>


-- 
- curiosity sKilled the cat


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [9fans] Creating a custom jmp_buf; libthread implementation question
  2006-11-14  9:39   ` Bruce Ellis
@ 2006-11-14 12:34     ` Russ Cox
  2006-11-14 16:15       ` Joel Salomon
  2006-11-21  3:03       ` Joel Salomon
  0 siblings, 2 replies; 32+ messages in thread
From: Russ Cox @ 2006-11-14 12:34 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Newthread is creating a bunch of data structures.
You really care about _threadinitstack (386.c) and setjmp(2).
"tos" means top of stack.

Russ


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [9fans] Creating a custom jmp_buf; libthread implementation question
  2006-11-14 12:34     ` Russ Cox
@ 2006-11-14 16:15       ` Joel Salomon
  2006-11-21  3:03       ` Joel Salomon
  1 sibling, 0 replies; 32+ messages in thread
From: Joel Salomon @ 2006-11-14 16:15 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> You really care about _threadinitstack (386.c) and setjmp(2).
> "tos" means top of stack.

That's what I was looking for; thanks.

--Joel


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [9fans] Creating a custom jmp_buf; libthread implementation question
  2006-11-14  9:58   ` Gorka guardiola
@ 2006-11-14 16:25     ` Joel Salomon
  2006-11-14 16:38       ` Joel Salomon
  0 siblings, 1 reply; 32+ messages in thread
From: Joel Salomon @ 2006-11-14 16:25 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 11/14/06, Gorka guardiola <paurea@gmail.com> wrote:
> Take a look also at the messages about the stack I originated in
> 9fans not very long (a year?) ago. Once you understand how the stack
> works, things should be smoother.

Found it: <http://9fans.net/archive/2006/03/75>, and am printing the
thread for reference.

Reminder to self: reread /sys/doc/compiler.ps regarding stack growth direction.

--Joel


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [9fans] Creating a custom jmp_buf; libthread implementation question
  2006-11-14 16:25     ` Joel Salomon
@ 2006-11-14 16:38       ` Joel Salomon
  2006-11-14 19:44         ` Taj Khattra
  0 siblings, 1 reply; 32+ messages in thread
From: Joel Salomon @ 2006-11-14 16:38 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 11/14/06, Skip Tavakkolian <9nut@9netics.com> wrote:
> might want to also checkout Russ' libtask (at swtch.com).

That'll be more useful later, when I'm working on the scheduling.  I
was asking about stack creation though; my professor gave us sample
code for use under Linux (very similar to libtask's) and I wanted
pointers on how to translate that to Plan 9.

The final project won't much look like a back-ported libtask, though;
it'll be a bastardized uniprocessor kernel.  Good learning project,
but not of general use.

Thanks for the pointers,
--Joel


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [9fans] Creating a custom jmp_buf; libthread implementation question
  2006-11-14 16:38       ` Joel Salomon
@ 2006-11-14 19:44         ` Taj Khattra
  0 siblings, 0 replies; 32+ messages in thread
From: Taj Khattra @ 2006-11-14 19:44 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> might want to also checkout Russ' libtask (at swtch.com).

another one is the implementation of the Thread, Sem and Chan
interfaces in dave hanson's cii
(http://www.cs.princeton.edu/software/cii/).  chapter 20 has the gory
details.


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [9fans] Creating a custom jmp_buf; libthread implementation question
  2006-11-21  3:03       ` Joel Salomon
@ 2006-11-21  3:03         ` William Josephson
  2006-11-21  3:08         ` Russ Cox
  1 sibling, 0 replies; 32+ messages in thread
From: William Josephson @ 2006-11-21  3:03 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Mon, Nov 20, 2006 at 10:03:09PM -0500, Joel Salomon wrote:
> On 11/14/06, Russ Cox <rsc@swtch.com> wrote:
> >You really care about _threadinitstack (386.c) and setjmp(2).
> >"tos" means top of stack.
>
> What does the line
>        tos = (ulong*)&t->stk[t->stksize&~7];
> specifically stksize&~7, mean?

Um.  It means just what it says :-) I.e. round
down to the nearest multiple of 8 by clearing
the low three bits.  Recall which way the stack
grows on IA-32...


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [9fans] Creating a custom jmp_buf; libthread implementation question
  2006-11-14 12:34     ` Russ Cox
  2006-11-14 16:15       ` Joel Salomon
@ 2006-11-21  3:03       ` Joel Salomon
  2006-11-21  3:03         ` William Josephson
  2006-11-21  3:08         ` Russ Cox
  1 sibling, 2 replies; 32+ messages in thread
From: Joel Salomon @ 2006-11-21  3:03 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 11/14/06, Russ Cox <rsc@swtch.com> wrote:
> You really care about _threadinitstack (386.c) and setjmp(2).
> "tos" means top of stack.

What does the line
        tos = (ulong*)&t->stk[t->stksize&~7];
specifically stksize&~7, mean?

--Joel


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [9fans] Creating a custom jmp_buf; libthread implementation question
  2006-11-21  3:03       ` Joel Salomon
  2006-11-21  3:03         ` William Josephson
@ 2006-11-21  3:08         ` Russ Cox
  1 sibling, 0 replies; 32+ messages in thread
From: Russ Cox @ 2006-11-21  3:08 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

>         tos = (ulong*)&t->stk[t->stksize&~7];

t->stksize&~7 is the bit-fiddly yet idiomatic way
to round stksize down to a multiple of 8.
Since t->stk is 8-aligned already, this makes
sure that tos is 8-aligned.

Russ


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [9fans]
  2023-05-10 22:33 [9fans] Romano
@ 2023-05-10 23:51 ` Dan Cross
  0 siblings, 0 replies; 32+ messages in thread
From: Dan Cross @ 2023-05-10 23:51 UTC (permalink / raw)
  To: 9fans

On Wed, May 10, 2023 at 6:34 PM Romano <unobe@cpan.org> wrote:
> References: <CAOw7k5hWStzajH5PmhEEyh1PFQCwiGZR7YsqB1E0+bkE9XxjRA@mail.gmail.com>
> Subject: RUDP and/or others
>
> I know this is from a thread almost 8 years old on 9fans.
>
> I'm ignorant of why RUDP wasn't used in lieu of TCP for 9P
> connections.  Anyone know the whys and wherefores (either technical,
> historical, or political)?  I had read earlier that TCP was used in
> lieu of IL (another transport protocol developed for Plan 9) due to
> performance over long-distance connections.  Did RUDP just not cut it
> in some other way for the needs of sending/receiving 9P messages?
> From the description in ip(3), it seems to have the nice behavior of
> resuming communication when a machine reboots.  Is it due to the
> middle boxes/firewalls that are present in present-day networks?

Probably because it didn't support delivery ordering guarantees. Talk
about a blast from the past, though.

        - Dan C.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T6ae3228112b5c3b4-Md522f5fdecdde562fa81cfd4
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [9fans] 
@ 2023-05-10 22:33 Romano
  2023-05-10 23:51 ` [9fans] Dan Cross
  0 siblings, 1 reply; 32+ messages in thread
From: Romano @ 2023-05-10 22:33 UTC (permalink / raw)
  To: 9fans

References: <CAOw7k5hWStzajH5PmhEEyh1PFQCwiGZR7YsqB1E0+bkE9XxjRA@mail.gmail.com>
Subject: RUDP and/or others

I know this is from a thread almost 8 years old on 9fans.

I'm ignorant of why RUDP wasn't used in lieu of TCP for 9P
connections.  Anyone know the whys and wherefores (either technical,
historical, or political)?  I had read earlier that TCP was used in
lieu of IL (another transport protocol developed for Plan 9) due to
performance over long-distance connections.  Did RUDP just not cut it
in some other way for the needs of sending/receiving 9P messages?
From the description in ip(3), it seems to have the nice behavior of
resuming communication when a machine reboots.  Is it due to the
middle boxes/firewalls that are present in present-day networks?


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T6ae3228112b5c3b4-Mfb10fb6019dcc8a6303b3af1
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [9fans] 
  2023-04-21 13:33 [9fans] Thaddeus Woskowiak
@ 2023-04-27 23:13 ` Lyndon Nerenberg (VE7TFX/VE6BBM)
  0 siblings, 0 replies; 32+ messages in thread
From: Lyndon Nerenberg (VE7TFX/VE6BBM) @ 2023-04-27 23:13 UTC (permalink / raw)
  To: 9fans, Thaddeus Woskowiak

Thaddeus Woskowiak writes:
> Has anyone written any code to deal with SCPI, Standard Commands for
> Programmable Instruments, on plan 9?

I did a couple of years ago, for the same reason: programmable PSUs and
to suck data down from an ocsilloscope.  It never worked well, and I
have since lost the SD card the code was on (I was using an RPi).

I would be interested in pursuing this, though, as I have a growing
stack of SCPI-aware test gear.

--lyndon

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Td89e32ced039912e-M38b28f4cce675b359623c480
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [9fans] 
@ 2023-04-21 13:33 Thaddeus Woskowiak
  2023-04-27 23:13 ` [9fans] Lyndon Nerenberg (VE7TFX/VE6BBM)
  0 siblings, 1 reply; 32+ messages in thread
From: Thaddeus Woskowiak @ 2023-04-21 13:33 UTC (permalink / raw)
  To: 9fans

Has anyone written any code to deal with SCPI, Standard Commands for
Programmable Instruments, on plan 9?
https://en.wikipedia.org/wiki/Standard_Commands_for_Programmable_Instruments

I have a few instruments and just bought a cheap Kiprim Programmable
DC power supply which works with 9front's nusb/serial. I poked at it a
bit using con and rc and it works rather well. I also bought a Bertan
high vintage supply that features GPIB but I do not yet have a GPIB
adapter.

-- 
taw

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Td89e32ced039912e-M496deb2fdb509a3ca1730659
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [9fans]
  2020-10-21  0:17 Steve Simon
@ 2020-10-21  3:45 ` Lucio De Re
  0 siblings, 0 replies; 32+ messages in thread
From: Lucio De Re @ 2020-10-21  3:45 UTC (permalink / raw)
  To: 9fans

On 10/21/20, Steve Simon <steve@quintile.net> wrote:
> Hi people,
>
> I have had to renew my certificate for tls and am getting a strange error
> from imap4d
> when trying to collect email from my iphone.
>
>         tls reports failed: factotum_rsa_open: no key matches proto=rsa
> service=tls role=client
>
> Which does not make sense to me as my factotum has my new ras key in it:
>
Steve,

I found that a key size of 4096 didn't work and your diagnostic
message is what I remember seeing. I'm sure 1024 was OK and I never
got to try 2048 (or identify and fix the 4096 issue).

Don't give too much weight to the above, the problem may well be
elsewhere, but you may want to try 1024 bits first.

I have yet to get ssh to work adequately on my network; there are so
many factors involved it is just easier to use Linux. Which I find
unfortunate. If you make some progress or need me to help in some way,
please let me know.

Lucio.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [9fans] [
@ 2013-04-09  0:12 Ashish Raste
  0 siblings, 0 replies; 32+ messages in thread
From: Ashish Raste @ 2013-04-09  0:12 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 676 bytes --]

 I'm a CS student at National University of Singapore. I came through the
GSoC project ideas of Plan9 and I'm interested to know/learn about
implementing 9P in Dart.

I mainly wanted to ask you the following question:
1. I read few papers for understanding the basics of Plan9, Inferno and 9P.
I wanted to know whether you could suggest me some pointers/references
specifically related to implement 9P in Dart so that I can start
working/learning along those lines.

I hope to get a reply from Charles Forsyth, the mentor of this project. It
would be really helpful and great if others also drop by to give their
advice/suggestion.

Thanks and Regards,
Ashish

[-- Attachment #2: Type: text/html, Size: 1407 bytes --]

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [9fans]
  2006-01-05 19:50 [9fans] marina
@ 2006-01-05 20:34 ` andrey mirtchovski
  0 siblings, 0 replies; 32+ messages in thread
From: andrey mirtchovski @ 2006-01-05 20:34 UTC (permalink / raw)
  To: marina, Fans of the OS Plan 9 from Bell Labs

search the archives -- people have had success with an old,
unsupported sis900 driver available here:

http://pages.cpsc.ucalgary.ca/~mirtchov/lanlp9/sis900/ethersis.c

On 1/5/06, marina@surferz.net <marina@surferz.net> wrote:
> Hi all:
>
> Just got the Dec 30th version of Plan9 up on my home computer
> and i may be trying it at work on a spare PC. At home i have not
> been able to get networking up with a sis900 nic card. I have a
> compatible card ordered, but can anyone give me some pointers so
> we can get this computer on the net before the new card arrives.
>
> Thanks in advance
>
> Marina Brown
>
> --------------------------------------------------------------------
> mail2web - Check your email from the web at
> http://mail2web.com/ .
>
>
>


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [9fans]
@ 2006-01-05 19:50 marina
  2006-01-05 20:34 ` [9fans] andrey mirtchovski
  0 siblings, 1 reply; 32+ messages in thread
From: marina @ 2006-01-05 19:50 UTC (permalink / raw)
  To: 9fans

Hi all:

Just got the Dec 30th version of Plan9 up on my home computer
and i may be trying it at work on a spare PC. At home i have not
been able to get networking up with a sis900 nic card. I have a
compatible card ordered, but can anyone give me some pointers so
we can get this computer on the net before the new card arrives.

Thanks in advance

Marina Brown

--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .




^ permalink raw reply	[flat|nested] 32+ messages in thread

* [9fans] ÊÀ½ç×î¾ß¹æÄ£µÄ¹âµçÕ¹ÀÀ»á³ÏÑûÄúµÄ²ÎÓ룡
@ 2004-07-20  8:36 €й€€ⲩ€€_€Ź€ӡ
  0 siblings, 0 replies; 32+ messages in thread
From: €й€€ⲩ€€_€Ź€ӡ @ 2004-07-20  8:36 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 1669 bytes --]

  世界最具规模的光电展览会--中国国际光电博览会诚邀您的参与!
  中国国际光电博览会(简称"中国光博会"或"CIOE")汇集当今世界光电行业最先进的技术及产品,已成为世界瞩目的品牌展会,是国内首家获得英国摩迪国际认证(ISO9001:2000质量管理体系认证)的展览会。
  第五届中国国际光电博览会已于2003年9月9日在深圳市高交会展览中心圆满落下帷幕。此次展会组织了众多海内外光电企业参展,展出规模为50000平方米,展位达2750个,参展企业达1200家,其中海外企业超过300家,美国、欧洲、日本、德国、韩国等国都是集中组团参展。展会期间,国内外参展商成交异常活跃,美国,加拿大、韩国等国采购团和中国电信、中国联通、中国网通、海尔集团、TCL集团、创维集团等企业集团都前来洽谈采购,据统计数据显示,在本届CIOE上实际成交金额约人民币15.6亿元,美金8600多万元,现场达成意向性的签约金额26亿元人民币,1.2亿美金。
  第六届中国国际光电博览会,将于2004年9月6-9日在深圳高交会展览中心如期举行。本次光博会将分设光通信、光电显示、光电子与光电材料、光学仪器、激光与激光应用、光存储与光信息等六大展区。到目前为止,已有来自国内外20多个国家和地区近1000家企业报名参加了本次光博会,其中包括美国OFS、中兴光电子、飞通光电、武汉电信器件、京东方、台湾唯冠、联创健和、大连路明、台湾光磊、ASM、日本NSG、NEC、日本MORITEX、德国施耐德、北方光电、凤凰光学、宁波永新、浙江舜宇、广州飒特、浙江大立、武汉高德、华工激光、美国恩耐激光、楚天激光、新纶科技等国内外知名企业。        
  第六届中国国际光电博览会展出规模将达45000平方米,是当今世界最大规模的光电专业展会。第六届中国国际光电博览会现已接受报名,欢迎各位光电产业界同仁参展、参观指导。

 更多详情请查看附件,或致电咨询!
 咨询电话:0755-83536689  83536031
 传真:0755-83536011
 网址:http://www.cioe.cn
  邮箱:edit@cioe.cn
 联络人:张国印 先生











[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2.1: Type: text/plain; charset="US-ASCII", Size: 369 bytes --]

from postmaster@ethel:
The following attachment had content that we can't
prove to be harmless.  To avoid possible automatic
execution, we changed the content headers.
The original header was:

	Content-Type: application/octet-stream;
	name="CIOE€€€뺯.doc"
	Content-Transfer-Encoding: base64
	Content-Disposition: attachment;
	filename="CIOE€€€뺯.doc"

[-- Attachment #2.2: CIOE€€€뺯.doc.suspect --]
[-- Type: application/octet-stream, Size: 210944 bytes --]

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [9fans]
  2004-07-05  4:06   ` [9fans] Stephen Wynne
  2004-07-05 17:23     ` [9fans] andrey mirtchovski
@ 2004-07-05 20:33     ` Eric Grosse
  1 sibling, 0 replies; 32+ messages in thread
From: Eric Grosse @ 2004-07-05 20:33 UTC (permalink / raw)
  To: 9fans

> From stevemw@place.org Mon Jul  5 00:08:24 EDT 2004
>    /adm/secstore/store/bootes/factotum/
>    "implausible filesize -1 for factotum"

Updated secstored.c on sources now logs the more useful message
   "/adm/secstore/store/bootes/factotum should be a plain file, not a directory"

The right fix would be for me to automate the initial configuration
of secstored, but this small code change will have to do for now.

Eric


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [9fans]
  2004-07-05  4:06   ` [9fans] Stephen Wynne
@ 2004-07-05 17:23     ` andrey mirtchovski
  2004-07-05 20:33     ` [9fans] Eric Grosse
  1 sibling, 0 replies; 32+ messages in thread
From: andrey mirtchovski @ 2004-07-05 17:23 UTC (permalink / raw)
  To: 9fans

> andrey mirtchovski wrote:
>
>  > you won't need a secstore for your installation to work.
>
> OK, I guess I don't need it for connecting with drawterm,
> either. But apparently I need it for SSH and pulling
> updates. I may also need it for other stuff. I'm running
> an app that makes a call to auth_getuserpasswd() and it
> fails now that I've tried to setup securestore; it used to
> get past that point before.

you don't need secstore for pulling from sources.  you don't need it
to ssh out from Plan 9, you don't even (necessarily) need it to ssh to
the Plan 9 machine (though you'll get a warning for the changed key
every time you reinitialize with auth/rsagen, i.e.  after a reboot).

in fact, secstore can be left as the last thing you setup, after
having made sure everything else works -- it's just a (very useful!)
convenience.

> The mkdirs were done before.  One small issue, factotum
> wanted /adm/secstore/store/bootes/factotum/ (I think it
> was).
>
>  > on auth server:
>  >
>  >     auth/secstored
>  >     mkdir /adm/secstore
>  >     mkdir /adm/secstore/store
>  >     mkdir /adm/secstore/who
>  >     auth/secuser dpx
>  >

did this succeed?

you've read the secstore(1) man page, i presume?  it basically
explains why the above steps should be taken (and why there should be
a chmod 770 somewhere in there too):

          Secuser is an administrative command that runs on the sec-
          store machine, normally the authserver, to create new
          accounts and to change status on existing accounts.  It
          prompts for account information such as password and expira-
          tion date, writing to /adm/secstore/who/$uid.  The
          /adm/secstore directory should be created mode 770 for the
          userid or groupid of the secstored process.

	[...]

          /adm/secstore/who/$uid secstore account name, expiration
          date, verifier
          /adm/secstore/store/$uid/ users' files

>  > on terminal:
>  >
>  >     touch /tmp/factotum
>  >     auth/secstore -p /tmp/factotum
>  >       ramfs -p; cd /tmp
>  >     auth/secstore -g factotum
>  >     secstore password:
>  >     echo 'key proto=apop dom=x.com user=dpx \
>  >             !password=y~1' >> factotum
>  >     auth/secstore -p factotum
>  >     secstore password:
>  >     cat factotum > /mnt/factotum/ctl
>
> This is where I'm still stuck.

so, what do you see (as the user who started secstored) in
/adm/secstore?  here's a sample from our machines:

	plan9# ls -l /adm/secstore/store/andrey
	--rw-rw---- M 4951 bootes bootes 696 Sep 15  2003 /adm/secstore/store/andrey/factotum
	plan9#

you should see a single file (factotum) if you've put it properly.
from what you gave above it looks like you're looking for a file named
'factotum' already existing in secstore, however when you initialize a
user's secstore there's absolutely nothing in it -- you need to put
the files there first.

>
> Now I get to the ramfs stage! However, secstore -g complains
> about /tmp/factotum not existing. If I skip the
> ramfs step, I see this:
>
>     cpu% auth/secstore -g factotum
>     secstore password:
>     secstore
>     implausible filesize for factotum
>     secstore cmd failed
>
> On the console of the PC, I see "implausible filesize -1
> for factotum," but no information about which file is too
> small.
>

secstore doesn't have any files in it by default, it just encrypts
whatever you decide to store in it.  usually that is a file suitable
for initializing your factotum.

it looks like you have a bad file in it, so all you need to do is
remove it and store it anew.  here's how to do it:

	% auth/factotum # hit enter on the 'secstore password' prompt
	% ramfs -p
	# you may wish to log in to a few places before the next step,
	# just to make sure you have as many passwords as you can
	# from the beginning. ssh to one or two machines, just for fun
	% cat /mnt/factotum/ctl > /tmp/factotum
	% cd /tmp
	# edit /tmp/factotum and change all question marks to the actual
	# passwords you use, for example if /mnt/factotum/ctl has:
	#	key proto=p9sk1 dom=plan9.ca user=somebody !password?
	# in /tmp/factotum it should appear as:
	#	key proto=p9sk1 dom=plan9.ca user=somebody !password=mypassword
	%
	# now simply add this file to the secstore:
	% auth/secstore -p factotum
	# and kill the ramfs session (^D)

and verify that the new password works by starting a new factotum and
attempting to login to one of the machines whose passwords you've
added to the factotum file in secstore.  if doing it for bootes you
may want to add the ssh server key there too (follow the ssh(1)
instructions)

andrey



^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [9fans]
  2004-07-03 16:37 ` [9fans] andrey mirtchovski
@ 2004-07-05  4:06   ` Stephen Wynne
  2004-07-05 17:23     ` [9fans] andrey mirtchovski
  2004-07-05 20:33     ` [9fans] Eric Grosse
  0 siblings, 2 replies; 32+ messages in thread
From: Stephen Wynne @ 2004-07-05  4:06 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

andrey mirtchovski wrote:

 > you won't need a secstore for your installation to work.

OK, I guess I don't need it for connecting with drawterm,
either. But apparently I need it for SSH and pulling
updates. I may also need it for other stuff. I'm running
an app that makes a call to auth_getuserpasswd() and it
fails now that I've tried to setup securestore; it used to
get past that point before.

 > check the /sys/doc/auth.ps paper (also on Bell-Labs'
 > site) secstore/factotum pair

Well, . Here's where I am now:

On my terminal via a drawterm connection (I haven't
recompiled for more GUI support yet), I'm following
http://pages.cpsc.ucalgary.ca/~mirtchov/lanlp9/tips.html
on setting up secstore.

The mkdirs were done before.  One small issue, factotum
wanted /adm/secstore/store/bootes/factotum/ (I think it
was).

 > on auth server:
 >
 >     auth/secstored
 >     mkdir /adm/secstore
 >     mkdir /adm/secstore/store
 >     mkdir /adm/secstore/who
 >     auth/secuser dpx
 >
 > on terminal:
 >
 >     touch /tmp/factotum
 >     auth/secstore -p /tmp/factotum
 >       ramfs -p; cd /tmp
 >     auth/secstore -g factotum
 >     secstore password:
 >     echo 'key proto=apop dom=x.com user=dpx \
 >             !password=y~1' >> factotum
 >     auth/secstore -p factotum
 >     secstore password:
 >     cat factotum > /mnt/factotum/ctl

This is where I'm still stuck.

 > you'll need to have both auth/secstored and
 > auth/factotum started.

I do, but there must be something else wrong. I found one
thing: my lib/ndb/local file still had localhost and
127.0.0.1 as the sys'name from my initial fumbling around
to get it online.

Now I get to the ramfs stage! However, secstore -g complains
about /tmp/factotum not existing. If I skip the
ramfs step, I see this:

    cpu% auth/secstore -g factotum
    secstore password:
    secstore
    implausible filesize for factotum
    secstore cmd failed

On the console of the PC, I see "implausible filesize -1
for factotum," but no information about which file is too
small.

This is what I have in /mnt/factotum:

    cpu% pwd
    /mnt/factotum
    cpu% cat ctl
    key proto=p9sk1 user=bootes dom=9net !hex? !password?
    cpu% ls -l
    -lrw------- M 48 bootes bootes 0 Jul  4 23:46 confirm
    --rw-r--r-- M 48 bootes bootes 0 Jul  4 23:46 ctl
    -lr-------- M 48 bootes bootes 0 Jul  4 23:46 log
    -lrw------- M 48 bootes bootes 0 Jul  4 23:46 needkey
    --r--r--r-- M 48 bootes bootes 0 Jul  4 23:46 proto
    --rw-rw-rw- M 48 bootes bootes 0 Jul  4 23:46 rpc

 > it's like riding a bycicle -- once you do it you'll
 > always know how it's done :)

I'm still trying to bolt on my training wheels, I think.
But thanks for your patience!


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [9fans]
  2004-07-03  7:17 [9fans] cpuserver: dhcp for authsrv, rio, users, ssh, factotum, pull Stephen Wynne
@ 2004-07-03 16:37 ` andrey mirtchovski
  2004-07-05  4:06   ` [9fans] Stephen Wynne
  0 siblings, 1 reply; 32+ messages in thread
From: andrey mirtchovski @ 2004-07-03 16:37 UTC (permalink / raw)
  To: 9fans

that's a long one! let's try step by step :)

> This may sound funny, but can I setup a CPU server, auth server,
> and terminal all on the same system and have it all configure
> itself dynamically based on a DHCP IP address?

there's no reason why not.  the only trick you'll need to take care of
is to configure the ndb properly in case the IP address of the machine
is constantly changing.  it won't be, would it?

so, by following the instructions on the wiki you should do something
like:

	- compile 9pcauth

	- edit /rc/bin/cpurc to dhcp an ip address, start auth/keyfs
	and start rio for the terminal part.

>
> Although my system worked just fine from the gnot install defaults,
> after converting to a cpuserver,  I got this:
>
>     RIO says: aux/vga: mga2164w: can't set mga type
>     rio: can't open display: initdisplpay: /dev/draw/new: no framebuffer
>     init: rc exit status: rc 12: rio 13: display open

copy the 'vga*' lines from /sys/src/9/pc/pcf to the kernel you're
compiling (/sys/src/9/pc/pcauth)

cpu server kernels by default have very few graphics cards compiled in.

> I am unclear what passwords to assign to secstore and
> bootes as I'm setting up the authserver for the first time.
> I'm also unclear what the difference is between bootes
> and other users I might create after this.
>

bootes (or any other user you dedicate as the cpu owner) will control
the resources on a particular machine.  bootes is just a conventional
(?) name bell-labs have adopted -- people in other places have chosen
other names for the cpu owners, and i myself used to boot under my own
user when i had a setup identical to yours (a single machine for
everything).  if you choose a diffferent name and want users to login
edit /lib/ndb/auth appropriately :)

when users log in to a Plan 9 installation their passwords are
verified by an 'auth/keyfs' on the AUTH server of that particular
installation.  those are the 'plan9' passwords.  on the other hand
when a user logs in they may decide to initialize their factotum with
passwords from the secstore.  secstore is just a convenient storage
for secrets (an encrypted file system if you wish) and has no role in
the interaction between machines in an installation.  you won't need a
secstore for your installation to work.

check the /sys/doc/auth.ps paper (also on Bell-Labs' site) for more
detailed information on the secstore/factotum pair.

> Also, SSH fails to connect now that I've rebooted and
> setup bootes as the terminal "owner" (if that's the right term,
> pardon my pun). I figure something must be haywire
> in my authentication (Factotum?). Following instructions at
> http://pages.cpsc.ucalgary.ca/~mirtchov/lanlp9/tips.html
> I figured I should combine both authserver and terminal
> instructions. I get:
>
>     cpu% auth/secstore -p /tmp/factotum
>     can't dial tcp!$auth!5356
>     secstore authentication failed

you'll need to have both auth/secstored and auth/factotum started.
secstored should be started from /rc/bin/cpurc, you can put
'auth/factotum' in your profile or just start it by hand.

also make sure your /lib/ndb/local has an 'auth=' entry for the subnet
you're in, here's an example:

	ipnet=hidden ip=192.168.0.0 ipmask=255.255.0.0
		proto=tcp
		cpu=plan9.ucalgary.ca
		fs=plan9.ucalgary.ca
		auth=plan9.ucalgary.ca
		authdom=plan9.ucalgary.ca
		dns=136.159.5.14
		dns=136.159.5.15

>
> Out of curiosity, I tried to do a pull to update my system.
> That didn't work, either. I was running as bootes connected
> through drawterm:
>
> cpu% /usr/glenda/bin/rc/pull
> post...
> srv tcp!sources.cs.bell-labs.com!9fs: mount failed: authentication failed
> bind: /n/sources/plan9: '/n/sources/plan9' does not exist
> servermount: bind 363: bind
> cpu% 9fs sources
> srv tcp!sources.cs.bell-labs.com: mount failed: authentication failed

that would indicate you have no auth/factotum started.


>
> I apologize for asking so many questions at once, but there
> doesn't seem to be a true cookbook recipe posted on just
> how to do this with all the obvious steps included for mortals
> like me.

it's like riding a bycicle -- once you do it you'll always know how
it's done :)

you're welcome to write a howto from your perspective (once everything
is done) and we'll put it on the wiki :)


> By the way, can I reboot a system from drawterm and how would I
> do that?

echo reboot > /dev/reboot

good luck: andrey



^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [9fans] :)
  2001-08-23  2:41 [9fans] usb floppy Boyd Roberts
@ 2001-08-23  3:52 ` andrey mirtchovski
  0 siblings, 0 replies; 32+ messages in thread
From: andrey mirtchovski @ 2001-08-23  3:52 UTC (permalink / raw)
  To: 9fans

On Thu, 23 Aug 2001, Boyd Roberts wrote:

> azerty

all my friends residing in germany say that azerty ruley...

not that this pertains to any p9-relevant conversations :)



^ permalink raw reply	[flat|nested] 32+ messages in thread

* [9fans]
@ 1997-10-17 16:07 Scott
  0 siblings, 0 replies; 32+ messages in thread
From: Scott @ 1997-10-17 16:07 UTC (permalink / raw)


I don't like the brackets either, but postmaster@cse.psu.edu decided they
were cool, and so every mailing list gets them, despite local opposition.





^ permalink raw reply	[flat|nested] 32+ messages in thread

* [9fans]
@ 1997-10-17 12:27 Boyd
  0 siblings, 0 replies; 32+ messages in thread
From: Boyd @ 1997-10-17 12:27 UTC (permalink / raw)


    From: Steve_Kilbane@cegelecproj.co.uk

    Boyd: I imagine that it wouldn't be hard for you to strip
    out the "[9fans]" with procmail or similar. I can also imagine that
    given your correct headers, you probably get a lot of spam, and this
    is just the final straw on email hassle. :-)

i could strip it out, but that's not the point.  why strip out what
should not be there?  i do get a lot of spam, but i won't change my
address -- that would be giving in.




^ permalink raw reply	[flat|nested] 32+ messages in thread

* [9fans]
@ 1997-10-17  9:40 Steve_Kilbane
  0 siblings, 0 replies; 32+ messages in thread
From: Steve_Kilbane @ 1997-10-17  9:40 UTC (permalink / raw)


> I also enjoy the X-Face header line you
> use, but I can imagine objections to that too.

Boyd might not get complaints, but I certainly get them
about my X-Face header. Mind you, they're usually verbal,
and from the same person who has a remarkably short memory. :-)

Plus, some people have assumed that the X-Faces header is just
corrupted data, or have confused it with the gumph that some
over-enthusiastic MIME mailers insist on chucking in (M$ Exchange,
I'm talking to *you*).

wrt "[9fans]", it's an interesting issue. Ok, so many can't change
their broken mailers, but I've generally assumed that most of the
readers on this particular list are in a better position to affect
or fix their environment. This is a false assumption, as shown by
jim's comment on unix support and news/mail access earlier this
week. Boyd: I imagine that it wouldn't be hard for you to strip
out the "[9fans]" with procmail or similar. I can also imagine that
given your correct headers, you probably get a lot of spam, and this
is just the final straw on email hassle. :-)

Personally, I don't care either way. I imagine the Reply-To is far
more contentious (and don't care either way on that, either; there
are cases when I want both settings).





^ permalink raw reply	[flat|nested] 32+ messages in thread

* [9fans]
@ 1997-10-17  8:51 Lucio
  0 siblings, 0 replies; 32+ messages in thread
From: Lucio @ 1997-10-17  8:51 UTC (permalink / raw)


According to Boyd Roberts <boyd@france3.fr> :

> is this [name] nonsense in the Subject: line some kind of disease?

I find it useful, and users of a number of mailing lists off my system
have voiced no objections.  I also enjoy the X-Face header line you
use, but I can imagine objections to that too.

Most useful, the mailing list indication makes it easy to group
messages using the obiquitus "Subject:" line sorting, whereas there is
little in the line of consistent sort algorithms that will work
reliably for any other header line (or message contentsm for that
matter).

I don't think broken mailers come into the picture at all, and in any
events, not everyone is in a position to repair their mailers.
--
Lucio de Re (lucio@proxima.alt.za)
Disclaimer: I'm working at getting my opinions to agree with me.






^ permalink raw reply	[flat|nested] 32+ messages in thread

* [9fans]
@ 1997-10-17  8:00 Boyd
  0 siblings, 0 replies; 32+ messages in thread
From: Boyd @ 1997-10-17  8:00 UTC (permalink / raw)


is this [name] nonsense in the Subject: line some kind of disease?
this is the second mailing list i'm on that has succombed to this
majordrongo madness.  i know it's 9fans from the To: and the Cc: lines.
i have heard that the rational is for those who have broken mailers.
they should fix their mailers, not break the list.  braindamage should
not be propagated.




^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2023-05-10 23:52 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-14  3:23 [9fans] Creating a custom jmp_buf; libthread implementation question Joel Salomon
2006-11-14  3:33 ` Joel Salomon
2006-11-14  9:39   ` Bruce Ellis
2006-11-14 12:34     ` Russ Cox
2006-11-14 16:15       ` Joel Salomon
2006-11-21  3:03       ` Joel Salomon
2006-11-21  3:03         ` William Josephson
2006-11-21  3:08         ` Russ Cox
2006-11-14  9:58   ` Gorka guardiola
2006-11-14 16:25     ` Joel Salomon
2006-11-14 16:38       ` Joel Salomon
2006-11-14 19:44         ` Taj Khattra
2006-11-14  5:44 ` [9fans] Skip Tavakkolian
  -- strict thread matches above, loose matches on Subject: below --
2023-05-10 22:33 [9fans] Romano
2023-05-10 23:51 ` [9fans] Dan Cross
2023-04-21 13:33 [9fans] Thaddeus Woskowiak
2023-04-27 23:13 ` [9fans] Lyndon Nerenberg (VE7TFX/VE6BBM)
2020-10-21  0:17 Steve Simon
2020-10-21  3:45 ` [9fans] Lucio De Re
2013-04-09  0:12 [9fans] [ Ashish Raste
2006-01-05 19:50 [9fans] marina
2006-01-05 20:34 ` [9fans] andrey mirtchovski
2004-07-20  8:36 [9fans] ÊÀ½ç×î¾ß¹æÄ£µÄ¹âµçÕ¹ÀÀ»á³ÏÑûÄúµÄ²ÎÓ룡 €й€€ⲩ€€_€Ź€ӡ
2004-07-03  7:17 [9fans] cpuserver: dhcp for authsrv, rio, users, ssh, factotum, pull Stephen Wynne
2004-07-03 16:37 ` [9fans] andrey mirtchovski
2004-07-05  4:06   ` [9fans] Stephen Wynne
2004-07-05 17:23     ` [9fans] andrey mirtchovski
2004-07-05 20:33     ` [9fans] Eric Grosse
2001-08-23  2:41 [9fans] usb floppy Boyd Roberts
2001-08-23  3:52 ` [9fans] :) andrey mirtchovski
1997-10-17 16:07 [9fans] Scott
1997-10-17 12:27 [9fans] Boyd
1997-10-17  9:40 [9fans] Steve_Kilbane
1997-10-17  8:51 [9fans] Lucio
1997-10-17  8:00 [9fans] Boyd

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).