Re: [Bulk] Re: openbsdstore: enable javascript and buy something or gtfo

2014-10-06 Thread Matti Karnaattu
Except it doesn't, server side code is more universal.

I strongly disagree.

In server side there is vast amount of different software stacks build
top of C library and they are incompatible. Running PHP code top of
Java stack just doesn't work.

In client side, there has ongoing for several years a huge shift where
~all client code runs top of HTML/JS. And this is very remarkable
because client side code doesn't any longer care what is below that
HTML/JS environment. The umbilical cord for C language stack or OS is
cut off, and practically all major players in IT-industry are committed
for that.

Imagine that if late ninetees, whole IT industry has decided to cut off
all legacy and start to compile only Java byte code to Java API. All
applications work every computer without recompiling, and Java runtime
removes hardware and OS dependency, isolating all applications to
sandboxes that restrict memory, disk space, filesystem access etc.

That would have been great, but Sun Microsystem withdraw from
standardization process, Microsoft implementation was totally
incompatible, and while Java was proprietary it was not accepted by open
source communities any more than Sun Microsystem competitors.

But now, it is a totally new game. Javascript is standard, there is open
source implementations and they are compatible. World is changed that
HTML/JS is global standard for application frontends.

And then there is local 'standards', ecosystems, if there is need to
make exclusive application for Apple or something. These competing local
standards keep development running.

Any idea how many noscript users there are amongst other filters and
browsers like xombrero.

Maybe one in thousand. These were more popular back then when
computers were slow and browsers immature, something like 7 years ago.

Past two years, almost no one used these because applications doesn't
work without JS.

Simple HTML5 features and CSS3 are welcome by me but even JIT for
performance annoys me. I'd rather they fixed the bugs and memory leaks
and let me use websites in style and confidence.

You can't create applications without JS. Example, think about how
mapping software are done with realtime pathfinding.

If you had looked into browser vulnerabilities you would see that the
*vast* majority even ones which do not mention that javascript is the
issue can be avoided by disabling javascript or the issue is javascript
related.

Disabling Javascript is like disabling ability to run modern application
software. It is same if I just turn off computer. It is then secured.

If I want to run an even more complex app then I would much prefer to
to do just that and run the web based dedicated application separately
which any decent application needs anyway (application or plugin) and
making it pointless bloat.

So it is better to download unknown application binary from when you
like to see map? And think about effort to make that application to
Android API, Cocoa, GTK+ 2, Qt and WinRT.

Or, just make application to HTML/JS and that run everywhere in
sandbox without hassle. Portability matters.



Re: Securing communications with OpenBSD

2014-10-06 Thread Matti Karnaattu
Yes, my goal is to secure the
infrastructure as much as possible.

I don't know details but it sounds overly complex. And complexity
may cause other issues, without any benefit for security.

Example, you don't have to encrypt your whole hard disk if the hard
disk is located in guarded bunker. But if you do that, it will increase
security in theory but that may cause service outtage if you have to
always locally type your crypt password if machine crashes.

I would put this effort to ease maintainability, ease monitoring,
use stateful firewall, deploy honeypot etc. and avoid complexity.



Re: [Bulk] Re: openbsdstore: enable javascript and buy something or gtfo

2014-10-06 Thread Matti Karnaattu
however it *is* realistic and reasonable to *limit*
the cross-site JS code that is only there for the use of other third
parties.

I agree. I filter too crap away. Javascript itself is not problem.



Re: [Bulk] Re: openbsdstore: enable javascript and buy something or gtfo

2014-10-06 Thread Matti Karnaattu
 But none of them require javascript to function.

Node.js

What is not a good thing is to have just one standard. That's never
good.

And this is current status. Apple, Canonical, Google and Microsoft
pushing their own competing front end ecosystems. And there is still
HTML/JS which is portable.

I see current situation very ideal.

A great deal in which javascript is used is to make cosmetic things pop
in your browser that you really doesn't need for getting what you need:
information.

Not all applications are for that. Let's say, numerical analysis software,
video conferencing, electrical planning software..  or how about IDE with
realtime code analysis?

It is very useful to see bugs while I write code without need to
compile. It is even useful in Word Processing to have real time spell
checking.

These are not just cosmetic things.

The problem with javascript, that we are pointing and you're not listening,
is that you don't control what is run.

Of course I control. It very possible to white list / black list
domains. It possible to limit all scripts to be launched from same
trusted domain
where I launch application. It is possible to install whole application
to own server if I want. It is possible to put whole application instance to
sandbox and require permission to camera, or limit memory usage. All
data client sends is possible to control and monitor.

In security point of view, who manages server can't control what happens
in client side. Client is always untrusted and input need to check. Client
however can't control what happens in server. Client have to trust
server where data is send. Everything else can be controlled.

even then, you would probably be using an app.

And JS is for making app.



Re: openbsdstore: enable javascript and buy something or gtfo

2014-10-06 Thread Matti Karnaattu
You mean, there is _legislation_ on how to write software?

Some industries, yes. But this is not related to JS.

Practically whole IT-industry supports JS. If you like to do portable
application programming, you have to write JS or compile your
code to JS if you want to get that working everywhere.

You mean, unlike C?

Write graphical application, Hello World is enough, that should
work on all desktops, workstations, tablet, pocket/phone and
game console. It must work all supported versions and all HW
architectures. End users must not need to compile code. Just run
ready software.

Now, do you see why C isn't portable by today standards?

Your browser is written in what language exactly?

Application programmer doesn't need to know anything below browser.
It is very strong interface. Something like libc. When someone writes
some command line tool, there is no need to know what is below libc.

Running PHP code top of Java stack?
What on earth are you talking about?

Portable application source is JS or compiled to JS (from Coffeescript,
Typescript etc.). There is libraries and frameworks but they all run top
of browser where everything is JS.

In server side, below is libc and top of that there is Ruby, Java, C#,
Python, PHP, C, C++, node.js etc. software stacks. And there is often
code mixed from other software stacks and all those stacks of course
are running.

Browsers are getting slower all the time.

Bullshit. Try this: http://peacekeeper.futuremark.com

Newer browsers run software faster. Ancient browsers may even fail
tests.

Wah have had it for decades.

There were JS applications made ten years ago, yes.

It matured 2009 or something to be very usable. Before it was slow, buggy,
some browsers were limited and it required much effort to make the crap
working. In past year, JS technology is matured to that level there
isn't much limitations any more.

You really _are_ trolling, right?

I'm not. You just can't practically make portable application without JS
or language that is compiled to JS. I think that is the biggest industry
changing trend what is caused by iPhone. Before that, there was libc and
some nice library like GTK+ or some other, you can write software that can
compile and run about everywhere. Then Steve pulled iPhone from
jeans pocket, iPhone was very closed ecosystem, useful and popular and
changed application programming.

You are very ignorant if you didn't notice that. Did you notice that
Google, Microsoft and Canonical began to do the same?

It also matters when over 99% of frontends are from these companies +
game consoles too, which have always been restricted. It is impossible
to application programmer to ignore that. Especially when everyone seems
to be dropping out, deprecating or put second-class citizen status those
technologies that makes possible to write easily portable software
without JS. Example:

-Apple has removed X from Mac OS
-Both Red Hat and Canonical seems to be abanoning X
-Microsoft is starting to upgrade OS once a year or something and
advertise unified OS. In Windows 8,
all but WinRT and HTML5 apps works terribly.
-Microsoft restricted new WinRT API to Microsoft store
-Apple has deprecated Carbon
-Those application stores are under control

Simply, application programmer is pushed to JS stack if you want to make
application portable, so that it also has a continuity. You never know
when Win32, or some other backbone is dropped or it is available only in
some embedded edition. It is also realized by Qt, because  QML can run
top of runtime, in environment where you just can't compile C++ for some
reason.

Of course it doesn't matter if application doesn't have to be portable.
Just write C# for WinRT or C for OpenBSD + GTK+3 and be happy.



Re: [Bulk] Re: openbsdstore: enable javascript and buy something or gtfo

2014-10-06 Thread Matti Karnaattu
If any of these end up being better than JS,
I don't see any reason not to use them.

I think everyone of these are better if you don't care about portability.

I prefer to use a desktop application for those instead
of running them from my browser. Just saying.

There isn't much new desktop applications done lately, except for web..

I have my data in my servers, but I would like if I can manipulate everything
directly with web interface in my network. That would be clean architecture.

you always should check your inputs,
even software that run only on the server side.

Sure. I even employ DbC in my functions too..



Re: [Bulk] Re: openbsdstore: enable javascript and buy something or gtfo

2014-10-06 Thread Matti Karnaattu
but at the same time using the conversation to hurt people trying to
build something simpler.

It is not meant to hurt anyone.

Optimal complexity is when there is nothing you like to add and nothing
you like to remove.

It is just that sometimes happens event called disruptive innovation.

When it happens, it is good to sit down and think, why that happened and
why I was so stupid to not to realize that myself, because there are
some good reasons always what make that event possible. It is also
stupid to ignore that event ever happened.

I didn't understand myself right away that iPhone was such a event (and
I'm not Apple fanboy at all).

This conversation brings me a lot of ideas what should be done when
building something simple.. Like removing that stupid web browser
idiom that where is addressbar and back/forward buttons.

How about changeing web browser to app launcher.

Someting like launch https://application.com; and that app launcher is
designer to be app container. Application is started for local or remote
computer, enforces security restricting access to local resources and
remote servers and even know window coordinates so every application
is launched on correct position on screen. And Javascript console.log
can put stuff to stdout, errors to stderr...

That can be also then use to make more complex user interfaces,
integrating several applications to one view. Hell yeah, more I think,
I just don't even want to use anything else than those, terminal
windows and X for legacy apps.

It can also change world better if defaults are secure and
that app launcher is adopted.



Re: openbsdstore: enable javascript and buy something or gtfo

2014-10-06 Thread Matti Karnaattu
next I convince you that JS is good.

I said that it crappy, but it happens that crap gets adopted standard.

It just happens, it has happened before and when the shit works and
solve compatibility issues by having adopted standard, it is useful.

What can I do for that?!

It is problem in IT-industry that every player want to smuggle patent
into standards or want to make own tech to adopted and demand
royalties. Then everyone make own incompatible version on same
thing and others make new abstraction layer of shit to make things
again compatible.

The reason why I think JS is great is that all players in IT-industry
are commited to support it. ~everyone tried to put own proprietary
tech to same use and failed. Now everyone are given up, and
support that JS and now it WORKS. It is good to everyone support
that portable technology because now their own native ecosystems
looks better and they can make users to depend on them.

And oneone can't stop supporting JS either because then software
stops working.. - we got established standard.

I also think that this is again new abstraction layer of shit but it
is kind of inevitable while IT industry failed to make standard
hardware architecture and top of HW, there is C code that is
depending on build technology from 70's.

 While there, convince everyone Theo is the reason JS is everywhere.

I didn't mess you to this discussion and I haven't bashed
you everywhere, never.

I actually respect your work, but you behave
like I've got you on your toes.

How I can have you to be more relaxed? With beer?



Re: [Bulk] Re: openbsdstore: enable javascript and buy something or gtfo

2014-10-06 Thread Matti Karnaattu
You are on the wrong list.

Ok. I will unscribe myself for.. eternity. Because
I obviously have hurt feelings. Especially yours, Theo.

I did not intentionally do that. And I have _never_ bashed
you. And I actually never got what makes you so upset.
I'm enthusiast to tech without religion. Agnostic doesnt
care that much about. something, what is apparently
extremely important to you.

Kindest thing you have ever said to me is that I'm
government plant. Well, I'm not and I don't work Google
either. But I think that is kind because I believe that it
should be hard to make you to believe that.

It is better to me to disappear because it probably more
beneficial to me put my free time effort when I'm between
jobs to somewhere else than finding bugs from OpenBSD.

Theo, bruteforce stress testing for OpenBSD went better
than I expected. Surprisingly little amount of fails.

Sometimes when I debate, it gets out of hands.
I should have quit this thread when I said that.

My apologies. For everyone.



Re: openbsdstore: enable javascript and buy something or gtfo

2014-10-05 Thread Matti Karnaattu
1. OpenBSD is a great example of the difference that having security as
a primary design and development objective makes, unlike most other
OSes (including all flavors of linux) which do added security.

Yes, primary objective. Definitely.

It is also form of added security, because it is based on constantly
iterating and auditing old source and design. It isn't made cleanroom
software development process from ground up.

Of course, me and probably everyone else here appreciate the real
security which is achieved by correcting the bugs.

A quick look at [0] demonstrates your utter ignorance of EAL

I know EAL. My point was that ancient unsecure stuff can be secured by
auditing, re-engineering and using mitigation. OpenBSD is prime example.

These methods also apply running Javascript.

It's probably high time to let this utterly degenerated thread die..

I agree. It has done its purpose when Matthew pointed that sandboxing
is not implemented in Chromium or Firefox.



Re: openbsdstore: enable javascript and buy something or gtfo

2014-10-04 Thread Matti Karnaattu
Many a naïve person believe you can add security as an afterthought
but I'm not aware of this approach ever truly succeeding.

I think that OpenBSD has done decent job. Decades ago that old unix
code, originally did not quite exactly been EAL7.



Re: openbsdstore: enable javascript and buy something or gtfo

2014-10-03 Thread Matti Karnaattu
Why should I enable javascript to obtain basic information about a
website?

Why do not keep Javascript all time enabled?

Keeping Javascript disabled is like disabling programmability from
shell. What is the idea?



Re: openbsdstore: enable javascript and buy something or gtfo

2014-10-03 Thread Matti Karnaattu
I can't know what interest openbsdeurope has in requiring users to
enable JS to obtain any information from their website.

Probably 999 users in thousand doesn't want to make web crippled and
doesn't even think that standard JS is any special requirement.

 *I* choose what programs my shell executes.  But when I visit a
 webpage on the internet with javascript enabled, someone *else*
 chooses what programs are executed.

No, you choosed that web page to visit.

I think that you don't probably understand that web is nowadays
by default, software platform. Web pages are applications.

You can make your life easier by enabling Javascript.

Soon it is probably nearly impossible to do anything useful with web
without Javascript. It is defacto and dejure standard language for
portable applications.



Re: openbsdstore: enable javascript and buy something or gtfo

2014-10-03 Thread Matti Karnaattu
If the javascript contains an XMLHTTPRequest object, it can call out
to a different server (than the one you are visiting) without your
explicit knowledge, download content, and do basically whatever the
user the browser is running as can do,

I'm aware. This object is in practice transformed browser to application
platform.

barring browser sandboxing,

If it is leaking, yes.

etc...and that's not the only way javascript can be used maliciously

These are called security holes.

There is good reason not to explicitly trust javascript or any other
browser plugin that allow the remote site to execute code on your
machine.

Unfortunately, we are living world where almost all applications are
nowadays writen with Javascript or compiled to Javascript. And it is
matter of time when rest of the issues are solved which prevents it
using ~everywhere to reduce server load.

For that reason, it is not beneficial to avoid Javascript. Instead it
useful to think how it can be run securely.

Javascript is todays C.



Re: openbsdstore: enable javascript and buy something or gtfo

2014-10-03 Thread Matti Karnaattu
 So you are saying that soon everything will be force fed to you and
 you will be ok with it?

There are two things which irritates me in computing:

1. Need of security updates
2. Two pieces of technology which are not compatible with each other.

I'm GLAD that finally we have Javascript. At last, we have language and
platform that WORKS universally. No more dozen proprietary
(or open source), incompatible platforms. Once we have C-language that
can be compiled almost anywhere, with minor modifications as long as it
was command line software.

Now we have Javascript that runs in browser, almost everywhere, without
modifications and do almost everything.

It is simply wonderful. Best thing after invetion of WWW.

 Just because something is the standard, doesn't make it good.

Heh, very true! What you expect?! It is typical that inferior solutions
wins. See: http://en.wikipedia.org/wiki/Worse_is_better

C and Unix is same thing. Or how about C++? There was Ada back then too.

Sadly, world is not ideal. Have to accept some crap too to get better.

Yes, I think Javascript is horrible language but after industry mutually
accepted it, it become very useful.



Re: [Bulk] Re: openbsdstore: enable javascript and buy something or gtfo

2014-10-03 Thread Matti Karnaattu
and navigation of a site should not require javascript as
per w3c guidelines.

The thing is that web is more than web sites. It is also full of
applications and these are totally mixed.

However considering OpenBSD users are security savvy and should
understand the potential risks of random sites running javascript

I'm sure that probably everyone here understand these risks, but
in order to be security savvy doesn't rule out that you can also be
pragmatic.

I don't think that is pragmatic to expect people to use computers
without applications. Or expect users of some software doesn't want to
use applications.



Re: Android Studio

2014-09-27 Thread Matti Karnaattu
Thumbs up!

 ...but I will never trust it or use it for security critical purposes.

Me neither. Google itself is a security hole. Stasi would love it :)

My point was that application model, everything running on sandbox,
most of the applications running on bytecode machine with bounds
checking..

I don't mind at all to get that running top of OpenBSD!



Re: Android Studio

2014-09-26 Thread Matti Karnaattu
Why would someone want to bring the SDK for that junk on OpenBSD platform?

Why not? What do you lose if someone bring that?

I don't think that there is not many operating systems, especially
open source licenses, putting effort to proactive security. Android is
one of the few.

In fact, Android API may be good match to provide secure application
platform to OpenBSD.



Re: Android Studio

2014-09-26 Thread Matti Karnaattu
I'll have to disappoint you but I don't have any side.
I'm pretty much agnostic and interested all kind of technology.

But if we talk on methods to make platform secure, don't you agree that
folks on Google have put effort to make Android hard to exploit?

Criminals, at least go on where the fence is lowest, that is, in the
form of trojans. As far I know, exploiting security holes significantly
less common. I didn't comment how buggy that is.

Btw, I managed to get neat test case generator to running on OpenBSD and
I'm now bruteforcing some of the interfaces.

Let's see if I can find new bugs..



Safe C

2014-09-25 Thread Matti Karnaattu
I ask here because I don't want to pollute tech@,

you told about those dangerous idioms, is that all knowledge collected
anywhere? Even I know a lot of secure coding practices, I that would be
interesting to read.

And question comes to my mind.. Is there attempts to use this knowledge
in tooling?

Something like using secure version of language, like some C-dialect
that compiled source-to-source to standard, portable C or some skripts
that automatically audit code?



Re: videos in the browser

2014-09-19 Thread Matti Karnaattu
Hi,

I don't think that any web developer care OpenBSD because OpenBSD
doesn't have graphical browser in base system. They don't care even if
1000 OpenBSD users complain.

Flash material will disappear from web less than three years and Flash
videos will get replaced by Mpeg-4 AVC and WebM.

I personally think that OpenBSD should embrace HTML5/ECMA Script by
adding Web component + minimalistic browser around it to the base
system in some point of future. Major reason for this is that web has
become both defacto and dejure technology for graphical remote use and
also it is standard way to create GUI. X clients are legacy today.
This is even possible to do, because needed software components are
almost completely available in BSD licenses.

After all, I think top secure system should also allow running
applications in secured manner, but it may cause challenges to avoid
security holes.



signal.h interfaces

2014-09-17 Thread Matti Karnaattu
Hello,

man page says:

signal - simplified software signal facilities

And the interfaces differs a lot from this:

http://pubs.opengroup.org/onlinepubs/009695399/basedefs/signal.h.html

No sigset, sigignore etc.

Is this intentional?



Re: signal.h interfaces

2014-09-17 Thread Matti Karnaattu
Thanks, my fault.

Those pages looks so similar :)

2014-09-17 13:58 GMT+03:00 Otto Moerbeek o...@drijf.net:

 On Wed, Sep 17, 2014 at 01:52:37PM +0300, Matti Karnaattu wrote:

  Hello,
 
  man page says:
 
  signal - simplified software signal facilities
 
  And the interfaces differs a lot from this:
 
  http://pubs.opengroup.org/onlinepubs/009695399/basedefs/signal.h.html
 
  No sigset, sigignore etc.
 
  Is this intentional?

 If you look up the full definitions, e.g. sigset:

 http://pubs.opengroup.org/onlinepubs/9699919799/

 you'll see thes eare marked OB_XSI, Obsolescent.

 -Otto



Re: [Bulk] Re: Real time programming in OpenBSD

2014-09-12 Thread Matti Karnaattu
Most definitely not.

Thanks for clarification. Then it is something like MIT approach except
strict license policy.

This also means that there is probably desire to dump GCC favor of LLVM?
Drawbacks are using C++ code and reduced portability to legacy
platforms.

I personally don't find GCC to be an issue. I love it. And I think it is
one of the best software ever made, and I think it increase code quality
when code is ported more platforms, and code quality is what drove me
here.

Btw, I have been auditing code and I possible found some smelling code.
If I can confirm bug, I put diff soon to tech@.



Re: [Bulk] Re: Real time programming in OpenBSD

2014-09-11 Thread Matti Karnaattu
I find it far more useful and easier to work with and control than
modern desktops and wish modern programs went back to older config
standards and used text rather than *conf rubbish and that freedesktop
followed the older principles more closely when doing desktop
unification features etc..

I don't find fvwm to be problem either.

However, while all new things are not necessarily better, it is usually
best to follow defined practices in order to be unified with others.

This is kind of idea of standards.

What I meant was to clarify OpenBSD culture, priorities and coding
practices and like to know whichever was the lesser of two evils:

-simplicity vs. licensing purity
-licensing purity vs. completeness
-pragmatic licensing and completeness vs. licensing purity
-correctness vs. simplicity
-licensing purity vs. simplicity

And if I understand correctly, priorities goes like this:

simplicity  licensing purity  correctness  completeness



Re: Real time programming in OpenBSD

2014-09-10 Thread Matti Karnaattu
hobby and safety critical don't often go together. if you just
want to improve your skills i say go for it but aiming for safety
critical is a high bar to achieve.

I like to keep bar high.

But if you're really looking to do safety critical, which industry are
you going to target?

Medical and automotive. Medical mostly but automotive industry
software needs are growing rapidly. Standards you mention are familiar
to me.

OpenBSD is kind of very useful research project so it is best to deploy
QA practices that applies many industries. Goal to me is to make
platform/components ready so that they could be used as a basis.

Of course if anyone want's to use OpenBSD code in safety critical
applications, it needs to be certified and still need work but.. I think
it would be awesome if I can raise bar of open source components to that
level.

Patches addressing bugs
found through static analysis are always welcome.

Is there any centralized static analysis in OpenBSD QA process? Right
way is to put effort there.

These are listed on the interwebs:
http://www.openbsd.org/goals.html

I also find these:

http://www.openbsd.org/faq/faq1.html#HowAbout
http://www.openbsd.org/policy.html


Honestly, goals.html describe current state of project. It doesn't
describe long term goals/roadmap what developers are interested
to do. I understand that every one has personal aims but I'm looking
something like list of: we must get rid of or rewrite this peace of
crap in next/following cycle.


FAQ says also something about installation boot media and it is not
clear to me what are OpenBSB project specifications. I'm looking all
defined requirements for OpenBSD code and features.

I assume that contributions are accepted, not only some bug patches but
it make things easier (for new developers and users) if the mindset is
defined. It should also define priority what is more important.

Examples:

-Is license purity more important than following standards?
-What are standards to follow (even partially) and what are not?
-Preferred targets. Embedded hardware and security applications,
but what else?
-Hey, I like to create GUI application, what is the preferred API?

I think that programming should be mandatory in elementary school
because it force to describe what you wan't without ambiguity. For this
reason, I know this is easy task developers to do.

However, I can't do that task because I don't know the OpenBSD developers
mindset and I don't know yet is this the right community. I'm
interested to put effort in controlled manner and help to remove ambiquity.

I'm still probing this community.



Re: Real time programming in OpenBSD

2014-09-10 Thread Matti Karnaattu
You can use this diff if you want, it adds support for nice(1) to do
the binding, I use it to do MP tests.

Thanks! This helps a lot.



Re: Real time programming in OpenBSD

2014-09-10 Thread Matti Karnaattu
Note that that diff does the converse of what you requested, pegging a
thread to a CPU instead of banning the CPU from running other
processes' threads.

True, but this is good starting point.

On your bigger question: I don't know of any one working on making
OpenBSD a realtime OS in the sense of providing latency guarantees.
This would require massive changes to all levels of the kernel, from
interrupt handling/routing/blocking to the buffer cache and UVM
subsystems to filesystems.

Real time is a plus, but I understand that this may be massive task to
accomplish and when looking for safety perspective, isolation
and correctness are more important. Real time requirements come when
correct working has requirements to latency.

If isolation can be done and process running isolated on own core, it is
good point to start to study how to make it work on real time. It is
also ok that real time works partially and fails on certain I/O. As some
functions are thread safe, it is work to making some functions
latency safe or verified correct.

Now there is OpenBSD core witch is very clean and secure, and ports
where rest of packages are dumped. This kind of work requires more
granularity as QA perspective.



Re: Real time programming in OpenBSD

2014-09-10 Thread Matti Karnaattu
Thanks for the comprehensive answer. I was already looking for coding
conventions. That preferred style is actually fair, and it is important
that everyone is in line and respect that. I also agree that goto is
fair way to model exceptions in C language.

Couple of questions before I start hacking:

1. Is there any preferred way to post diffs?

2. Is there any preferred framework to write tests?

3. If I wrote a bit more code and there is need to separate it, is there
any ready guidelines/templates for software modules, folder
structure etc?

4. What kind of test suites are used to ensure that changes don't break
thigs or causes bugs? I mean others that are found in sources.

5. What is the licence policy in toolchain? I mean, it is clear to me
that platform itself conforms much as possible
http://www.openbsd.org/policy.html but how about development tools which
are used only to produce ISC code? Is the policy relaxed to allow then
more restricted open source code? Let's say, GPL code in some
verification tool or testsuite?

That question is unrelated to OpenBSD.  The OpenBSD base system
does not contain any GUI API.  Well, Xenocara does contain the
bare X11R6 API, but we certainly don't recommend using that for
application programming.

But i'm not aware of anybody developing a GUI
application *as an OpenBSD subproject*.

Right. And I don't expect that anybody do that because there is no API
for that in base system.

To fully understand mindset correctly related to standards, licenses and
contributions I use GUI API as an example:

As we know, UNIX 98 workstation defines Motif and CDE. Nowadays possible
to use because these are open sourced. Well, enough standard to me but
no one want's to write that legacy, and that is LGPL. Not as nice ISC.
However, OpenBSD default FVWM look is like Motif.

Practically GTK+ 2 replaced it as a C-language, standard GUI API.
Everyone used that because it was open source. Enough standard to me as
it is defined in LSB. That was too LGPL. Coming GTK+ 4 replaces it to
next fifteen years but when it is ready, probably no one else uses that
then except Red Hat.

Nowadays, GUI programming is usually not done using C. It is correct to
say that ECMAScript is standard language for portable applications,
using browser technology and native applications are written usually
platform dependent APIs. And what is nice, Webkit is mostly BSD
code. But it is also C++, which is ugly while rest of the base is
C code.

Assume that rich man appears, $70 cash in briefcase and say: I love
your work and I will donate this pile of money to OpenBSD foundation, if
you provide GUI API that is most appropriate, secure and practical for
OpenBSD base.

If offer is accepted, what is the preferred way to do the task?

---
In terms of licensing, I don't think LGPL is as pure as ISC, but I can
accept that to commercial product if BSD-style license won't cut. It may
be even preferred to application programmer.

-Matti



Real time programming in OpenBSD

2014-09-09 Thread Matti Karnaattu
Hello,

Is it possible to dedicate CPU core to process?

What I'm looking for is simple way to take advantage of high quality and
secure code base of OpenBSD to use in real time/embedded applications.
If this trick can be achived, it is simple to use OpenBSD as platform
when critical parts of software can run on own CPU core and rest of the
software can developed conventional means.

If this can be done, or this kind of feature may be noted and put to
roadmap, I may have motivations to audit time requirements of library
functions etc. and formally verify parts of the system.



Re: Real time programming in OpenBSD

2014-09-09 Thread Matti Karnaattu
Also if you were to provide more specifics about your goals, others may
have more input.

At the moment I'm looking hobby project to maintain/improve my skills
developing open source software and my goal is to develop/improve some
open source component(s) to be suitable on safety critical use.

What I need is some place to start, and starting point is to find
developer community whose interest is quality code, sharing some same
values and suitable platform.

On the other for hard/soft hard real-time I might look elsewhere

I'm looking possibility to isolate process on own CPU core because when
looking from safety perspective, it is bad thing if some other process
can jam CPU. Memory and hard drive isolation are easy tasks but if OS
have possibility to isolate CPU too, that opens new possibilities.

If this can be done, it is not long way to improve real time
capabilities.

Not sure yet am I looking from right place. I just LOVE to browse
OpenBSD source tree. It is clean in many ways, simple and I have found
it to be realiable. However, it is unclear what are interests of OpenBSD
developers and where project is heading.

I consider that going deep kernel internals is out of scope for my
interests so some developer hacking kernel every week should have
interests to enable OpenBSD suitable for safety programming. Otherwise I
have to look elsewhere.

Can you give more details about what tools/techniques you have in mind?
Formal specifications defined with modified condition/decision coverage,
model checking, automated theorem proving etc. To get that point, I have
to use heavy static analysis to clean code to the point that it can be
tested
thoroughly.

OpenBSD is aiming security and using proactive methods + code auditing
to achive that, but proving that some pieces of code are correct raises bar.
Zero defects means zero security holes.



Re: emul.linux on amd64

2014-09-09 Thread Matti Karnaattu
Sure running Oracle Java or MATLAB on
OpenBSD would be nice but that is not OpenBSD issue but rather Oracle
and MathWorks business decisions.

There is OpenJDK is open source:
http://openjdk.java.net/projects/bsd-port/

To get companies interested to develop binaries for OpenBSD, that will
require OpenBSD to be more complete platform for applications.

In practice this means defined long term ABI stability. And if we are
talking about desktop applications, this means also defined desktop
environment and toolkit. FVVM + Xaw won't quite cut it.

2014-09-10 3:09 GMT+03:00 Predrag Punosevac punoseva...@gmail.com:

 On Mon, Sep 8, 2014 at 8:49 PM, tekk t...@parlementum.net wrote:

  I know that at least in 2004 it was considered to be unreasonable
  to try to get i386 linux applications working on amd64 openbsd through
  emul.linux, but how much work would be involved to get amd64 linux
  apps working? Presumably it wouldn't  quite be as easy as just using
  64 bit packages instead of 32 bit, but are there too  many abi
  differences?

 Unlike many OSs OpenBSD amd64 is true 64 bit operating system so even
 running native i386 binaries on amd64 (in some kind sandbox of course)
 is not possible. IIRC there was extensive discussion many years ago
 about cross compiling and OpenBSD developers got that right by insisting
 on native builds and real hardware testing. If anybody things otherwise
 please try to run any non Tier I NetBSD port. I honestly wonder if
 emul.linux serves any purpose today. OpenBSD ports three contains
 practically any valuable peace of open-source software worth porting.
 Apart of now dead Opera web browser I personally have never been tempted
 to run Linux binaries on OpenBSD. Sure running Oracle Java or MATLAB on
 OpenBSD would be nice but that is not OpenBSD issue but rather Oracle
 and MathWorks business decisions. Same goes with infamous Adobe Flash or
 my recent favorite MegaRAID Storage Management.

 If I was allowed to vote I would remove emul.linux code from the build
 all together.

 Predrag