Coreboot on ThinkPad x60 - BSDCan

2015-06-08 Thread Sevan / Venture37
Hi,
I'll have my x60s which has been flashed with coreboot/seabios at BSDCan this 
year, if anyone is interested in checking/testing anything on it, give me a 
shout. I'm particularly interested in why the CPU is not identified correctly 
with its model, just get intel 1400.
See you there :)


Sevan / Venture37



Re: Flex / Regexps (Re: awk regex bug)

2015-06-08 Thread hruodr
I wrote:

> [...] Why should
> be difficult to track the indices in yytext of the beginning and the end 
> of each matching subexpression, in two arrays of integers (one for
> the beginning and one for the end)? [...] 

More exactly: in the first array the index of the first element of
the matching subexpression, in the second the index of the last
element plus one. When both indices are equal, then the subexpression
is void. 

If the second index correspond to something irrelevant in yytext, then 
one can set yytext there to 0 for easily obtaining a pointer to a null 
terminating string equal to the subexpression.

Just dreaming.

Rodrigo.



Re: ifconfig.if rtsol autoconf diff

2015-06-08 Thread Tim Kuijsten

Op 06-06-15 om 13:24 schreef Florian Obser:

On Fri, Jun 05, 2015 at 03:41:22PM +0200, Tim Kuijsten wrote:

Had some trouble this morning in configuring inet6 on a new laptop.


What problems did you encounter? inet6 autoconf or rtsol in
hostname.if are supposed to work exactly the same.


Mmm, I tried inet6 rtsol instead of just rtsol. Now it works idd like 
inet6 autoconf. Tnx!


Somehow the static address that was set during install results in some 
routing errors (i.e. "ping6: UDP connect: No route to host") after 
booting into the installed OS. That's why I removed the static address 
and tried rtsol again.


Thanks for the explanation. I have to read a bit more about IPv6.

-Tim




Finally figured out that rtsol is dropped and that the functionality
is moved to the kernel. Diff for hostname.if(5) included. Someone
might want to replace the "rtsol" keyword in the installer as well.


When I moved the SLAAC logic into the kernel the main motivation was
to get rid of rtsol(8). Back then I suggested to change /etc/netstart
and the installer to deprecate the rtsol keyword as well but I got
some objections to that. Maybe we should revisit that.

Note however that rtsol in hostname.if is a keyword, it does not refer
to the (old) /sbin/rtsol binary and never did; exactly the same as the
dhcp keyword - there isn't even a dhcp binary.

So when /etc/netstart encounters the rtsol keyword it executes
ifconfig $if inet6 autoconf.
The same for dhcp, it executes dhclient $if.
inet6 autoconf in hostname.if works, too, because it's passed to
ifconfig by /etc/netstart.

I notice an inconsistency however. I recently changed some kernel bits
so that SLAAC works with net.inet6.ip6.forwarding enabled. This is
needed for RFC 7084 and intended for cpe devices.

While inet6 autoconf works perfectly fine with
net.inet6.ip6.forwarding enabled /etc/netstart will complain if it
encounters the rtsol keyword with forwarding enabled.




Index: hostname.if.5
===
RCS file: /cvs/src/share/man/man5/hostname.if.5,v
retrieving revision 1.62
diff -u -p -r1.62 hostname.if.5
--- hostname.if.5   12 Jul 2014 16:59:06 -  1.62
+++ hostname.if.5   5 Jun 2015 13:30:46 -
@@ -248,26 +248,24 @@ Valid options for a particular interface
  .Pp
  IPv6 stateless address autoconfiguration:
  .Bd -ragged -offset indent
-.Li rtsol
+.Li inet6 autoconf
  .Va options
  .Ed
  .Pp
  The above format has the following field values:
  .Bl -tag -width indent -offset indent
-.It Li rtsol
+.It Li autoconf
  The literal string
-.Dq rtsol
+.Dq autoconf
  if the interface is to be configured using
  IPv6 stateless address autoconfiguration.
  This should be used on single interface hosts only,
  since the IPv6 specifications are silent about the
  behavior on multi-interface hosts.
  Also note that the kernel must be configured as a host (i.e. non-router).
-Add the following line into
-.Xr sysctl.conf 5 :
-.Bd -literal -offset indent
-net.inet6.ip6.forwarding=0
-.Ed
+This is the default. This value deprecates the
+.Dq rtsol
+field value.
  .It Va options
  Miscellaneous options to set on the interface, e.g.,
  .Dq media 100baseTX mediaopt full-duplex .




Flex / Regexps (Re: awk regex bug)

2015-06-08 Thread hruodr
Otto Moerbeek  wrote:

> Refering to subpatterns is not available in flex.  I suppose it is not
> available since it would require a more complex re engine.
> Interpretation of the lexical value should be "hand-crafted". 

I also though caomplexity can be the reason, but I have doubts. Why should
be difficult to track the indices in yytext of the beginning and the end 
of each matching subexpression, in two arrays of integers (one for
the beginning and one for the end)? Neither memory nor time seems to
be a problem. And "hand crafting" means not only avoidable programming
work and unreadability, but a second pass that adds complexity.

A nice source on regexps is here:  https://swtch.com/~rsc/regexp/

In the first article listed there you read:

>>
While writing the text editor sam [6] in the early 1980s, Rob Pike wrote a 
new regular expression implementation, which Dave Presotto extracted into 
a library that appeared in the Eighth Edition. Pike's implementation 
incorporated submatch tracking [sic!] into an efficient NFA simulation but, 
like the rest of the Eighth Edition source, was not widely distributed. 
Pike himself did not realize that his technique was anything new. Henry 
Spencer reimplemented the Eighth Edition library interface from scratch, 
but using backtracking, and released his implementation into the public 
domain. It became very widely used, eventually serving as the basis for 
the slow regular expression implementations mentioned earlier: Perl, PCRE, 
Python, and so on. (In his defense, Spencer knew the routines could be 
slow, and he didn't know that a more efficient algorithm existed. He 
even warned in the documentation, "Many users have found the speed 
perfectly adequate, although replacing the insides of egrep with this 
code would be a mistake.") Pike's regular expression implementation, 
extended to support Unicode, was made freely available with sam in late 
1992, but the particularly efficient regular expression search algorithm 
went unnoticed. The code is now available in many forms: as part of sam, 
as Plan 9's regular expression library, or packaged separately for Unix. 
Ville Laurikari independently discovered Pike's algorithm in 1999, 
developing a theoretical foundation as well [2]. 
<<

Note that OpenBSD's regex library seems to use the slow Spencer 
implementation.

Rodrigo.



Re: jail_bin_add: script to add binary and libs to chroot

2015-06-08 Thread dan mclaughlin
On Mon, 8 Jun 2015 10:28:53 -0400 Jiri B  wrote:
> On Mon, Jun 08, 2015 at 01:46:17AM -0400, dan mclaughlin wrote:
> > i figure this should be useful to some.
> 
> ... it seems somebody doesn't know jailkit which is
> in ports :)

i try to use base whenever possible. there might still be flaws, but less of
them.

> 
> no idea why did you send it to tech@...
> 
> j.

i thought of sending to misc@, but i wanted to maybe get some opinions of
coders who might see mistakes. though continuing this on misc@ is best now.



BSDCon Brazil 2015 - 2nd Call for Papers

2015-06-08 Thread BSDCon Brasil 2015
INTRODUCTION

  BSDCon Brazil (http://www.bsdcon.com.br) is the Brazilian BSD powered
and flavored conference held in Brazil.

  The first edition was in 2003
(https://www.freebsd.org/events/events2003.html) and it brought together
a great mix of *BSD developers and users for a nice blend of both
developer-centric and user-centric presentations, and activities. The
2015 edition will be even more fun!

  This year BSDCon Brazil will be held from 9-10th October 2015, in
Fortaleza (CE). The very first edition with people coming to Brazil from
all around the globe!

OFFICIAL CALL

  We've got extra room for the conference! Now we are proudly requesting
proposals for even more presentations.

  We do not require academic or formal papers. If you wish to submit a
formal paper, you are welcome to, but it is not required.

  Presentations are expected to be 45~60 minutes and are to be delivered
in Portuguese (preferred), Spanish or English.

  The proposals presentation should be written with a very strong
technical content bias. Proposals of a business development or marketing
nature are not appropriate for this venue and will be rejected!

  Topics of interest to the conference include, but are not limited to:

[*] Automation & Embedded Systems
[*] Best Current Practices
[*] Continuous Integration
[*] Database Management Systems
[*] Device Drivers
[*] Documentation & Translation
[*] Filesystems
[*] Firewall & Routing
[*] Getting Started to *BSD Systems
[*] High Availability
[*] Internet of Things (IoT)
[*] IPv6
[*] Kernel Internals
[*] Logging & Monitoring
[*] Network Applications
[*] Orchestration
[*] Performance
[*] Privacy & Security
[*] Third-Party Applications Management
[*] Virtualization
[*] VoIP
[*] Wireless Transmissions

  We are waiting to read what you got! Please send all proposals to:

submissi...@bsdcon.com.br

  The proposals should contain a short and concise text description. The
submission should also include a short CV of the speaker and an estimate
of the expected travel expenses.

- Do not forget to tell us your host city;
- If your quotes are in another currency than Brazilian Reais,
 please inform the day you got the prices for proper conversion.
- We've got speakers who will pay for their own flight;
 if you would like to do the same, your name/company
 will be listed as sponsor.

SCHEDULE

  Proposals Acceptance
May 8th 2015 - BEGINS
June 10th 2015 --- END OF PHASE 1
June 30th 2015 --- END OF PHASE 2

  Contact to Accepted Proposals Authors
July 10th 2015 --- CONTACT WITH PHASE 1's AUTHORS
July 20th 2015 --- CONTACT WITH PHASE 2's AUTHORS

NOTES

  * If your talk is accepted, you are expected to present your talk in
person;
  * Speakers do not register or pay conference fees;
  * We can pay for speakers flight and accommodation;
  * You pay for your own food and drink;
  * There will be a digital projector available in each lecture room.


-- 
BSDCon Brasil 2015
http://www.bsdcon.com.br
http://twitter.com/bsdcon_br



Re: awk regex bug

2015-06-08 Thread Otto Moerbeek
On Mon, Jun 08, 2015 at 02:49:44PM +, hru...@gmail.com wrote:

> Otto Moerbeek  wrote:
> 
> > Tradiotionally, { } pattersn are not part of awk re's.
> >
> > Posix added them, but we do not include them afaik. Gnu awk only accepts
> > them if given an extra arg (--posix or --re-interval).
> >
> > I think this should be documented.
> 
> Although there is a clear theory about "regular expressions", I have the
> impression that there is no standard syntax. One needs to read again and
> again the documentation of programs that use them.
> 
> I am just missing a way to reference in a (f)lex action a previously
> matched subexpression (like with \m in a substitution with ed).
> 
> Why is this? Because lex is so old? And what does people do in these
> cases?
> 
> Rodrigo

Refering to subpatterns is not available in flex.  I suppose it is not
available since it would require a more complex re engine.
Interpretation of the lexical value should be "hand-crafted". 

-Otto



Re: awk regex bug

2015-06-08 Thread hruodr
Otto Moerbeek  wrote:

> Tradiotionally, { } pattersn are not part of awk re's.
>
> Posix added them, but we do not include them afaik. Gnu awk only accepts
> them if given an extra arg (--posix or --re-interval).
>
> I think this should be documented.

Although there is a clear theory about "regular expressions", I have the
impression that there is no standard syntax. One needs to read again and
again the documentation of programs that use them.

I am just missing a way to reference in a (f)lex action a previously
matched subexpression (like with \m in a substitution with ed).

Why is this? Because lex is so old? And what does people do in these
cases?

Rodrigo



Re: jail_bin_add: script to add binary and libs to chroot

2015-06-08 Thread Jiri B
On Mon, Jun 08, 2015 at 01:46:17AM -0400, dan mclaughlin wrote:
> i figure this should be useful to some.

... it seems somebody doesn't know jailkit which is
in ports :)

no idea why did you send it to tech@...

j.



Re: AnonCVS and -rHEAD

2015-06-08 Thread trondd
On Sun, June 7, 2015 10:58 pm, bytevolc...@safe-mail.net wrote:
> I am in some agreement with this; it would certainly make it easier not
> having to change the "-rOPENBSD_x_x" option in the .cvsrc every time
> you upgrade.
>

You shouldn't have to put the tag into your cvsrc.  Tags are sticky,
meaning once you checkout a particular tag, all the following cvs commands
in that directory will be on that tag.  It changes when you explicitly set
a new tag, or clear it.

Doing a checkout -rNEWVERSION is a one time step as part of your upgrade
process.

Tim.