Re: Bump [q] gradle on NetBSD 9.1 (amd64) with OpenJDK 11 -- does not work

2020-11-21 Thread Kamil Rytarowski
I just ran into it independently on NetBSD/amd64 current 9.99.x.

On 20.11.2020 02:59, ts1000 wrote:
> Hello,
> wanted to bump up my question to see if anybody could help.
> Also, if I may, I wanted to ask if this group is the right question
> about using NetBSD as a development environment (using OpenJDK11 in my
> case). Or if there are other forums more specialized for this topic.
> 
> thank you in advance
> 
> On 2020-11-07 18:08, ts1000 wrote:
>> Wanted to check if anybody has gradle working with OpenJDK 11 on
>> OpenBSD 9.1
>> I cannot get it to work at all.
>>
>> not even:
>>
>> gradle status
>>   or
>> gradle init
>>
>> I have tried going back to Gradle versions that are over 1 year old,
>> and still same issue
>>
>> https://github.com/gradle/gradle/issues/15087
>>
>>
>> I am thinking that something might be wrong with my sysctl.conf or
>> login.conf or something else.
>> If there are suggestions on what to look for next, would very much
>> appreciate.
>>
>>
>>  -- my sysctl.conf --
>>
>> nbsd1$ cat /etc/sysctl.conf
>> #!/sbin/sysctl -f
>> #
>> # $NetBSD: sysctl.conf,v 1.8 2011/09/25 21:47:22 christos Exp $
>> #
>> # sysctl(8) variables to set at boot time.
>>
>> # Default on panic: dump core and reboot. See savecore(8) for
>> information.
>> # Switch this to 1 if you want to enter the kernel debugger on crashes
>> # instead. See ddb(4) for an introduction and also try the "help" command
>> # at the db> prompt.
>> # If you understand the implication and want to change the behaviour
>> before
>> # /etc/rc.d/sysctl is run, use the kernel option DDB_ONPANIC, see
>> options(4).
>> ddb.onpanic?=0
>>
>> # Default core name template:
>> #kern.defcorename=%n.core
>>
>> # Number of kernel threads to use for NFS client
>> #vfs.nfs.iothreads=4
>>
>> # Default tty/pty character queue sizes. Should be bumped to 32K or so if
>> # used in networking (ppp/pppoe)
>> kern.tty.qsize=32000
>>
>> #v-start
>> kern.ipc.shmmaxpgs=32768
>>
>> kern.sbmax=8388608
>> net.inet.tcp.sendspace=3217968
>> net.inet.tcp.recvspace=3217968
>>
>> net.inet.tcp.init_win=10
>>
>>
>>
>> net.inet.tcp.recvbuf_auto=1
>> net.inet.tcp.sendbuf_auto=1
>> net.inet.tcp.sendbuf_max=16777216
>> net.inet.tcp.recvbuf_max=16777216
>>
>>
>> net.inet.tcp.init_win_local=10
>>
>>
>> net.inet.tcp.congctl.selected=cubic
>> #this is invalid    net.inet.ip.ifq.maxlen = 4096
>> net.inet.tcp.delack_ticks=5
>>
>> kern.maxfiles = 10
>> kern.maxproc = 10044
>> kern.posix.semmax = 10128
>> #v-endnbsd1$
>>
>>  -- my login .conf --
>>
>>
>> staff:\
>>     :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R7/bin
>> /usr/pkg/bin /usr/pkg/sbin /usr/local/bin:\
>>     :umask=022:\
>>     :datasize-max=infinity:\
>>     :datasize-cur=1024M:\
>>     :maxproc-max=1044:\
>>     :maxproc-cur=1024:\
>>     :openfiles-cur=512:\
>>     :openfiles-max=104512:\
>>     :stacksize-cur=128M:
>>     :copyright=/dev/null:
>>     :ignorenologin:\
>>     :requirehome@:
>>
>>
>>
>>
>>  -- ulimit -a --
>>
>> time  (-t seconds    ) unlimited
>> file  (-f blocks ) unlimited
>> data  (-d kbytes ) 1048576
>> stack (-s kbytes ) 114688
>> coredump  (-c blocks ) unlimited
>> memory    (-m kbytes ) 8022248
>> locked memory (-l kbytes ) 2674082
>> thread    (-r threads    ) 1024
>> process   (-p processes  ) 1024
>> nofiles   (-n descriptors) 512
>> vmemory   (-v kbytes ) unlimited
>> sbsize    (-b bytes  ) unlimited
>>
>> -- java -version --
>> $ java -version
>> openjdk version "11.0.8-internal" 2020-07-14
>> OpenJDK Runtime Environment (build
>> 11.0.8-internal+0-adhoc.pkgsrc.openjdk-jdk11u-jdk-11.0.8-10-1)
>> OpenJDK 64-Bit Server VM (build
>> 11.0.8-internal+0-adhoc.pkgsrc.openjdk-jdk11u-jdk-11.0.8-10-1, mixed
>> mode)




signature.asc
Description: OpenPGP digital signature


Re: Getting undefined reference to ___tls_get_addr when building packages on netbsd-5.2/i386

2020-08-03 Thread Kamil Rytarowski
On 03.08.2020 10:48, Brian Buhrow wrote:
>   hello.  Following up on my own thread, I've figured out that the
> symbol in question ___tls_get_addr shows up in libbfd.a if I install
> pkgsrc/devel/binutils. The question now is, how can I get my packages to
> link against that library?   And, will that library successfully load
> binaries on NetBSD-5.2/i386?
> Thanks for any ideas on this.  
> 
> BTW, I found the following page on NetBSD and thread  local storage, which
> seems to be the trouble here.  So the question is, can I work around the
> lack of native tls in NetBSD-5, which doesn't appear to have it, by using
> binutils, which does?  And, if so, how do I build packages using that
> instead of the NetBSD native tools?
> 
> -thanks
> -Brian
> 
> http://www.netbsd.org/~mjf/tls/tasks.html
> 

___tls_get_addr is delivered on i386 in /usr/libexec/ld.elf_so and on
amd64 in /usr/libexec/ld.elf_so-i386

What's the situation with this symbol in NetBSD-5.2 is unknown to me.



signature.asc
Description: OpenPGP digital signature


Re: [SOLVED-ish] Performance weirdness with netbsd-9 /usr/bin/grep

2020-05-23 Thread Kamil Rytarowski
On 23.05.2020 04:30, Paul Ripke wrote:

> [SOLVID-ish]: Argh! I thought this sounded familiar...
> 
> slave:ksh$ LC_ALL=C time /usr/bin/grep -c Jan/2020 /home/httpd/log/access.log
> 407186
> 0.91 real 0.42 user 0.48 sys
> 
> So has the default value of LC_ALL (or LC_.*) changed recently?
> 

This is a known issue, affecting the system at least since 8.0 (or even
7.0).

Whenever LC_ALL is set at least to my native locale (I read the same for
Japanese), it is extremely slow and unusable for even small text files.
Today, whenever I need to use grep(1) I'm automatically prepending it
with LC_ALL=C.

So far I had no time to investigate the root cause of the problem, as I
don't feel like developing grep gplv2 is a good use of resources.


A workaround would be to upgrade to gnu grep gplv3 in base or switch to
the BSD grep. Are we ready to switch to the BSD grep?



signature.asc
Description: OpenPGP digital signature


Re: linux binary convert

2020-04-16 Thread Kamil Rytarowski
On 16.04.2020 19:20, Fekete Zoltán wrote:
> 
> Thanks for the answer. You might give me advice how run the built binary
> (linux) in a debugger. The linux gdb doesn't work as it can't see the
> process, NetBSD debugger doesn't know the format.
> 
> Development on linux is solution , it'sobvious, but I just want go with
> the experiment as far as possible.

There is a compat for execution, not debugging Linux programs under
GDB/LLDB. You can still run gdbserver/lldb-server on Linux and attach
from a NetBSD host.



signature.asc
Description: OpenPGP digital signature


Re: What is the difference between nvmm-netbsd and kvm-linux?

2020-03-06 Thread Kamil Rytarowski
On 06.03.2020 19:42, Maxime Villard wrote:
> Having said that, indeed KVM will architecturally perform fewer syscalls,
> because it emulates certain devices in kernel mode -- which can increase
> performance because it avoids a kernel<->userland cycle, but can decrease
> security (see bug class above).

Future hardware can deliver hardware assisted devices removing the need
for this emulation of certain devices in software. Once we will be
there, there might be no good reason to decode instructions in the kernel.


Re: What is the difference between nvmm-netbsd and kvm-linux?

2020-03-06 Thread Kamil Rytarowski
On 06.03.2020 10:22, Ilia Zykov wrote:
> Hello,
> 
> this page - https://blog.netbsd.org/tnf/entry/from_zero_to_nvmm says:
> 
> “One thing you may have noticed from Fig. A, is that the complex emulation 
> machinery is not in the kernel, but in USERLAND. This is an excellent 
> security property of NVMM, because it reduces the risk for the host in case 
> of bug or vulnerability – the host kernel remains unaffected –, and also has 
> the advantage of making the machinery easily fuzzable. Currently, this 
> property is NOT FOUND in other hypervisors such as KVM, HAXM or Bhyve, and I 
> hope we'll be able to preserve it as we move forward with more backends.”
> 
> I don't understand what does it mean “emulation machinery is not in the 
> kernel, but in USERLAND ... this property is NOT FOUND in other hypervisors 
> such as KVM ..."?
> After all, qemu-kvm also runs in userland and does the same thing. What is 
> the difference between qemu-kvm(without virtio) and qemu-nvmm?
> I'm more interested there are architectural differences, not implementation 
> differences.
> 
> Kvm's guest code start point is in kernel space (but it is isolated from the 
> main part by using VT-x / AMD-V). Take a look at slide 9 on this page: 
> http://www.linux-kongress.org/2010/slides/KVM-Architecture-LK2010.pdf
> But nvmm, does the same. Or nvmm returns in userspace before execute the main 
> guest code? I don't undestand.
> 
> The kvm mane loop is:
> open("/dev/kvm")
> ioctl(KVM_CREATE_VM)
> ioctl(KVM_CREATE_VCPU)
> for (;;) {
>  ioctl(KVM_RUN)
>  switch (exit_reason) {
>  case KVM_EXIT_IO:  /* ... */
>  case KVM_EXIT_HLT: /* ... */
>  }
> }
> But nvmm, does the same.
> struct nvmm_exit exit;
>   while (1) {
>   nvmm_vcpu_run(, 0, );
>   switch (exit.reason) {
>   case NVMM_EXIT_NONE:
>   break; /* nothing to do */
>   case ... /* completed as needed */
>   }
>   }
> Tell me, please, where am I mistaken?
> I would really appreciate any clarification.
> Thank you.
> 

A hypervisor backend shall implement instruction decoder for MMIO/PIO
operations. NVMM performs this emulation in userspace, while others like
HAXM perform this inside the kernel.

There are pros and cons but it is a distinct property of NVMM, but it is
definitely a more secure approach.



signature.asc
Description: OpenPGP digital signature


Moritz Systems

2020-03-04 Thread Kamil Rytarowski
I’m pleased to inform you about my new project. I have founded Moritz
Systems. Moritz Systems is an IT start-up with focus to commercialize
NetBSD derived products.

Our mission is:

 - Enhancing the Operating System in areas critical for commercial users.
 - Building commercial products based on the NetBSD Operating System.

Moritz Systems is a new company, but it is associated with experienced
software developers from the BSD community supported by commercial and
management experts.

Our team has expertise in working on toolchains, low-level components,
kernel and userland code, building tailor made distributions and
packaging third party software in packaging collections.

I will be pleased to have your suggestions regarding potential clients
interested for our services and their requirements.

I’m looking forward to your reply.

Best regards,

Kamil Rytarowski
CTO, Moritz Systems
www.moritz.systems



signature.asc
Description: OpenPGP digital signature


Re: Problems with C++ compiler on 9.0_RC2

2020-02-06 Thread Kamil Rytarowski
On 06.02.2020 10:09, Marc Baudoin wrote:
> Hi,
> 
> I recently upgraded a NetBSD/amd64 8.1 system to 9.0_RC2 and I
> noticed problems when compiling C++ programs.
> 
> For instance, with pkgsrc/devel/cmake:
> 
> In file included from /usr/include/g++/memory:74:0,
>  from cmake_bootstrap_13004_test.cxx:3:
> /usr/include/g++/ext/concurrence.h:124:5: error: '__gthread_mutex_t' does not 
> name a type; did you mean '__pthread_mutex_st'?
>  __gthread_mutex_t _M_mutex;
>  ^
>  __pthread_mutex_st
> /usr/include/g++/ext/concurrence.h:169:5: error: '__gthread_mutex_t' does not 
> name a type; did you mean '__pthread_mutex_st'?
>  __gthread_mutex_t* gthread_mutex(void)
>  ^
>  __pthread_mutex_st
> /usr/include/g++/ext/concurrence.h:179:5: error: 
> '__gthread_recursive_mutex_t' does not name a type; did you mean 
> '__recursive_mutex'?
>  __gthread_recursive_mutex_t _M_mutex;
>  ^~~
> [...]
> 
> or with pkgsrc/print/poppler:
> 
> In file included from /usr/include/g++/mutex:43:0,
>  from 
> /usr/pkgsrc/print/poppler/work/poppler-0.84.0/poppler/Array.h:32,
>  from 
> /usr/pkgsrc/print/poppler/work/poppler-0.84.0/poppler/Object.h:335,
>  from 
> /usr/pkgsrc/print/poppler/work/poppler-0.84.0/poppler/Annot.cc:61:
> /usr/include/g++/bits/std_mutex.h:63:13: error: '__gthread_mutex_t' does not 
> name a type; did you mean '__pthread_mutex_st'?
>  typedef __gthread_mutex_t   __native_type;
>  ^
>  __pthread_mutex_st
> /usr/include/g++/bits/std_mutex.h:70:5: error: '__native_type' does not name 
> a type; did you mean '__false_type'?
>  __native_type  _M_mutex;
>  ^
>  __false_type
> /usr/include/g++/bits/std_mutex.h: In constructor 
> 'std::__mutex_base::__mutex_base()':
> /usr/include/g++/bits/std_mutex.h:75:38: error: '_M_mutex' was not declared 
> in this scope
>__GTHREAD_MUTEX_INIT_FUNCTION(&_M_mutex);
>   ^~~~
> 
> Is it a problem with my setup, with pkgsrc or is there something
> wrong with the C++ environment in 9.0_RC2?
> 

Please share a minimal reproducer.



signature.asc
Description: OpenPGP digital signature


Re: How do you set $PS1 on /bin/ksh

2020-01-24 Thread Kamil Rytarowski
On 24.01.2020 14:19, Ottavio Caruso wrote:
> Hi,
> 
> [hoping my post doesn't arrive duplicated or triplicated]
> 
> How do you set the prompt in ksh? The man page doesn't seem to help.
> OpenBSD ksh has a different manpage. Compare:
> https://man.openbsd.org/ksh.1#PS1
> and
> https://netbsd.gw.com/cgi-bin/man-cgi?ksh
> 
> For example:
> PS1="\u@\h:\w\$ "
> 
> is not expanded.
> 
> Thanks
> 

Personally, I use:

export PS1='! $(whoami)@$(hostname) $PWD $ '



signature.asc
Description: OpenPGP digital signature


Re: pkgtools/plist-utils and red-black tree implementations

2020-01-01 Thread Kamil Rytarowski
On 01.01.2020 18:26, Frédéric Fauberteau wrote:
> Hi,
> 
> I tried to build pkgtools/plist-utils on FreeBSD and I got:
> plist_tree.c:37:10: fatal error: 'sys/rbtree.h' file not found
> #include 
>  ^~
> 1 error generated.
> *** Error code 1
> 
> I found that OpenBSD (and FreeBSD too) provides sys/tree.h that contains
> a red-black tree implementation. Actually, NetBSD also provides
> sys/tree.h and then two red-black tree implementations.
> 
> Is there relevent differences between these implementations
> (sys/rbtree.h vs sys/tree.h)?
> 
> Could plist-utils use sys/tree.h in order to work on FreeBSD/OpenBSD?

I think it would be easier to add compat rbtree for those systems and
ideally use libnbcompat.

If you would like to rewrite it to sys/tree.h, feel free to do so.



signature.asc
Description: OpenPGP digital signature


Re: EV_SET fallout (was Re: rxvt-unicode build snafu)

2019-11-22 Thread Kamil Rytarowski
On 22.11.2019 15:12, Kamil Rytarowski wrote:
> On 22.11.2019 15:08, Greg Troxel wrote:
>> Bob Bernstein  writes:
>>
>>> In file included from ./../libev/ev_kqueue.c:42:0,
>>>  from ./../libev/ev.c:2684,
>>>  from ev_cpp.C:2:
>>> ./../libev/ev_kqueue.c: In function 'void kqueue_change(int, int, int, 
>>> int)':
>>> ./../libev/ev_kqueue.c:52:3: error: call of overloaded '_EV_SET(kevent*, 
>>> uintptr_t, int&, int&, int&, int, int)' is ambiguous
>>>EV_SET (_changes [kqueue_changecnt - 1], fd, filter, flags, 
>>> fflags, 0, 0);
>>>^
>>> /usr/include/sys/event.h:59:1: note: candidate: void _EV_SET(kevent*, 
>>> uintptr_t, uint32_t, uint32_t, uint32_t, int64_t, intptr_t)
>>>  _EV_SET(struct kevent *_kevp, uintptr_t _ident, uint32_t _filter,
>>>  ^~~
>>> /usr/include/sys/event.h:76:1: note: candidate: void _EV_SET(kevent*, 
>>> uintptr_t, uint32_t, uint32_t, uint32_t, int64_t, void*)
>>>  _EV_SET(struct kevent *_kevp, uintptr_t _ident, uint32_t _filter,
>>>  ^~~
>>
>> I have been seeint EV_SET issues in a lot of places, but am unclear on
>> the cause and usual resolution.
>>
>> Could someone who really understands the EV_SET troubles explain?
>>
> 
> Please make sure to use pkgsrc-current as there are issues fixed post
> branch.
> 
> Also looking at the error message, please upgrade your current snapshot
> to a newer version.
> 

To be clear: snapshot of NetBSD.

> There is an intermediate state with a fallout and the right way to do is
> to upgrade.
> 




signature.asc
Description: OpenPGP digital signature


Re: EV_SET fallout (was Re: rxvt-unicode build snafu)

2019-11-22 Thread Kamil Rytarowski
On 22.11.2019 15:08, Greg Troxel wrote:
> Bob Bernstein  writes:
> 
>> In file included from ./../libev/ev_kqueue.c:42:0,
>>  from ./../libev/ev.c:2684,
>>  from ev_cpp.C:2:
>> ./../libev/ev_kqueue.c: In function 'void kqueue_change(int, int, int, int)':
>> ./../libev/ev_kqueue.c:52:3: error: call of overloaded '_EV_SET(kevent*, 
>> uintptr_t, int&, int&, int&, int, int)' is ambiguous
>>EV_SET (_changes [kqueue_changecnt - 1], fd, filter, flags, 
>> fflags, 0, 0);
>>^
>> /usr/include/sys/event.h:59:1: note: candidate: void _EV_SET(kevent*, 
>> uintptr_t, uint32_t, uint32_t, uint32_t, int64_t, intptr_t)
>>  _EV_SET(struct kevent *_kevp, uintptr_t _ident, uint32_t _filter,
>>  ^~~
>> /usr/include/sys/event.h:76:1: note: candidate: void _EV_SET(kevent*, 
>> uintptr_t, uint32_t, uint32_t, uint32_t, int64_t, void*)
>>  _EV_SET(struct kevent *_kevp, uintptr_t _ident, uint32_t _filter,
>>  ^~~
> 
> I have been seeint EV_SET issues in a lot of places, but am unclear on
> the cause and usual resolution.
> 
> Could someone who really understands the EV_SET troubles explain?
> 

Please make sure to use pkgsrc-current as there are issues fixed post
branch.

Also looking at the error message, please upgrade your current snapshot
to a newer version.

There is an intermediate state with a fallout and the right way to do is
to upgrade.



signature.asc
Description: OpenPGP digital signature


Re: Another NVMM question

2019-10-09 Thread Kamil Rytarowski
Windows 95 is unsupported by qemu at least in the softemu mode.

I don't know whether it could work with NVMM.

On 09.10.2019 19:03, Robert Nestor wrote:
> No, this is an old Windows-95C that I’m trying to install under NVMM.  It did 
> install and run under XEN and I tried using the same parameters in NVMM.  Had 
> to specify no more than 768Meg of RAM, Pentium class CPU and VCPU=1 (which I 
> assume would be SMP 1).
> 
> So I suspect it’s either a bug or a missing feature in NVMM.
> 
> I can’t try Windows 10/64 (or 32) as I don’t have a license or CD for it.
> 
> 
> On Oct 9, 2019, at 11:15 AM, Chavdar Ivanov  wrote:
> 
>> Any chance you are trying to install Windows 10/64 ? AFAIK it still
>> doesn't run with nvmm. The 32-bit version is fine. though.
>>
>> On Wed, 9 Oct 2019 at 16:47, Kamil Rytarowski  wrote:
>>>
>>> On 09.10.2019 17:37, Robert Nestor wrote:
>>>> Got a few systems installed and running under NVMM in NetBSD 9.0, but ran 
>>>> into this playing with a Windows installation.  It appears to be coming 
>>>> from NVMM and I’m curious if this is a current limitation in NVMM or are 
>>>> there some QEMU parameters which can be used to circumvent this.
>>>>
>>>> NetBSD Virtual Machine Monitor accelerator is operational
>>>> qemu-system-x86_64: NVMM: Mem Assist Failed [gpa=0xb8040]
>>>> qemu-system-x86_64: NVMM: Failed to execute a VCPU.
>>>>
>>>
>>> I would need to check into the code, but it could miss a cpu instruction
>>> in the decoder.
>>>
>>> Please file a bug report for it. There will be need for a proper
>>> reproduction steps and specification of your hardware and Window image.
>>>
>>
>>
>> -- 
>> 
> 




signature.asc
Description: OpenPGP digital signature


Re: Another NVMM question

2019-10-09 Thread Kamil Rytarowski
On 09.10.2019 17:37, Robert Nestor wrote:
> Got a few systems installed and running under NVMM in NetBSD 9.0, but ran 
> into this playing with a Windows installation.  It appears to be coming from 
> NVMM and I’m curious if this is a current limitation in NVMM or are there 
> some QEMU parameters which can be used to circumvent this.
> 
> NetBSD Virtual Machine Monitor accelerator is operational
> qemu-system-x86_64: NVMM: Mem Assist Failed [gpa=0xb8040]
> qemu-system-x86_64: NVMM: Failed to execute a VCPU.
> 

I would need to check into the code, but it could miss a cpu instruction
in the decoder.

Please file a bug report for it. There will be need for a proper
reproduction steps and specification of your hardware and Window image.



signature.asc
Description: OpenPGP digital signature


Re: Install problems with LinuxMint in mvmm

2019-10-08 Thread Kamil Rytarowski
Once you get a grub menu, you need to specify 'noapic'.

Linux runs aggressive hw checks that fail under hypervisors (NVMM is not
to be blamed).

The right solution is to patch the Linux kernel and disable the checks
for NVMM and HAXM.

On 08.10.2019 18:20, Robert Nestor wrote:
> Thanks!  I tried adding “-no-acpi” to the QEMU command line and that 
> eliminated the messages from QEMU, but the Linux installer still failed.  I 
> then tried using “-append noacpi” on the QEMU command line, but that is only 
> available with one also uses “-kernel”.  So I guess one can’t boot an 
> installation CD this way.
> 
> 
> On Oct 8, 2019, at 9:40 AM, Kamil Rytarowski  wrote:
> 
>> On 08.10.2019 16:31, Robert Nestor wrote:
>>> Playing with nvmm in an Oct 9 NetBSD 9.0 build.  Sucessfully installed
>>> a version of NetBSD 8.0 but ran into problems tryuing to install a
>>> LinuxMint 19.2 64-bit system.  Nvmm throws these errors:
>>>
>>> qemu-system-x86_64: NVMM: Unexpected WRMSR 0x1c9 [val=0x3], ignored
>>> qemu-system-x86_64: NVMM: Unexpected RDMSR 0x1c9 [val=0x0], ignored
>>> qemu-system-x86_64: NVMM: Unexpected RDMSR 0x1a6 [val=0x0], ignored
>>> qemu-system-x86_64: NVMM: Unexpected WRMSR 0x1a6 [val=0x11], ignored
>>> qemu-system-x86_64: NVMM: Unexpected RDMSR 0x1a6 [val=0x0], ignored
>>> qemu-system-x86_64: NVMM: Unexpected RDMSR 0x1a7 [val=0x0], ignored
>>> qemu-system-x86_64: NVMM: Unexpected WRMSR 0x1a7 [val=0x11], ignored
>>> qemu-system-x86_64: NVMM: Unexpected RDMSR 0x1a7 [val=0x0], ignored
>>> qemu-system-x86_64: NVMM: Unexpected RDMSR 0x3f6 [val=0x0], ignored
>>> qemu-system-x86_64: NVMM: Unexpected WRMSR 0x3f6 [val=0x11], ignored
>>> qemu-system-x86_64: NVMM: Unexpected RDMSR 0x3f6 [val=0x0], ignored
>>> qemu-system-x86_64: NVMM: Unexpected RDMSR 0x186 [val=0x0], ignored
>>> qemu-system-x86_64: NVMM: Unexpected RDMSR 0x187 [val=0x0], ignored
>>> qemu-system-x86_64: NVMM: Unexpected RDMSR 0x188 [val=0x0], ignored
>>> qemu-system-x86_64: NVMM: Unexpected RDMSR 0x189 [val=0x0], ignored
>>> qemu-system-x86_64: NVMM: Unexpected RDMSR 0x38d [val=0x0], ignored
>>> qemu-system-x86_64: NVMM: Unexpected RDMSR 0xc4 [val=0x0], ignored
>>> qemu-system-x86_64: NVMM: Unexpected WRMSR 0xc4 [val=0x], ignored
>>> qemu-system-x86_64: NVMM: Unexpected RDMSR 0xc4 [val=0x0], ignored
>>> qemu-system-x86_64: NVMM: Unexpected RDMSR 0x140 [val=0x0], ignored
>>> qemu-system-x86_64: NVMM: Unexpected RDMSR 0xce [val=0x0], ignored
>>> qemu-system-x86_64: NVMM: Unexpected WRMSR 0x140 [val=0x0], ignored
>>> qemu-system-x86_64: NVMM: Unexpected RDMSR 0x34 [val=0x0], ignored
>>>
>>> And the Linux installer panics.
>>>
>>> Qemu was invoked with:
>>>
>>> qemu-system-x86_64 -m 256 -accel nvmm -cdrom 
>>> /home/linuxmint-19.2-xfce-64bit.iso -name "LinuxMint-19.2 Install" -smp 2 
>>> -netdev tap,id=nd0,ifname=tap0,script=no,downscript=no -device 
>>> rtl8139,netdev=nd0 -drive 
>>> file=/home/LinuxMint-19.2.dsk,media=disk,format=raw 
>>>
>>> Any ideas, or am I missing some important qmeu option here?  NetBSD runs 
>>> fine with this set of options in qemu.
>>>
>>
>> Ignore the warnigs and set 'noapic' on boot in the bootloader.
>>
> 




signature.asc
Description: OpenPGP digital signature


Re: Install problems with LinuxMint in mvmm

2019-10-08 Thread Kamil Rytarowski
On 08.10.2019 16:31, Robert Nestor wrote:
> Playing with nvmm in an Oct 9 NetBSD 9.0 build.  Sucessfully installed
> a version of NetBSD 8.0 but ran into problems tryuing to install a
> LinuxMint 19.2 64-bit system.  Nvmm throws these errors:
> 
> qemu-system-x86_64: NVMM: Unexpected WRMSR 0x1c9 [val=0x3], ignored
> qemu-system-x86_64: NVMM: Unexpected RDMSR 0x1c9 [val=0x0], ignored
> qemu-system-x86_64: NVMM: Unexpected RDMSR 0x1a6 [val=0x0], ignored
> qemu-system-x86_64: NVMM: Unexpected WRMSR 0x1a6 [val=0x11], ignored
> qemu-system-x86_64: NVMM: Unexpected RDMSR 0x1a6 [val=0x0], ignored
> qemu-system-x86_64: NVMM: Unexpected RDMSR 0x1a7 [val=0x0], ignored
> qemu-system-x86_64: NVMM: Unexpected WRMSR 0x1a7 [val=0x11], ignored
> qemu-system-x86_64: NVMM: Unexpected RDMSR 0x1a7 [val=0x0], ignored
> qemu-system-x86_64: NVMM: Unexpected RDMSR 0x3f6 [val=0x0], ignored
> qemu-system-x86_64: NVMM: Unexpected WRMSR 0x3f6 [val=0x11], ignored
> qemu-system-x86_64: NVMM: Unexpected RDMSR 0x3f6 [val=0x0], ignored
> qemu-system-x86_64: NVMM: Unexpected RDMSR 0x186 [val=0x0], ignored
> qemu-system-x86_64: NVMM: Unexpected RDMSR 0x187 [val=0x0], ignored
> qemu-system-x86_64: NVMM: Unexpected RDMSR 0x188 [val=0x0], ignored
> qemu-system-x86_64: NVMM: Unexpected RDMSR 0x189 [val=0x0], ignored
> qemu-system-x86_64: NVMM: Unexpected RDMSR 0x38d [val=0x0], ignored
> qemu-system-x86_64: NVMM: Unexpected RDMSR 0xc4 [val=0x0], ignored
> qemu-system-x86_64: NVMM: Unexpected WRMSR 0xc4 [val=0x], ignored
> qemu-system-x86_64: NVMM: Unexpected RDMSR 0xc4 [val=0x0], ignored
> qemu-system-x86_64: NVMM: Unexpected RDMSR 0x140 [val=0x0], ignored
> qemu-system-x86_64: NVMM: Unexpected RDMSR 0xce [val=0x0], ignored
> qemu-system-x86_64: NVMM: Unexpected WRMSR 0x140 [val=0x0], ignored
> qemu-system-x86_64: NVMM: Unexpected RDMSR 0x34 [val=0x0], ignored
> 
> And the Linux installer panics.
> 
> Qemu was invoked with:
> 
> qemu-system-x86_64 -m 256 -accel nvmm -cdrom 
> /home/linuxmint-19.2-xfce-64bit.iso -name "LinuxMint-19.2 Install" -smp 2 
> -netdev tap,id=nd0,ifname=tap0,script=no,downscript=no -device 
> rtl8139,netdev=nd0 -drive file=/home/LinuxMint-19.2.dsk,media=disk,format=raw 
> 
> Any ideas, or am I missing some important qmeu option here?  NetBSD runs fine 
> with this set of options in qemu.
> 

Ignore the warnigs and set 'noapic' on boot in the bootloader.



signature.asc
Description: OpenPGP digital signature


Re: addition to man pages?

2019-09-17 Thread Kamil Rytarowski
On 17.09.2019 13:30, Jay Patel wrote:
> Hello All,
> can we add such ASCII arts in man pages? :P
> 

No, but feel free to make an alternative pkgsrc-packaged documentation.

> for eg.  man ls
>  __
> / Within current directory, ls displays the  \
> | names of files contained,As well as any |
> \ requested,Associated information.   /
>  -
>  \
>   \
>
> _.' :  `._
> .-.'`.  ;   .'`.-.
>__  / : ___ ;  /___ ;   __
>  ,'_ ""--.:__;".-.";: :".-.":__;.--"" _`,
>  :' `.t""--.. '<@.`;_  ',@>` ..--""j.' `;
>   `:-.._J '-.-'L__ `-- ' L_..-;'
> "-.__ ;  .-"  "-.  : __.-"
> L ' /.--. ' J
>  "-.   "--"   .-"
> __.l"-:_JL_;-";.__
>  .-j/'.;  ;  / .'"-.
>.' /:`. "-.: .-" .';  `.
> .-"  / ;  "-. "-..-" .-"  :"-.
>  .+"-.  : :  "-.__.-"  ;-._
>  ;   `.; ;: : "+. ;
>  :  ;   ; ;: ;  : :
>  ;  :   ; :;:   ;  :
> :   ;  :  ;  : ;  /  ::
> ;  ; :   ; :  ;   :   ;:
> :  :  ;  :  ;: :  ;  : ;
> ;:   ; :; ; ; ;
> : `."-;   :  ;  :  ;/  ;
>  ;-:   ; :  ;  : .-"   :
>  :   :  ;: .-"  :
>   ;`.  ; :;.'_..--  / ;
>   :  "-.  "-:  ;  :/."  .'  :
>  :  ;/  __:
>.-`./t-""  ":-+.   :
>  `.  .-"`l__/ /`. :  ; ;   ;
>   .-" .-"-.-"  .' .'j   /   ;/
>  / .-"   /. .'.' ;_:';
>  :-""-.`./-.' /`.___.'
> `t  ._  /
> "-.t-._:'
> 
> 
> Regards,
> 




signature.asc
Description: OpenPGP digital signature


Re: supplementary 32 bits libraries on amd64 Netbsd

2019-09-14 Thread Kamil Rytarowski
On 14.09.2019 16:27, Pierre Dupond wrote:
> Hi All,
>   I want to use some X11 32 bits libraries (for 32 bits Netbsd programs)
> on amd64 NetBSD. I have tried to install the libraries under
> "/emul/netbsd32" but the library is not found.
> 
> However, if I use the LD_LIBRARY_PATH like in this command:
> 
> (export LD_LIBRARY_PATH=/emul/netbsd32/usr/X11R7/lib;ldd xetex)
> 
> the library is found (here I want to find libfontconfig library)
> 
> I have also tried to copy the libraries under the directory
> /usr/X11R7/lib/i386 without success.
> 
> Do you have an idea?
> 
> 
> --
> Gmail <76nem...@gmx.ch>
> 

Build and install distribution with MKCOMPATX11.



signature.asc
Description: OpenPGP digital signature


Re: invalid ELF class 2; expected 1

2019-06-10 Thread Kamil Rytarowski
On 10.06.2019 03:31, Emmanuel Dreyfus wrote:
> Emmanuel Dreyfus  wrote:
> 
>> # ldd /usr/pkg/bin/screen-4.6.2
>> ldd: /usr/pkg/bin/screen-4.6.2: invalid ELF class 2; expected 1
>>
>> What does that mean? It seems to happen on amd64 but not on i386.
> 
> Replying to myself: This is an amd64 binary on a i386 userland, as a
> result of a botched update (i386 release unpacker on top of an amd64
> system).
> 

I can see the same for /usr/pkg/bin/pkglint

$ ldd /usr/pkg/bin/pkglint
ldd: /usr/pkg/bin/pkglint: invalid ELF class 2; expected 1

$ file /usr/pkg/bin/pkglint
/usr/pkg/bin/pkglint: ELF 64-bit LSB executable, x86-64, version 1
(NetBSD), dynamically linked, interpreter /libexec/ld.elf_so, for NetBSD
5.99, Go
BuildID=iRcVOVZu6Zp8tBlD-cX2/zX7_aUux5f5Zhp95bqWF/x0WLkIFy1svpITqGd5xI/pHmStGdG-KQcqmUnrW88,
not stripped



signature.asc
Description: OpenPGP digital signature


Re: is netbsd actually a toolkit?

2019-04-22 Thread Kamil Rytarowski
On 22.04.2019 06:16, Mayuresh Kathe wrote:
> freebsd has an internal focus to become a good server operating system.
> openbsd has an internal focus to become a highly secure operating system.
> what is netbsd's internal focus? can't be just a highly portable operating
> system! is it more to be a really good toolkit for people to build their
> own operating systems for their desired hardware?
> 

It's nothing wrong to treat NetBSD as a general purpose OS without
adjectives.

Is Linux for server? Embedded? Desktop? HPC? Research?

For me NetBSD is the right answer of open-source OS for desktop.



signature.asc
Description: OpenPGP digital signature


Re: Qemu virtual machine

2019-03-16 Thread Kamil Rytarowski
On 16.03.2019 11:48, Pedro Pinho wrote:
> Hi everyone!
> I'm planning to create a qemu virtual machine on my NetBSD laptop, so I
> can set-up a minimal linux system running Firefox and watch Netflix on
> NetBSD.
> I'm wondering though, which one is better for this user case, HAXM or
> NVMM? Any thoughts?
> Thx!

Try both and pick the one that works better (or at all).



signature.asc
Description: OpenPGP digital signature


Re: HAXM in pkgsrc

2019-02-14 Thread Kamil Rytarowski
On 13.02.2019 07:35, Kamil Rytarowski wrote:
> HAXM has been imported into pkgsrc/emulators/haxm.
> 

There is a regression in recent qemu 3.1.0 & HAXM that can cause
initialization of a guest crash.

I will put a dedicated version into wip/qemu-haxm v. 3.0.0 and keep
there until the problem will be solved.

> HAXM is a cross-platform hardware-assisted virtualization engine
> (hypervisor), widely used as an accelerator for Android Emulator and
> QEMU. It has always supported running on Windows and macOS, and has been
> ported to other host operating systems as well, such as Linux and NetBSD.
> 
> HAXM runs as a kernel-mode driver on the host operating system, and
> provides a KVM-like interface to user space, thereby enabling
> applications like QEMU to utilize the hardware virtualization
> capabilities built into modern Intel CPUs, namely Intel Virtualization
> Technology.
> 
> http://netbsd.org/~kamil/screenfetch/windows7_x86/crop_screen_00361.png
> 
> More information on the porting process is available on The NetBSD blog:
> http://blog.netbsd.org/tnf/entry/the_hardware_assisted_virtualization_challenge
> 
> NetBSD/amd64 is the only supported host of the package, but it shouldn't
> be difficult to port to NetBSD/i386 and package support for other
> supported OSes. The only tested version of the host kernel are 8.0 and
> HEAD, earlier releases might work (in theory 6.x is the minimal one).
> HAXM works with unpatched NetBSD kernel.
> 
> Users of HAXM shall obtain from the sources at least a copy of syssrc
> and place it into regular directory /usr/src(/sys).
> 
> Guests that are already known to work:
> 
>  - NetBSD/amd64
>  - Windows 7 32-bit
>  - Linux 64-bit (noapic boot)
>  - FreeBSD 12 32-bit
>  - Minix3 i386
>  - Plan9 i386
>  - FREEDOS
> 
> Other OSes are either broken or untested.
> 
> Usage:
> 
> 1. Install emulators/haxm from pkgsrc
> 2. Install emulators/qemu 3.1.0nb5 or newer from pkgsrc
> 3. Use auxiliary scripts for HAXM (superuser privileges needed)
> 4. Append HAXM option to qemu (qemu --accel hax)
> 
> Auxiliary scripts in the HAXM package:
> 
>  - haxm-mknod # creates /dev entries
>  - haxm-modload # inserts the HAXM kernel module
>  - haxm-modunload # removes the HAXM module from the NetBSD kernel
> 
> Optionally grant access to the HAXM device nodes to user(s):
> 
>  - /dev/HAX
>  - /dev/hax_vm/vm{00-07}
>  - /dev/hax_vm{00-07}/vcpu{00-15}
> 
> Future updates to the HAXM support will be tracked directly on The
> NetBSD Wiki qemu page:
> 
> http://wiki.netbsd.org/users/kamil/qemu/
> 




signature.asc
Description: OpenPGP digital signature


HAXM in pkgsrc

2019-02-12 Thread Kamil Rytarowski
HAXM has been imported into pkgsrc/emulators/haxm.

HAXM is a cross-platform hardware-assisted virtualization engine
(hypervisor), widely used as an accelerator for Android Emulator and
QEMU. It has always supported running on Windows and macOS, and has been
ported to other host operating systems as well, such as Linux and NetBSD.

HAXM runs as a kernel-mode driver on the host operating system, and
provides a KVM-like interface to user space, thereby enabling
applications like QEMU to utilize the hardware virtualization
capabilities built into modern Intel CPUs, namely Intel Virtualization
Technology.

http://netbsd.org/~kamil/screenfetch/windows7_x86/crop_screen_00361.png

More information on the porting process is available on The NetBSD blog:
http://blog.netbsd.org/tnf/entry/the_hardware_assisted_virtualization_challenge

NetBSD/amd64 is the only supported host of the package, but it shouldn't
be difficult to port to NetBSD/i386 and package support for other
supported OSes. The only tested version of the host kernel are 8.0 and
HEAD, earlier releases might work (in theory 6.x is the minimal one).
HAXM works with unpatched NetBSD kernel.

Users of HAXM shall obtain from the sources at least a copy of syssrc
and place it into regular directory /usr/src(/sys).

Guests that are already known to work:

 - NetBSD/amd64
 - Windows 7 32-bit
 - Linux 64-bit (noapic boot)
 - FreeBSD 12 32-bit
 - Minix3 i386
 - Plan9 i386
 - FREEDOS

Other OSes are either broken or untested.

Usage:

1. Install emulators/haxm from pkgsrc
2. Install emulators/qemu 3.1.0nb5 or newer from pkgsrc
3. Use auxiliary scripts for HAXM (superuser privileges needed)
4. Append HAXM option to qemu (qemu --accel hax)

Auxiliary scripts in the HAXM package:

 - haxm-mknod # creates /dev entries
 - haxm-modload # inserts the HAXM kernel module
 - haxm-modunload # removes the HAXM module from the NetBSD kernel

Optionally grant access to the HAXM device nodes to user(s):

 - /dev/HAX
 - /dev/hax_vm/vm{00-07}
 - /dev/hax_vm{00-07}/vcpu{00-15}

Future updates to the HAXM support will be tracked directly on The
NetBSD Wiki qemu page:

http://wiki.netbsd.org/users/kamil/qemu/



signature.asc
Description: OpenPGP digital signature


Re: how much percent of netbsd core is c89?

2018-12-24 Thread Kamil Rytarowski
On 24.12.2018 17:09, Gua Chung Lim wrote:
>> For practical reasons we restrict c89 + extensions to building tools.
>> For the rest we prefer gnu99.
> If we still restrict to c89,
> does that mean (in majority) there are no keywords
> "inline", "restrict", "_Bool", "_Complex" or "_Imaginary"?

The restriction is for src/tools.

> (Note that I barely know what are extended by GNU.)
> I believed that "asm" was extended by GNU.

asm and some syntax sugax.

> Please correct me, if I'm wrong.
> Thank you,
> 




signature.asc
Description: OpenPGP digital signature


Re: how much percent of netbsd core is c89?

2018-12-24 Thread Kamil Rytarowski
On 24.12.2018 18:06, i...@sdf.org wrote:
>> For practical reasons we restrict c89 + extensions to building tools.
> 
> what is intended by "tools"?
> 

src/tools



signature.asc
Description: OpenPGP digital signature


Re: how much percent of netbsd core is c89?

2018-12-24 Thread Kamil Rytarowski
On 24.12.2018 15:46, i...@sdf.org wrote:
> is netbsd still using c89 for a majority of it's core?
> if yes, approximately how much percent would that be?
> 

For practical reasons we restrict c89 + extensions to building tools.
For the rest we prefer gnu99.



signature.asc
Description: OpenPGP digital signature


Re: panic after sysupgrade update to NetBSD8.0

2018-07-24 Thread Kamil Rytarowski
On 24.07.2018 15:44, Miwa Susumu wrote:
> Hi all.
> 
> I try update to NetBSD 8.0 from about six months ago current.
> by sysupgrade.
> 

This would a downgrade and it's not fully supported and can brick your
setup. It might be easier to reinstall unless you know what you are doing.

> after reboot then panic. at modules...?
> https://imgur.com/a/LRuTSNs
> 
> sysupgrade support update from stable ? (e.g 7.1.2)
> 
> 

sysupgrade is for upgrades and 7.1.2 -> 8.0 shall work.



signature.asc
Description: OpenPGP digital signature


Re: Booting netbsd-8 fails

2018-07-22 Thread Kamil Rytarowski
On 22.07.2018 16:05, Gua Chung Lim wrote:
> * Martin Husemann (mar...@duskware.de) wrote:
>> On Sun, Jul 22, 2018 at 05:55:30PM +0700, Gua Chung Lim wrote:
>>> * Martin Husemann (mar...@duskware.de) wrote:
 Can you please try with a kernel from the official build?
 Since you had (unclear) local build issues, this would rule out any
 local issues (and also allow us to map the crash address better).
>>> Does this mean I have to reinstall the new OS from binary and everything in 
>>> pkgsrc, once again?
>>
>> No, just extracting the kernel and module sets in / would be good enough.
> I am not so sure how to do it.
> I saw files in ftp.NetBSD.org/pub/NetBSD/NetBSD-8.0/amd64/binary/.
> 
> for kernel...
> If I understand correctly, I have to fetch 
> ftp.NetBSD.org/pub/NetBSD/NetBSD-8.0/amd64/binary/kernel/netbsd-GENERIC.gz, 
> and then extract it in /.
> Am I right?
> 
> for modules...
> Shall I fetch 
> ftp.NetBSD.org/pub/NetBSD/NetBSD-8.0/amd64/binary/sets/modules.tgz?
> But where shall I extract these modules?
> You said /, but aren't module sets in /stand/ARCH/X.Y/modules/?
> 
> still trouble...
> As I can't have it boot for now, how can I extract those files on file system?
> 
> Thank you,
> 

The easiest solution is to reinstall.


sysupgrade (from pkgsrc) could allow to upgrade just the kernel and
modules (please check the documentation).


Another option is to use sysupgrade to upgrade the whole system to 8.0
(recommended).

The following command should do the trick (after installing sysupgrade
from pkgsrc):

sysupgrade auto http://cdn.netbsd.org/pub/NetBSD/NetBSD-8.0/amd64/


Other than that there is need to a manual intervention of fetching the
sets for kernel and modules and unpack manually replacing already
installed files.

Please refer to the notes here:

http://doc.nethence.com/bsd/wo.sysinst

Probably something along these lines:
tar xvzphfe modules.tgz -C /mnt
tar xvzphfe kern-GENERIC.tgz -C /mnt



signature.asc
Description: OpenPGP digital signature


Re: Booting netbsd-8 fails

2018-07-22 Thread Kamil Rytarowski
On 22.07.2018 12:33, Gua Chung Lim wrote:
> * Kamil Rytarowski (n...@gmx.com) wrote:
>>> Booting fails, and I end up booting with this...
>>> https://i.imgur.com/rC5pCGL.png
>>> =20
>>> Any suggestions would be highly appreciated.
>>> =20
>> =20
>> Please try "bt" in the ddb(4) prompt and share the result.
> https://i.imgur.com/9t3MJlx.png
> 
> Thank you,
> 

So the question is, are you mixing some incompatible modules with the
kernel code?

I recommend to try the official 8.0 distribution and check if there
problem is still there.



signature.asc
Description: OpenPGP digital signature


Re: Booting netbsd-8 fails

2018-07-22 Thread Kamil Rytarowski
On 22.07.2018 12:02, Gua Chung Lim wrote:
> Hi all,
> 
> Few months ago, I tried NetBSD 8.0 RC1. Booting failed.
> Today NetBSD 8.0 is released, so I tried it again.
> Booting failed with exactly the same symptom.
> Both cases, I did upgrading from NetBSD 7.1_STABLE.
> 
> # uname -a
> NetBSD netbsd.localdomain 7.1_STABLE NetBSD 7.1_STABLE (GENERIC) #7: Thu Jun  
> 7 22:34:37 +07 2018  
> root@netbsd.localdomain:/usr/obj/sys/arch/amd64/compile/GENERIC amd64
> 
> My updating process is as followings.
> # setenv CVS_RSH ssh
> # setenv CVSROOT anon...@anoncvs.netbsd.org:/cvsroot
> # cd /usr
> # cvs checkout -r netbsd-8 -P src
> # ./build.sh -O ../obj -T ../tools -U -u distribution
> Compile fails, so I clean it and start over again.
> 
> # rm -rf /usr/obj /usr/tools
> # cd /usr/src
> # ./build.sh -r -O ../obj -T ../tools -U -u distribution
> # ./build.sh -O ../obj -T ../tools -U -u kernel=GENERIC
> This time it compiles well.
> # mv /netbsd /netbsd.old
> # mv /usr/obj/sys/arch/i386/compile/CUSTOM/netbsd /
> # shutdown -r now
> This time netbsd-8 still boots.
> # cd /usr/src
> # ./build.sh -O ../obj -T ../tools -U install=/
> # /usr/sbin/etcupdate
> # shutdown -r now
> Booting fails, and I end up booting with this...
> https://i.imgur.com/rC5pCGL.png
> 
> Any suggestions would be highly appreciated.
> 

Please try "bt" in the ddb(4) prompt and share the result.

> Thank you,
> 




signature.asc
Description: OpenPGP digital signature


Re: string_view and clang

2018-06-08 Thread Kamil Rytarowski
On 08.06.2018 17:04, Patrick Welche wrote:
> According to
> 
>   http://en.cppreference.com/w/cpp/compiler_support
> 
> string_view is supported by gcc 7 and clang 4.0. As in NetBSD-current
> base we have gcc 6.4.0 and clang 5.0.1, I thought I would try it out:
> 
> $ clang -std=c++17 -o foo foo.cpp
> foo.cpp:3:10: fatal error: 'string_view' file not found
> #include 
>  ^
> 1 error generated.
> 
> Is the page over optimistic, or do I need more flags on my compile line?
> (Guessing that /usr/include has the gcc include files...)
> 

We ship with an old version of libc++ in base.

If you are using a LLVM style Please try to include it with
.

I'm working right now on getting HEAD libc++ to work on NetBSD.

> 
> Cheers,
> 
> Patrick
> 




signature.asc
Description: OpenPGP digital signature


Re: ffmpeg3 text relocations

2018-06-08 Thread Kamil Rytarowski
On 08.06.2018 13:11, Fekete Zoltán wrote:
> Hi There!
> 
> I'm trying to build ffmpeg3 pkgsrc on NetBSD8 i386.
> The build is successful, ffmpeg itself is usable.
> 
> However I see ugly warnings on every start of the program:
> 
> /usr/pkg/lib/ffmpeg3/libavdevice.so.57: text relocations
> /usr/pkg/lib/ffmpeg3/libavfilter.so.6: text relocations
> /usr/pkg/lib/ffmpeg3/libavformat.so.57: text relocations
> /usr/pkg/lib/ffmpeg3/libavcodec.so.57: text relocations
> /usr/pkg/lib/ffmpeg3/libavresample.so.3: text relocations
> /usr/pkg/lib/ffmpeg3/libpostproc.so.54: text relocations
> /usr/pkg/lib/ffmpeg3/libswresample.so.2: text relocations
> /usr/pkg/lib/ffmpeg3/libswscale.so.4: text relocations
> /usr/pkg/lib/ffmpeg3/libavutil.so.55: text relocations
> /usr/pkg/lib/libxvidcore.so.4: text relocations
> /usr/pkg/lib/libx264.so.155: text relocations
> 
> 
> I've already tried -fpic and -fPIC CFFLAGS to mitigate, but did not help.
> 
> Anybody any idea?
> 
> Thank you:
> 
> FeZ

Assembly code?



signature.asc
Description: OpenPGP digital signature


Re: emulation for 32 bit big endian?

2018-05-25 Thread Kamil Rytarowski
On 24.05.2018 19:43, Jeremy C. Reed wrote:
> What is the quickest and easiest NetBSD to install that is 32 bit and 
> big endian using an emulator? I need a working network in the virtual 
> system too or an easy way to copy files to its virtual disk.
> 
> For example, I fetched kernel and iso and tried:
> 
> $ qemu-system-mips -hda netbsd.evbmips.disk -kernel netbsd-INSTALL_MALTA 
> -cdrom NetBSD-8.0_RC1-evbmips-mipseb.iso  -nographic
> MIPS32/64 params: cpu arch: 128
> MIPS32/64 params: TLB entries: 16
> MIPS32/64 params: Icache: line=16, total=2048, ways=2, sets=64, colors=0
> MIPS32/64 params: Dcache: line=16, total=2048, ways=2, sets=64, colors=0
> cpu_arch 0x80: not supported
> 
> And it just hangs there using 99% cpu on a Linux host. I cannot find 
> installation docs for that example.
> 
> I have okay experience with qemu with i386 but want to try others. I 
> have also used simh-vax (but wrong endian) and tme with sun4 (not sure 
> if was 32 bit).
> 
> Any advice or pointers would be appreciated.
> 

With MALTA we need either special bootloader or hardcoded initialization
of the devices in the kernel for the purpose of emulation. Linux does
the latter. On the other hand MALTA should work with gxemul.



signature.asc
Description: OpenPGP digital signature


Re: why zfs and dtrace?

2018-05-23 Thread Kamil Rytarowski
On 23.05.2018 09:06, Kathe wrote:
> i doubt if zfs and dtrace work on every platform port
> currently supported by netbsd, and if the ever will.
> why then bother with zfs and dtrace at all?  :)
> 

We need ZFS at least for compatibility with the world as it's perhaps
the most widespread file system next to VFAT-like ones. It's supported
on Windows, MacOSX, Linux, FreeBSD, Illumos, Solaris, ...

DTrace is useful/needed for kernel developers and advanced users to
debug performance critical issues.

Both aren't possible on every port, but it does not stop them from being
useful on more powerful ones.



signature.asc
Description: OpenPGP digital signature


Re: Gah... How usable is www/firefox on NetBSD?

2018-05-07 Thread Kamil Rytarowski
On 07.05.2018 00:20, Brett Lymn wrote:
> On Tue, May 01, 2018 at 06:09:54PM +0200, Kamil Rytarowski wrote:
>>
>> This was an occasional problem in the past. Nowadays it's crashing all
>> the time and the only known workaround to me is to keep restarting the
>> browser.
>>
> 
> It may be totally unrelated but I have seen firefox on linux that runs
> absolutely fine locally immediately throw "gah, tab crashed" when remote
> displaying to a free xwindows emulator (xming) on windows.  So, perhaps
> something is missing in X? ... unlikely though.
> 

I don't know. I was trying to debug firefox and it seems that there is a
compilation of various bugs (at least various sources of SIGSEGV).

I was trying to printf the js engine to determine why the evaluator
returns error.. but I've decided to gave up for now, and keep focus on
better debuggers and tools.

Thought, I can observe some X crashes in the new VLC media player.



signature.asc
Description: OpenPGP digital signature


Re: Gah... How usable is www/firefox on NetBSD?

2018-05-02 Thread Kamil Rytarowski
On 01.05.2018 19:32, m...@netbsd.org wrote:
> On Tue, May 01, 2018 at 05:31:20PM +, m...@netbsd.org wrote:
>> Hi Mayuresh.
>>
>> I set:
>> browser.remote.autostart = false
>>
>> to avoid the crashes.
> 
> Sorry, that's browser.tabs.remote.autostart=false and might wantto
> change .2 too.
> 
> And it is in about:config.
> 

This doesn't make a difference here.



signature.asc
Description: OpenPGP digital signature


Re: Gah... How usable is www/firefox on NetBSD?

2018-05-01 Thread Kamil Rytarowski
On 01.05.2018 17:59, Mayuresh wrote:
> Not able to browse continuously even for a minute without facing "Gah.
> Your tab just crashed." in www/firefox (59).
> 
> Can't even login to gmail, nothing happens on clicking "Next" on entering
> email id.
> 
> Is it just NetBSD or firefox 59? Or is it just me?!
> 
> I switched back to using NetBSD after 8.0 RC1 was available. Wasn't using
> NetBSD for quite a while due to USB problems with my hardware that NetBSD
> wasn't handling before. While all my issues seem to be resolved by 8.0
> RC1, I was then greeted with an unusable browser.
> 
> Curious how other users who (have to) use a web browser with javascript on
> NetBSD are coping with this. Any other browser or older firefox or 59 is
> just alright for you?
> 
> Mayuresh
> 

This was an occasional problem in the past. Nowadays it's crashing all
the time and the only known workaround to me is to keep restarting the
browser.



signature.asc
Description: OpenPGP digital signature


Re: new NetBSD port for Tile-GX processor

2018-04-17 Thread Kamil Rytarowski
Adding some more context, Tile CPUs are marked for removal from the
Linux kernel. It would be great to see it supported by NetBSD, at least
as long as we could use qemu.

http://lkml.iu.edu/hypermail/linux/kernel/1804.1/06654.html

On 16.04.2018 19:20, Diana Eichert wrote:
> I know I'm resurrecting this from the dead, however I just noticed
> on Portwell website CAT-8020 - Network Security Appliance is a
> Tile-GX system and wondered if support for Tile-GX was ever commited to
> NetBSD.
> 
> g.day
> 
> diana
> 
> 
> On Wed, 31 Oct 2012, toru nishimura wrote:
> 
>> Hi, all,
>>
>> I and our team in Sanctum Networks have been making NetBSD port
>> for Tile-GX 64bit multi-core processor and it now has reached to the
>> stage running a single user mode shell.  We will continue our efforts
>> to fulfill the device drivers and SMP capabilities.  We are planning to
>> publish the code when it gets mature enough for public use.
>>
>> Toru Nishimura / Sanctum Networks, Bangalore India / nisim...@netbsd.org
>>
>> ---
>> Type t in 3 seconds to run thorough POST tests, q to run quick tests...
>> Thorough POST tests will be run.
>> msh0 0123 msh1 0123
>> (0,0) Tilera Hypervisor, version 4.0.2.145127 (source dist) 2012-10-26
>> 19:37:50
>> (0,0) Built by girish on Wed Oct 31 20:01:10 2012 from
>> /home/girish/NetBSD/hvc/netbsd.hvc, /home/girish/NetBSD with
>> CHIP_VERSION=10 CHIP_WIDTH=6 CHIP_HEIGHT=6 WATCHDOG=1
>> Symbols table: PA 0xc8_0038 - 0x3_63a8
>> Strings table: PA 0xcc_0038 - 0x2_3608
>> Hello NetBSD/tile!
>> Topology: 6,6 @ 0,0 (cpumask= 0xf)
>> Physical memory map:
>>    Memory [0]    0 /    1fc00 @ cntrl# 0
>>    Memory [1]   40 /    2 @ cntrl# 1
>> Virtual memory map:
>>    Memory [0]    0 /  200
>>    Memory [1] fe00 /  1fc
>>    Memory [2] 8000 / 8000
>> Memory layout:
>>    0x0200 = MEM_HOLE_BEGIN
>>    0xfe00 = MEM_HOLE_END
>>    0x0200 = HALF_VA_SPACE
>>    0xfe00 = VM_MIN_KERNEL_ADDRESS
>>    0xfff4 = VM_MAX_KERNEL_ADDRESS
>>    0xfff4 = FIXADDR_BASE
>>    0xfff5 = FIXADDR_TOP
>>    0xfff5 = HMAP0_BASE
>>    0xfff6 = HMAP0_TOP
>>    0xfff6 = HMAP1_BASE
>>    0xfff7 = HMAP1_TOP
>>    0xfff7 = MEM_SV_START
>>    0xfff8 = MEM_HV_START
>> FIXMAP:
>>    0xfff4  0xfff5  fixmap
>>    0xfff5  0xfff7  huge memory
>> ASID map:
>>    ASID Range [0] 0 / 255
>> command= 

Re: NetBSD disk performance on VirtualBox

2018-03-18 Thread Kamil Rytarowski
On 18.03.2018 15:41, Sad Clouds wrote:
> On Sun, 18 Mar 2018 15:38:40 +0100
> Kamil Rytarowski <n...@gmx.com> wrote:
> 
>> On 18.03.2018 14:41, Sad Clouds wrote:
>>> Hello, are there known I/O performance issues with NetBSD on
>>> VirtualBox? I've setup two similar VMs, one Linux, another one
>>> NetBSD, both use SATA virtual controller with one disk.
>>>
>>> Writing 1GB file sequentially:
>>> - Linux gives 425MB/sec,
>>> - NetBSD gives 27MB/sec.
>>>
>>> Repeated this several times, and got the same result.
>>>
>>> Is this expected with NetBSD?
>>>
>>
>> I've been observing performance issues under qemu+KVM (on a hosting
>> provider), making the OS very slow. This was related to virtio
>> drivers.
>>
>> I have not investigated it so far.
>>
> 
> Hello, would that be any virtio drivers, or just disk drivers? I'm
> using VirtualBox virtio-net for network adapter, not sure if this has
> any effect.
> 

This is virtio disk related.

I don't need virtio-net performance that much and I have not been
benchmarking it.



signature.asc
Description: OpenPGP digital signature


Re: NetBSD disk performance on VirtualBox

2018-03-18 Thread Kamil Rytarowski
On 18.03.2018 14:41, Sad Clouds wrote:
> Hello, are there known I/O performance issues with NetBSD on VirtualBox?
> I've setup two similar VMs, one Linux, another one NetBSD, both use
> SATA virtual controller with one disk.
> 
> Writing 1GB file sequentially:
> - Linux gives 425MB/sec,
> - NetBSD gives 27MB/sec.
> 
> Repeated this several times, and got the same result.
> 
> Is this expected with NetBSD?
> 

I've been observing performance issues under qemu+KVM (on a hosting
provider), making the OS very slow. This was related to virtio drivers.

I have not investigated it so far.



signature.asc
Description: OpenPGP digital signature


Re: Building amd64 without IPV6 support

2018-02-13 Thread Kamil Rytarowski
On 13.02.2018 23:50, Scott Burns wrote:
> I have completed the above task and it works on all machine except one.
> 
> On a firewall machine we have problems as it appears "ipnat" is unhappy
> about the kernel not having IPV6 support.

We have got a global option for mk.conf(5): MKINET6. It can be set to
"no" to disable IPv6 in userland.

For the kernel part your solution seems to be fine and it looks like a bug.



signature.asc
Description: OpenPGP digital signature


Re: zenlisp : package request

2018-02-03 Thread Kamil Rytarowski
On 03.02.2018 13:09, Kathe wrote:
> hi, is there any way i could request building a new package under netbsd?
> -mayuresh
> 

I will take care of this.



signature.asc
Description: OpenPGP digital signature


Re: vt100

2017-12-31 Thread Kamil Rytarowski
On 30.12.2017 19:25, Thomas Dickey wrote:
> On Sat, Dec 30, 2017 at 01:09:02PM -0500, Thomas Dickey wrote:
>> On Sat, Dec 30, 2017 at 06:38:16PM +0100, Kamil Rytarowski wrote:
>>> On 30.12.2017 17:41, Thomas Dickey wrote:
>>>> On Sat, Dec 30, 2017 at 11:39:38AM -0500, Thomas Dickey wrote:
>>>>> On Sat, Dec 30, 2017 at 03:53:35PM +0100, Kamil Rytarowski wrote:
>>>>>> How to setup correctly vt100 in a terminal?
>>>>>>
>>>>>> I've set exported TERM=vt100, called tset and stty and I keep observing
>>>>>> artifacts.
> 
> setting $TERM won't help with VMS :-)
> 
> Now... you could use the xterm option to tell it (in effect) to tell
> the host not to send 8-bit controls:
> 
> man xterm:
> 
>-ti term_id
>Specify  the  name used by xterm to select the correct response
>to terminal ID queries.  It also specifies the emulation level,
>used  to  determine  the  type  of  response  to  a  DA control
>sequence.  Valid values  include  vt52,  vt100,  vt101,  vt102,
>vt220,  and  vt240  (the  “vt”  is  optional).   The default is
>“vt420”.  The term_id argument specifies  the  terminal  ID  to
>use.  (This is the same as the decTerminalID resource).
> 
> That is,
> 
>   xterm -ti 100
> 
> or
> 
>   xterm -ti 102
> 
> and if the host is behaving properly, it'll give up on 8-bit controls.
> 
> Of course, VT100's have no function keys (F1-F12), nor Home/End,
> PageUp/PageDown, but cursor-keys should work.  Your experience here
> will depend on what the applications are using.
> 

This didn't help (starting "xterm -ti 100" on my NetBSD host and
telneting to OpenVMS), however I have found the solution.

I've set in OpenVMS the following option:

SET TERMINAL/DEVICE_TYPE=vt100

py-terminator started to work correctly (and the same should happen with
xterm).

Thank you for your help!



signature.asc
Description: OpenPGP digital signature


Re: vt100

2017-12-30 Thread Kamil Rytarowski
On 30.12.2017 23:26, Johnny Billquist wrote:
> On 2017-12-30 15:53, Kamil Rytarowski wrote:
>> How to setup correctly vt100 in a terminal?
> 
> A real vt100, or some emulator running under some windows system? There
> is a huge difference...
> 
>> I've set exported TERM=vt100, called tset and stty and I keep observing
>> artifacts.
> 
> What kind of artifacts?
> 

Already fixed. The terminals were dizzy becase of LC_ALL.

> I've tested lots of different emulators, and so far only xterm and DEC's
> powerterm have worked fully correct. With xterm, you obviously need to
> configure it to actually work like a vt100, and not some other funny thing.
> 
> putty works fairly well, and I have only one known issue with that one.
> 

I see, good to know! xterm and py-terminator started to behave sanely
when tuned properly.



signature.asc
Description: OpenPGP digital signature


Re: vt100

2017-12-30 Thread Kamil Rytarowski
On 30.12.2017 20:03, Thomas Dickey wrote:
> This would be an improvement for your configuration:
> 
>  LC_ALL=C xterm -ti 102

This works!



signature.asc
Description: OpenPGP digital signature


Re: vt100

2017-12-30 Thread Kamil Rytarowski
On 30.12.2017 19:39, Thomas Dickey wrote:
> - Original Message -
> | From: "Valery Ushakov" <u...@stderr.spb.ru>
> | To: netbsd-users@netbsd.org
> | Sent: Saturday, December 30, 2017 1:28:53 PM
> | Subject: Re: vt100
> | 
> | Kamil Rytarowski <n...@gmx.com> wrote:
> ...
> | 
> | > I've uploaded screen shot of xterm and script(1) recording.
> | > 
> | > http://netbsd.org/~kamil/vt100/
> | 
> | The typescript looks strange.  Are you sure there was not accidental
> | conversion(s) to/from utf-8 somewhere along the path?
> 
> That might be part of it, but the 233's are pretty clear.
> The host is responding with C1 controls, and that seems to be the main issue.
> Either make it work properly (I'd do that...) or back off and just be a 
> VT100/VT102.
> 

I use the default options and I assume that something is wrong on the
NetBSD side.

My only host change in my env(1)/NetBSD-host that might affect something is:

LC_ALL=pl_PL.UTF-8



signature.asc
Description: OpenPGP digital signature


Re: vt100

2017-12-30 Thread Kamil Rytarowski
On 30.12.2017 17:41, Thomas Dickey wrote:
> On Sat, Dec 30, 2017 at 11:39:38AM -0500, Thomas Dickey wrote:
>> On Sat, Dec 30, 2017 at 03:53:35PM +0100, Kamil Rytarowski wrote:
>>> How to setup correctly vt100 in a terminal?
>>>
>>> I've set exported TERM=vt100, called tset and stty and I keep observing
>>> artifacts.
>>>
>>> I was trying to run http://invisible-island.net/vttest/ and it does not
>>> work well.
>>>
>>> I've tested py-terminator and xterm with the same results.
>>>
>>> I'm working around the problems with vt100 with putty right now and this
>>> program works well.
>>
>> hmm - looking at this and followup, there's no information regarding
>> what exactly is going wrong.
>>
>> That (plus the actual version number for vttest and xterm would help).
>> For py-terminator - no help there.
> 
> For "artifacts", it helps to know that you can capture all of the characters
> sent by a host to the terminal using the "script" program.  If you had
> sent a bug report, I'd ask for that information, to point to the likely
> problem.
> 

I've uploaded screen shot of xterm and script(1) recording.

http://netbsd.org/~kamil/vt100/

py-terminator works correctly with the delete key, but otherwise they
present the same result on the screen.



signature.asc
Description: OpenPGP digital signature


Re: vt100

2017-12-30 Thread Kamil Rytarowski
On 30.12.2017 16:35, Greg Troxel wrote:
> 
> Kamil Rytarowski <n...@gmx.com> writes:
> 
>> How to setup correctly vt100 in a terminal?
>>
>> I've set exported TERM=vt100, called tset and stty and I keep observing
>> artifacts.
>>
>> I was trying to run http://invisible-island.net/vttest/ and it does not
>> work well.
>>
>> I've tested py-terminator and xterm with the same results.
>>
>> I'm working around the problems with vt100 with putty right now and this
>> program works well.
> 
> The VT100 had a specific series of escape sequences.  Memory is fuzzy on
> timing/ordering, but we ended up with an ANSI standard for terminal
> escape sequences that is mostly the same as VT100.  There are some DEC
> things in vt100 but not ANSI,  and later ANSI grew color support (VT100,
> VT220, VT320 are monochrome)
> 
> xterm tries to implement the ansi sequences, more or less.  I am not
> aware of a way to make it be exactly vt100.
> 

Are the ANSI sequences conflicting with DEC VT100?

> So if you want a true VT100 emulation, you will either have to tell
> xterm to be faithful to vt100 (TERM=vt100 tells programs to generate
> vt100 codes), or find some other terminal emulator which is switchable.
> 

How to do it? I've tried to export TERM=vt100 without success.

> What are you really trying to accomplish?   Are you looking to see if
> our xterm has bugs?
> 

I'm attempting to login to OpenVMS and it's breaking the screen with
vt100 sequences. Command line mostly works, but editors and other
programs aren't usable.

I've only managed to login to the machine and get sane output with
putty, but it's not a convenient terminal of mine - I want to use
py-terminator.



signature.asc
Description: OpenPGP digital signature


vt100

2017-12-30 Thread Kamil Rytarowski
How to setup correctly vt100 in a terminal?

I've set exported TERM=vt100, called tset and stty and I keep observing
artifacts.

I was trying to run http://invisible-island.net/vttest/ and it does not
work well.

I've tested py-terminator and xterm with the same results.

I'm working around the problems with vt100 with putty right now and this
program works well.



signature.asc
Description: OpenPGP digital signature


Re: dmesg of 'NetBSD-7.1/i386' 'boot.iso' on 'Thinkpad R40'

2017-09-03 Thread Kamil Rytarowski
On 02.09.2017 17:00, leo_...@volny.cz wrote:
> [as I'm not subscribed to this mailing list, I'd appreciate cc's of any
>  replies. TIA]
> 
> While I have no intention to install NetBSD on this particular machine,
> I booted it as part of a test.
> 
> Enjoy (or weep).
> 
> --schaafuit.
> 

Feel free to share your dmesg on http://dmesgd.nycbug.org/index.cgi




signature.asc
Description: OpenPGP digital signature


Re: Can NetBSD cgd be used for encrypted backup?

2017-06-12 Thread Kamil Rytarowski
On 12.06.2017 15:03, Thor Lancelot Simon wrote:
> On Mon, Jun 12, 2017 at 02:55:48PM +0200, Kamil Rytarowski wrote:
>> On 12.06.2017 14:45, Thor Lancelot Simon wrote:
>>> On Sun, Jun 11, 2017 at 06:41:56PM +0200, Kamil Rytarowski wrote:
>>>>
>>>> You would need to push large part image of an encrypted volume for every
>>>> change to files.
>>>
>>> That doesn't make sense to me.  Why would you need to push more blocks
>>> than actually changed?
>>>
>>
>> Cloud hosting would require partial updates of files. But I think we can
>> agree that using cgd raw image is not the best tool for this task.
> 
> I still don't understand what you're getting at.  Are you suggesting backing
> the image with S3 or something?  If so, I don't actually see why the write
> amplification problem is any worse for block-based or file-based storage,
> though it's bad for a small-write workload either way.
> 

I'm thinking about reuploading block device image for each change. I
noted in the past that people were trying to do the same with TrueCrypt,
and they give up - it's good for one-time upload of something, but it's
not usable in scenarios that the volume has to be altered even for few bits.



signature.asc
Description: OpenPGP digital signature


Re: Can NetBSD cgd be used for encrypted backup?

2017-06-12 Thread Kamil Rytarowski
On 12.06.2017 14:45, Thor Lancelot Simon wrote:
> On Sun, Jun 11, 2017 at 06:41:56PM +0200, Kamil Rytarowski wrote:
>>
>> You would need to push large part image of an encrypted volume for every
>> change to files.
> 
> That doesn't make sense to me.  Why would you need to push more blocks
> than actually changed?
> 

Cloud hosting would require partial updates of files. But I think we can
agree that using cgd raw image is not the best tool for this task.



signature.asc
Description: OpenPGP digital signature


Re: Can NetBSD cgd be used for encrypted backup?

2017-06-11 Thread Kamil Rytarowski
On 11.06.2017 18:26, Mayuresh wrote:
> On Sun, Jun 11, 2017 at 06:16:50PM +0200, Kamil Rytarowski wrote:
>>> Ok, you mean, I can mount it such that it shows encrypted files?
>>>
>>
>> Yes, use cgdconfig(8).
> 
> It won't really show files in encrypted form, I guess.
> 

You need to create a regular partition on a cgd(4) device.

>> Putting image of encrypted partition to cloud sounds less trivial. You
>> might need a lot of bandwidth to use it.
> 
> Right, this is where encfs/cryfs is better.
> 

You would need to push large part image of an encrypted volume for every
change to files.

I cannot speak fore encfs/cryfs.

> Mayuresh.
> 




signature.asc
Description: OpenPGP digital signature


Re: Can NetBSD cgd be used for encrypted backup?

2017-06-11 Thread Kamil Rytarowski
On 11.06.2017 17:57, Mayuresh wrote:
> On Sun, Jun 11, 2017 at 04:32:02PM +0200, Kamil Rytarowski wrote:
>>> - Can the native cgd of NetBSD be used for the purpose of encrypted
>>>   backup? Basically can I mount such filesystem in a way that it shows
>>>   encrypted files?
>>>
>>
>> I use cgd(4) devices for encrypted backup.
> 
> Ok, you mean, I can mount it such that it shows encrypted files?
> 

Yes, use cgdconfig(8).

> And are the changes to files incremental (not necessarily one one one for
> encryption reasons), so that rsync can be effectively used for backup over
> cloud? (i.e. the amount of data movement when using rsync is somewhat - if
> not exactly - proportional to amount of change since last backup.)
> 
> Alternatively one could backup the virtual file, but that's not so useful
> for cloud backup.
> 

I don't use incremental or cloud backup, I just use a regular block
device on a portable storage (USB disk).

Putting image of encrypted partition to cloud sounds less trivial. You
might need a lot of bandwidth to use it.

> Mayuresh.
> 




signature.asc
Description: OpenPGP digital signature


Re: Can NetBSD cgd be used for encrypted backup?

2017-06-11 Thread Kamil Rytarowski
On 11.06.2017 16:22, Mayuresh wrote:
> I am coming from encfs/cryfs on Linux, which allow encryption at directory
> level. A user space mount shows the unencrypted contents, while the
> physical disk has encrypted contents, which can be easily backed up.
> 
> encfs on NetBSD seems broken and dated to me, while cryfs doesn't seem to
> be available (contrary to wikipedia page
> https://en.wikipedia.org/wiki/Comparison_of_disk_encryption_software#Operating_systems
> )
> 
> Have a few questions about cgd in this context:
> 
> - Can the native cgd of NetBSD be used for the purpose of encrypted
>   backup? Basically can I mount such filesystem in a way that it shows
>   encrypted files?
> 

I use cgd(4) devices for encrypted backup.

> - Can I use a virtual filesystem (loop device/vnode disk) with cgd?
> 

vnd(4) can be used.

> - Can I dynamically grow such virtual filesystem as the space requirement
>   grows?
> 

I've never tried growing, in theory this should work, if not directly
with userland tools than with external ones (like qemu disk format).

> Mayuresh
> 




signature.asc
Description: OpenPGP digital signature


Re: NetBSD/usermode status

2017-04-30 Thread Kamil Rytarowski
I was told that usermode kernel requires custom hosting kernel with the
following module: sys/arch/usermode/modules/syscallemu

To build the usermode kernel we need to perform something similar to:
cd /usr/src/sys/arch/amd64/conf
config GENERIC_USERMODE
cd ../compile/GENERIC_USERMODE
make depend
make

To run it:
./netbsd

There is need to resurrect build of it.

Currently there might be no support to run the usermode version without
NetBSD kernel on host.

On 29.04.2017 14:08, r0ller wrote:
> Hi Greg,
> 
> Yepp, that I know, that's why I asked it:) However, as the question is
> rather about the overhead of running code in one or the other way I
> asked jym at NetBSD who told that -besides the fact that only
> measurement can tell- based on his gut feeling, usermode should have
> less overhead if we don't take into account I/O.
> 
> Best regards,
> r0ller
> 
>  Eredeti levél 
> Feladó: Greg Troxel < g...@lexort.com (Link -> mailto:g...@lexort.com) >
> Dátum: 2017 április 29 11:51:10
> Tárgy: Re: NetBSD/usermode status
> Címzett: r0ller < r0l...@freemail.hu (Link -> mailto:r0l...@freemail.hu) >
>  
> r0ller  writes:
>> By the way, does anyone know what would be faster: NetBSD domU on
>> NetBSD/Xen dom0 or NetBSD/usermode?
> That's a good question, but if you want a reliable setup to actually run
> something, I would recommend Xen. There are a lot of people running
> NetBSD/Xen, and I am not aware of a lot of NetBSD/userland use.




signature.asc
Description: OpenPGP digital signature


Re: NetBSD/usermode status

2017-04-27 Thread Kamil Rytarowski
Best to reach people mentioned in roadmaps.

https://github.com/NetBSD/src/blob/trunk/doc/roadmaps/virtualization#L25

On 27.04.2017 16:41, r0ller wrote:
> Hi All,
> 
> By the way, does anyone know what would be faster: NetBSD domU on
> NetBSD/Xen dom0 or NetBSD/usermode?
> 
> Thanks,
> r0ller
> 
>  Eredeti levél 
> Feladó: r0ller < r0l...@freemail.hu (Link -> mailto:r0l...@freemail.hu) >
> Dátum: 2017 április 27 07:18:03
> Tárgy: Re: NetBSD/usermode status
> Címzett: netbsd-users@netbsd.org < netbsd-users@netbsd.org (Link ->
> mailto:netbsd-users@netbsd.org) >
>  
> Hi,
> Ok, that's already something that gives hope:) But where can I find a
> howto guide about it? Nothing pops up either in the netbsd.org domain or
> outside that except the ones I mentioned.
> Regards,
> r0ller
>  Eredeti levél 
> Feladó: Kamil Rytarowski < n...@gmx.com (Link -> mailto:n...@gmx.com) >
> Dátum: 2017 április 26 12:15:53
> Tárgy: Re: NetBSD/usermode status
> Címzett: r0ller < netbsd-users@netbsd.org (Link ->
> mailto:netbsd-users@netbsd.org) >
>  
> On 26.04.2017 10:59, r0ller wrote:
>> Hi All,
>>
>> Just wanted to quickly ask if anyone knows if NetBSD/usermode is
>> available at all for general use since the last discussion I found in
>> the mail archives about it dates back to 2011 and does not reveal
>> anything of its state while the most recent hit on google is a pdf from
>> 2013
>>
> (http://www.13thmonkey.org/documentation/NetBSD/EuroBSD2012-NetBSD_usermode-paper.pdf)
>> revealing some info about it but it's not a howto or tutorial about it.
>>
>> Best regards,
>> r0ller
> Lately we fixed and improved ptrace(2) to resurrect usermode kernel.
> However beyond ptrace(2) I'm not aware about any related work. You need
> recent NetBSD-current to host it on NetBSD.
>  




signature.asc
Description: OpenPGP digital signature


Re: NetBSD/usermode status

2017-04-26 Thread Kamil Rytarowski
On 26.04.2017 10:59, r0ller wrote:
> Hi All,
> 
> Just wanted to quickly ask if anyone knows if NetBSD/usermode is
> available at all for general use since the last discussion I found in
> the mail archives about it dates back to 2011 and does not reveal
> anything of its state while the most recent hit on google is a pdf from
> 2013
> (http://www.13thmonkey.org/documentation/NetBSD/EuroBSD2012-NetBSD_usermode-paper.pdf)
> revealing some info about it but it's not a howto or tutorial about it.
> 
> Best regards,
> r0ller

Lately we fixed and improved ptrace(2) to resurrect usermode kernel.
However beyond ptrace(2) I'm not aware about any related work. You need
recent NetBSD-current to host it on NetBSD.



signature.asc
Description: OpenPGP digital signature


Re: mmap and MAP_FIXED

2016-05-12 Thread Kamil Rytarowski
On 12.05.2016 10:21, Daniel Jour wrote:
> I'm currently working on CLISP and am trying to build it on
> NetBSD 7.0 (GENERIC.201509250726Z) amd64. 

I think you are probably aware of it, but CLISP already exists in
pkgsrc/lang/clist and works (builds) on NetBSD.

Are you working on upstreaming of the local patches? There has been
accepted a GSoC project to make the CLISP release (the latest one 2.49
was in 2010), it should be the appropriate time for it.

Thank you for your work!


Re: fuse / refuse

2016-05-02 Thread Kamil Rytarowski
On 03.05.2016 01:35, Greg Troxel wrote:
>   there are two FUSE interfaces

Last time I checked there were actually 3 interfaces on NetBSD and one
needed aid from pkgsrc and use the upstream fuse package.



signature.asc
Description: OpenPGP digital signature


Re: Am I traced?

2016-04-15 Thread Kamil Rytarowski
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 15.04.2016 04:09, Eric Haszlakiewicz wrote:
> 
> On 4/11/2016 11:52 PM, Kamil Rytarowski wrote:
>> -BEGIN PGP SIGNED MESSAGE- Hash: SHA256
>> 
>> I'm trying to write a check whether I am a traced process.
>> 
>> Is the following code correct:
>> 
>> #define _KMEMUSER #include  #include  
>> #include  #include  #include  
>> #include  #include  #include 
>> 
>> int main(int argc, char **argv) { int traced = -1; kvm_t *kd; int
>> cnt;
>> 
>> struct kinfo_proc *info; size_t size = sizeof(info);
>> 
>> kd = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, "kvm_open"); if (kd
>> == NULL) err(EXIT_FAILURE, "kvm_open");
>> 
>> info = kvm_getprocs(kd, KERN_PROC_PID, getpid(), ); if (info
>> == NULL) err(EXIT_FAILURE, "kvm_getprocs");
>> 
>> traced = info->kp_proc.p_flag & P_TRACED;
> I don't think this will work using kvm_getprocs(), because many of
> the flags that you might expect to be in p_flag are actually in
> other fields of struct proc, such as p_slflag.  If I change your
> code to do: traced = info->kp_proc.p_slflag & PSL_TRACED; it seems
> to work roughly as expected.  Alternately, I believe you could 
> switch to using kvm_getproc2(), as there is code (in fill_kproc2()
> in kern_proc.c) which translates the various P*_ flags into
> P_ flags and places them in the p_flag field. For example, if
> I print out all the flags, and run your program through gdb, I
> get: p_flag=0x4000 p_sflag=0x1000 p_slflag=0x801 p_lflag=0x2 
> p_stflag=0x0 traced=2048
> 
> Decoded, that's: p_flag=PK_EXEC p_sflag=PS_NOTIFYSTOP 
> p_slflag=PSL_TRACED|PSL_TRACEFORK p_lflag=PL_CONTROLT p_stflag=0 
> traced=Yes
> 
>> kvm_close(kd);
>> 
>> printf("traced=%d\n", traced);
>> 
>> return 0; }
>> 
>> I'm getting weird results for info->kp_proc.p_flag indicating
>> that I was timeouted during sleep.
> eh?  What value in p_flag would indicate a timeout?   Oh, perhaps
> you're looking at the ps man page, which refers to P_TIMEDOUT with
> value 0x400, but /usr/include/sys/sysctl.h has P_SA (aka L_SA) with
> that value. As far as I can tell, P_TIMEDOUT is not actually
> defined anywhere, and P_SA/L_SA are not actually used within the
> kernel anymore and haven't been since before netbsd-5.
> 
> Eric

Thank you! It works now as expected.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJXENQOAAoJEEuzCOmwLnZsjR4P/3ziMw3SdnD0Wv7IhjhjAInJ
dlr7f10yPn0VuEQp7dQsAKMZ1OokTTE+KZgm0oB6FATAPbVci8hC8jVcTnxvOsMK
0mx6GUlF96VutGRiQotbTA3qPHg4p3/DFhdOq8chE+2tmpz51XFvzq24ntX5t2pc
Arnw23IZzIysetHCNim4qEI4Xya2xMo7NridrrckkaqUGB1+VDvwDNfU5noblLhJ
LoWshjmh3ReuA4fv9tAc+ZkDzBb2VzCAlFbsQP4/aRw+wNQ4A6Wb2R+PZm6vzWYY
zTJUnh87Xz3Mx4CoGMNa4XPcVGqo+2rXQVjeBVvnR24I6SizOi1SsidWHEAZhLo8
LYcRG7ttu6Wx2c74SSQvIm7uH88zradyyqBEFSmcUVwDGXWCMAHhLuDTE5vYQYa/
XXQhAIQMR9jTFTfwaDTuPQu3Lhfcg6eP6dC3oaR8bEcsUhMEHYgWPv1nhlzYRPCL
gJmCP8uF/4Lig5fgs6+2v4sM5sAIZ0fwlWAmfPcs77AjLNm1eyhY4jXcsx0IYSl0
V/KcRmT8yELbEbjiltdctibAraTh6RrorAZiID9JRaaZUjkHa/eCK4wt+511PhEd
14m/G56TVGEl2RDPzhhOxcGT6T80H8z1PeFyjowdNOt+IQ0nJq3esK31Jp4o2+xY
NsDv95qAJ+94/gAExtvY
=Xgsv
-END PGP SIGNATURE-


Am I traced?

2016-04-11 Thread Kamil Rytarowski
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

I'm trying to write a check whether I am a traced process.

Is the following code correct:

#define _KMEMUSER
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

int main(int argc, char **argv)
{
int traced = -1;
kvm_t *kd;
int cnt;

struct kinfo_proc *info;
size_t size = sizeof(info);

kd = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, "kvm_open");
if (kd == NULL)
err(EXIT_FAILURE, "kvm_open");

info = kvm_getprocs(kd, KERN_PROC_PID, getpid(), );
if (info == NULL)
err(EXIT_FAILURE, "kvm_getprocs");

traced = info->kp_proc.p_flag & P_TRACED;

kvm_close(kd);

printf("traced=%d\n", traced);

return 0;
}

I'm getting weird results for info->kp_proc.p_flag indicating that I
was timeouted during sleep.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJXDHD0AAoJEEuzCOmwLnZsX1oQALCjHzn3DZpGsBDCBOmbT+bh
Jb6xCf/TYCqQXW3gdkqVhY7AsKR/FObU+Wfw+H2tAjCYCdCUTiIFJYgDXZuxnK8u
bE1ocQjiJz19lVLdW4kHAywntOW+1Wo+LSIXWR2oVp8YVle/xbiHkdmXuCDfu6Zj
wx8VcM9ijOoTC3zsfyywDywtyVYggTvGEMSY2eWF9u1BV6CmUMLNat1rpXEK2/wM
YjVWXJwHZDEYUpupEc5IMf/EIyEk3b/O5mt7b3L1FOYFSAFRedHf2xPPduYAPo0L
KU0iozNRFQDeDXr2rDuHZMyqmzkrSOPLUP3rIRBEOPr4NrnCj5pSDP2Rjo4UUm7Y
nMRE3Oy+POLbYTLcfQCiWiEWANtmP/6ps5pl/qpq+rDuNuElAtcsS1lbSmEaHxQL
mNk0sheLvDPIG8kjqffRFgY8r7I0Y6eNOkumLghHFu206ZMLhG191puzEZA7nHGh
S8XNfRaHRIRr/fW79dTl8fZ867jB/3d6lUVkZeYcy9CTx22emWOAMAdHrXnhcQQD
bH1Rn6yGkbbmQujDWIWGKwbgJP4sPpkWrjj0d8+uoPuhlG8uUEYGXRd/10wfPPYv
FlaNrSqdnnVJfUZJgraPUQvFyxfTDNrKGFLNvl8MFnmX5mtTjYqqKuPXUnXA80P7
aUBU/do74EyXgYUnu8mv
=Ds5E
-END PGP SIGNATURE-


Re: How to install/build Go applications?

2016-01-21 Thread Kamil Rytarowski
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 21.01.2016 21:01, Kamil Rytarowski wrote:
> How to build and install Go applications using Go from pkgsrc?
> 
> I mean, not to add new packages, but for example is it possible to 
> build gogs [1]?
> 
> Thanks
> 
> [1] Gogs (Go Git Service) is a painless self-hosted Git service. 
> https://gogs.io
> 

For the reference, after fixing ssl bug it works now.

http://mail-index.netbsd.org/pkgsrc-bugs/2016/01/21/msg058681.html
"pkg/50690: lang/go invalid path to ca-certificates.crt"
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJWoVI0AAoJEEuzCOmwLnZsJSoP/3h0LBUa47QGA8vfSHZ53u1S
r4BS5TodhZEDoyc5JyGwRC6IiADi8Q3oBTGf/QXXfw8zbMit5b8dcwZg0mXCHV+C
zyYK969YeO2/1hpCO3Ej8xfE/OHWxss3IUBWk3SrgQwmhfX2hq485WEbbp7Oc7jn
zLHCCRwj3cHlmkZTwHvN04SKcRBULiH2dqFjdO7qR4oQrDunyOzAdzCQZu/dfXIN
g/ZirNgBkz/mUp81I3WqHeEt7mFfW6A8nREmjp23CPQuxb87WT+d1rZc+k6Ahc6I
odzoZbIdH00mKnihzYyGFscPSZrWN+KBVonbgmEtnuwqbm7nIC8swXSBlMJxJuRG
9MP0giz7kVDrZXxxkwCN1fI5cUIz/z9EQ4S2g8tvfl42L5tTq0TJe0kEzvP10T57
ZGE96X9I5147iAOscyflvLMzxoXBb6NOa8VA8ZA/Ide7hDAiqfGf/AVVeualPnKS
UaWx1tbQfKEPpRDlfKFl0FnzaWaJPKXQ9/MOJH3uNhi3GB9Pf9sDkxUNHfkn3HEs
GKXwHtPpIlaCC9viDMJI6kAhRv3Pbq6gu0H6AhhWXCgUxy12i2DsteSDnndWNKHn
PGjmhdv7rfMm9W7Wq/dYHbwxR+Z5odGHSZw95X7xvuCADmehd+pL7Ub5UA4WCJu0
Ui+igaC5SsniltZMlfM6
=0Qd8
-END PGP SIGNATURE-


How to install/build Go applications?

2016-01-21 Thread Kamil Rytarowski
How to build and install Go applications using Go from pkgsrc?

I mean, not to add new packages, but for example is it possible to build
gogs [1]?

Thanks

[1] Gogs (Go Git Service) is a painless self-hosted Git service.
https://gogs.io


Capture text in console with colors

2016-01-12 Thread Kamil Rytarowski
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

I ran into issue with a need to capture the screen of a running
program and paste it to libreoffice or similar tool as a listing with
colors.

While it's easier for batch programs putting output on stdout and
exiting, it was more difficult to do with ones with a curses-like
interface.

The solution is as follows:
1. Install textproc/aha for ANSI -> HTML converter
2. Set "set -g history-limit 0" in ~/.tmux.conf to disable scrollback
history
3. Start tmux(1) and go into the screen to be captured
4. Type other terminal session: tmux capture-pane -Jpe | aha > dump.html
5. Open dump.html from favorite browser (Firefox verified) and
copy-paste it to a libreoffice document.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJWlZLsAAoJEEuzCOmwLnZsQJEP/RkK4L3jpvQk2pOjQLlVHLpS
hO5K4hi4MwU47faOoq0PrzJq4LkV79W6Pe1ZQ2BxHvrRgrJGjs02//w6hFNVxi1w
B4ad7FhYm5m++yAHhz08K0MMGtdvLqBCPrr11f0b9n4ybHWnyL7BU23TfIZQma7o
HhrJtj9A34jDU39/PGgGKBlDkrfQcE/TtFdp3BAlS9CSnAAh3GQXiyKiRJ/ntufE
MpdBCHSpNX5WgGRsVLGqTi09eOdX00TtEbwdyqSdNWGsC355H/PvZwxD8e/u7OEw
Rs+4ut2Wcb11MdpRxraBUx6iwtlSYZO9Pcc2tslWVUZgS03TSi7mk1I4gaVh3ao8
yN56UrRJej0gyjDY8B/zvsDXQKL7gX2Yq3ZmoGm8ypHIppqICjcKtFuXkKH5kjmR
3mcznfWAtEIteD7HF/1081gPErIB3QV12vHcWp9dg5FSdUWwBX/d5WA1yfF7nGdT
xEMw2+Yn/p/HhFbmJ3Tu9Cj3ahyXjbJudwsumWgTwJ6E1i9zMzSqw4SQdKIp2xGv
6oL8JHQH5FFwv3L2w3RGzEvwbmTg4894zufJhUS6kAoTpfSK/RcN9kEdGaJX0aQ9
7+PTMorLil8yZuteTI+bqRMUvc7dLmd4brHlf1wKPeM6sth7EarIn14BqRaIInbD
e6mvQ2MpL1CpQksMduj4
=wkR7
-END PGP SIGNATURE-


Re: Firsts in NetBSD

2016-01-07 Thread Kamil Rytarowski
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 07.01.2016 19:13, Swift Griggs wrote:
> 
> I'm writing some documentation for a class I'm teaching soon at my 
> job. One section covers various BSD's (each separate) contribution 
> to features in the collective endowment of Unix variants out 
> there.
> 
> Here are the things I believe NetBSD was first at doing. Can
> anyone else think of ones that'd be worthy of note to a group of 
> up-and-coming Unix geeks ?
> 
> * First with a USB stack (beat Linux didn't it?) * First with TCP 
> Auto tuning (Linux's autotune based on NetBSD's strategy) * First 
> with Free ports to Alpha, HPPA, and MIPS (true?)
> 
> I know there are more NetBSD "first to do XYZ". Does anyone care to
> correct those three or give me some more? Thanks in advance, 
> friends.
> 
> -Swift

First to get C++11 on VAX and I think pioneer to get amd64 support.

First to get rumpkernel architecture and reuse kernel code as a
library (lately Intel is trying to clone it with the Linux kernel).
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJWjqxmAAoJEEuzCOmwLnZsTqQQAIHysFdjgn9xMWMUA1fQaT1D
2zrDW9aq9Ig4q0IaDp5fRYPtTE+oS4bLC72797721hmN9T8GZaHmz7fK54rshI1x
zk34sf9vWEwnVAHrfUHsHFxyM6cR1+OtQHGI6gGxqADCnsxTpXViidPLtnZchMg1
PtdV9m1RM5ngTqZCDHLX2is2pFWoqQAYwZ6022o0f0MANvcBS7V1NmTzTYs/Uz2F
f15JioaOvRVS0nv+G7jkihFAnwBCIh8I3ZzL97Q7reK73qOhtlZ56bxh/2W9MHUj
xv3xRWeVzCHaatDBPfIboQlVXqc6cyMvF/6TNa6HsOuTPM4sO43RssQaneoAitVM
4x/ECJSui8ON+epdkkyWZaUKfQQTENLa1tJ5I4rOwV2A+dsRXMCgFehlITmKzX8N
7Znps3/MjZ6yLlKbaawc6BNsfQsKv5WM89x3x55BCb788rrkt0ZFdN3Chl9tGSnf
nJhJgJTlLY3mXRVL4Cq8d5IqjEPnx4tOMkqYCjaqQZoyYW4+H8Ma3adO0sQxmuUU
KK42Wu2wwV8v0zZTLab5knUox6z2hv80ytZYwO9f7vsp2Db16W54PA4lwcqpo030
1zGV27qW+oYmWbYcmZcecfl/4Rh/A5+9l6zvlK/8aBrCfmHKSaNZBZqQk5DiG0sS
4Kvkeb52rosnnEHqx5Ph
=LizJ
-END PGP SIGNATURE-


Reduce CPU usage of PulseAudio on NetBSD

2015-12-22 Thread Kamil Rytarowski
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

The simplest way to reduce >90% CPU usage to <1% on a NetBSD host is
the following set of two commands (assuming running daemon):

pacmd "unload-module module-oss"
pacmd "load-module module-oss mmap=0 device=/dev/audio"

In general there is an assumption of Linux-like feature to efficiently
poll(2) mmap'ed region. This operation is very slow on NetBSD.

This is a temporary walk-around, I will be looking for a permanent one.

Credit: mlelstv and medfly from #netbsd @ FreeNode.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJWeej7AAoJEEuzCOmwLnZsBegP/0MisTeZQ8Xmn67yI7ijvDAi
EQKopIdmLpk3onKlU9xb8F5nXpTy9nzII2WnuDsAjlpPXauWx+AcdFMUZ/wlM/Fm
JwVVYv3mIkqOnsdRCM/UExgreCL3xo9khVPsMeBYGjhkTb9etLGXuRiw5T5Hh9sN
jV8+KWD/JuFYp1Ug0vYcX1VhJZK8uMQY6oFhh13JHDVUBjJ3UNVN+ZZMuh6YV4Is
SAqnLp8DJ0/DDmNsZSo+1l1l3Euh4+wE0IDlPs/FmW/+A5Fz6W2ff3145pVtXiYV
FQRAXTicE8OeupvT3UxWB+tzwJAyrY6gXaqYDMxouJ27v/RcCBAs5NWYnniCnam9
B9Wj1he3LvUKQjYMD6WkG6AHvRU5i3yvYqSajZIcsvJOKSGl+FlhTVnELXDnz5yL
zEKskH74LsStxDW+Q4u34Mh20lUrSzLsfy1byhIsL7ZdIbY8YbtcdzT+8yDdDw/e
kSYVbAeFqfazaDgOYqe4leqQpJ888Of4saoct8T2z0/RZWBJ1oRqoj/Lroopj9Hp
36t5awogZwtVW4Vq5sVmYRbFa8BSgr2H/YVxZokLwgHpdgBzH4b7AODIGkjPDkW4
6jhAagFDq3DbkAqaT+H/QE4/MZm0wvEQDsKgANYW/PdNEW5V+QD7eaeEz0nH57hh
Nh4Eeic/w0XUimCeQ02L
=+2Mi
-END PGP SIGNATURE-


Re: Fwd: Problems installing NetBSD 7.0

2015-10-11 Thread Kamil Rytarowski
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 11.10.2015 08:30, Michael van Elst wrote:
> n...@gmx.com (Kamil Rytarowski) writes:
> 
>> I have likely the same (or similar) issue with my amd64 box.
>> There are 4 physical cpus x 2 hyper-thread = 8 cores. From time
>> to time it doesn't want to boot due to this issue (looks like a
>> race).
> 
> Which one? The wd failure?
> 
> 
Yes, this one.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJWGifrAAoJEEuzCOmwLnZsv4EP/04mb0t/1n89L/K5IgebFwXZ
9NZlLNyEeZRliLDI9rLoyTl5rWqzH32XT4Ws6kWy/Z4p9Poe2jlg0vToIOcj4XUD
Hhovy6vtHOSM33GQZ7nrtGfAkAc/DUh/XpZbeyJ/dEPYmV2wyp0ug20LlhzsvbD7
yu7XbkFDazqT5aGUAkVzgZpfidczzdG1cdYEhj4aaykFEO3KCk4L+3xQeuZXF4Aq
fKiGq2vY5/C8QTOYyGH3rkFescV2GZWuDnqIKZWHHyctvn/LihFLu9FKeyfQeMPo
OUqDxWfrvNvbs3H3GT7+uCfmPVu+j/LwEO1UZLeeomfnISvF8rabLzB3LYWvMTwD
5GR9VHZuJaZaA8weuenudycX/Et9pQz3KIcBqh/ZJdMntausFt6HC8NBzawrn7oi
X8WCh+23zSHeN9G9CCUs7zlOmkPHnMoJ5C/nEEPBcIzmo3X/eXSu/ZHrNli8efkH
SW4dfB9uJlAcqLHQmrwQLZcPilcC7CegEPcUitQJq8/RBfk7z4NmbT0bQfbwgPKh
OXyJVbwORieEXi8vlaxakxx/bCviKBYfVXYwQKgKM1UFPtVRO01jgYu/rhDOE0s3
Jy9PJ2yvUIHHnaJLXP/AeUkBJGLfPeE4Im4uVtzyQ4mw89oRgj0Iu7UsYvHpbgLC
SLkqLAn9Wq2FI+zoU0uh
=zsaL
-END PGP SIGNATURE-


Re: Fwd: Problems installing NetBSD 7.0

2015-10-10 Thread Kamil Rytarowski
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 10.10.2015 14:00, Fredrik Pettai wrote:
> 
> Begin forwarded message:
>> 
>> http://phoronix.com/scan.php?page=news_item=BSD-Linux-Late-2015
>
>> 
> The installation of NetBSD 7.0 didn’t work smooth for the author of
> this article, and the same happened for another sysadmin I know.
> 
> Someone should have a look at this to see if this could be fixed.
> 
> /P
> 

I have likely the same (or similar) issue with my amd64 box. There are
4 physical cpus x 2 hyper-thread = 8 cores. From time to time it
doesn't want to boot due to this issue (looks like a race). My
walk-around is to safely reboot. Perhaps the probability of it
increases with the number of cores (on the screen there are 10 CPUs
listed).. I will try to have a look at it.

I've found also issues in compat_linux(8), on 2-core amd64 it works
smoothly, on 8-core opendylan (wip/opendylan) can easily panic the
kernel in the futex subsystem.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJWGalcAAoJEEuzCOmwLnZsY1AQAKovqQRjcIllAlR8iv5z3qdq
/Lt3+wmnRgroi8BYAVFuT915Zsy86Std+l1f0nVhg3lfK+PWVlTVHPf1IFfwVCHZ
wRXCrpKC6iXOmXsdIdsKhPm+aJQ1xm9EOmjb9O44rm/b/ekReRVkX4TQ0jh/itZi
zyvaJbWyZkuV+rDO9YM2ssA+FCmn8PYCAegHVQiy/peXR1KcOqNLrYKL/weIPx1D
aCE9F5DCHSFPtv+zRkIBRcAHYDOzucR6Zx2iXDtWnLyYTIhN+cdzRJC9q5eWzPZu
WEaHnAPvb8X+0j17GKFs2DlvjhloP1VC4TOsN1gIJv/6oIx28cJa6MPfo1tHGF/1
VLZVTuIFVS03KxZyJ9/F7H9C8u0f50D8teYBj+txiJvcQAns6cfcUQnxPjaZv34/
GmYF19JoZHZ1b2VGT/pN48Y1LAvzfoVopTGiFWF2wN0QqYJ9E/UsYrmJ+RZPvj7Y
Gq0FShlk3++NHucHN315qX9f56+gIypCXDnc2SYkPldg6eVIBIODZHuepuOLEymp
Lq3CSzYyZtQM0+N7+Ouc40BfoTGHQAkidQQDi53ticfCVegK0kf7asd50Db6Ao0u
Y7VIq/K4QnPfteg9mosrPo0qFV4b2ZQfwAsB1AR3z58PCjhJwr4bNy4odfuB9XEx
Y6w9hXK+yy1emQkksi+4
=A6s4
-END PGP SIGNATURE-


Re: Upgrading from rc3 to NetBSD 7.0

2015-10-09 Thread Kamil Rytarowski
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 09.10.2015 08:18, Ottavio Caruso wrote:
> On 8 October 2015 at 23:00, Soren Jacobsen  wrote:
>> The NetBSD Project is pleased to announce NetBSD 7.0, the
>> fifteenth major release of the NetBSD operating system.
> 
> Hurrah!
> 
> I have NetBSD 7_rc3. Should I bother upgrading?
> 
It de[ends of the use-case. You should upgrade if you care about
pkgsrc packages.

> Can I just install the security updates?
> 
> What is the best way to upgrade? Clean reinstall,  sysinst or 
> sysutils/sysupgrade?
> 

Lately I found sysupgrade and it works great.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJWF3bUAAoJEEuzCOmwLnZsu9AQAMOiQ7rAvwBkcUX0QXabkYbQ
vxEZjCXdpX6vH70wCiCX5PbLbrtgBtOo2nrcFrt2DgjynKoS+DVNLj1z1w9fWbPH
55YpxM2kRckAJRWX8RGN99+gtwW2pUMltrz1K8/YLBT3WY3aAzj+LSpvlLnGm++q
vfhE1WDHjNz5aqjBTxhlIR2MLEwWO8M5swbA8aehkEsspm8DvVNchtGULWu0wnFN
X925EOkTK/Lqrw4wyQ0Rz3uoknMjn+EKdshDMeWAo3z3nRfa7WUeB8+kd2voGCp2
6ABJvAgHQnb3QPSu7hslb1IgXLnNZ/gCB3zPTKfZESWUqLo++mimjox1xwAePdxB
dDNoZYByfPujEuALbsT5fPdY8J7EhrFHVvOqui4AaAFWdePauRo4Mz522k3tro2X
G4XyJzf6c5Iv/Nexrya7JgramzPeRk/iBwOpFNWjg9REpDD71XgxvYBvfgtZ3dU+
in5NDBDMt3dUrBB5d3Urjdp2WSYaCxjQ1NHsKPSFozopkRy78mNBWdzuFtQ26RtI
TXxgdoH8EJV01weJ5p4H0QAIn//d8Rk6OGIMWpa5Mvnqnjny+zHFcbCbadNCNEyv
R/8y13OV5A+larECnOro6y1ApbfHkocHA/QwbxsfZqNDEcaEyy/RTvjO1FtvBfra
qcD72g5CW48mSBH5ILxV
=wyO8
-END PGP SIGNATURE-


autoinst.sh for GPT

2015-10-04 Thread Kamil Rytarowski
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

I've prepared a script to automatically install NetBSD on a GPT disk.
It's tuned to work in an environment with constrain set of utilities,
optimized for boot.iso and boot-com.iso.

ftp://ftp.netbsd.org/pub/NetBSD/misc/kamil/autoinst.sh

Q: What does it do?
1. Partitioning GPT (ROOT + SWAP).
2. Fetching sets and unpacking to new disk.
3. Introductory setuping fstab, root password, bootloader, rc.conf
(sshd, dhcpcd, hostname).

Q: Is there a usage() string?
Yes, here you are:
autoinst.sh [-s swap-size-mb] [-S swap-size-blocks] [-r root-password]
[-c console-type] [-C console-speed] [-h host-name] [-p] device-name

Where:
- -s|-S set swap size in megabytes, the rest will be used for root (ffsv2)
- -r set root password from command line (insecure, this is just to
deploy a machine without empty password)
- -c|-C options to tune for serial usage, e.g. inside qemu -nographic
- -h your desired hostname (default: netbsd)
- -p optionally fetch the stable source release of pkgsrc
device-name stands for hardware device name, eg. wd0 or ld0 (virtio)

Q: How to use it to deploy a new installation inside KVM?
1. Create qemu disk
qemu-img create -f qcow2 netbsd7.0_amd64 10G

2. Run installer
qemu-system-x86_64 \
-enable-kvm \
-net nic,model=virtio -net user \
-m 2G \
-cdrom boot-com.iso \
-nographic \
-smp cores=2 \
-drive file= netbsd7.0_amd64,media=disk,if=virtio \
-boot d

3. Fetch and run autoinst.sh
Exit to shell from the installer (sysinst), type ctrl-c, and next:
cd /tmp (enter writable directory)
ftp ftp://ftp.netbsd.org/pub/NetBSD/misc/kamil/autoinst.sh
chmod +x autoinst.sh
./autoinst.sh -s 128 -r mypass -c com0 -C 9600 ld0
(take a coffee break)
If everything went OK, just type:
poweroff

4. Run inside your newly installed system
qemu-system-x86_64 \
-enable-kvm \
-net nic,model=virtio -net user \
-m 2G \
-nographic \
-smp cores=2 \
-drive file=netbsd7.0_amd64,media=disk,if=virtio \
-boot c

Q: Why to bother with sshd and serial?
Because it was designed for two types of environments:
1. A setup without vga/console output, after the system installation.
Every fail will result with an automatic intervention and need to
boostrap installer from scratch.
2. A setup for just console interface through qemu. It's fairy more
suitable for me than vnc.

Q: Where does it come from?
It's a fork of autoinst.sh by asau@ from
ftp://ftp.netbsd.org/pub/NetBSD/misc/asau/autoinst.sh tuned for my
needs. It's rumored to be a descendant of a fossil of real world
deployment script.

Q: Credit? License?
Most credit should go to the author of the original autoinst.sh (asau@).

Please treat my changes to the original version, as a BSD/MIT licensed
work - use it entirely at your own risk.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJWEe4/AAoJEEuzCOmwLnZsvbMP/1m2xK+MQB0d4Jp4yH53s0uL
VlSqmi++4PUZsyEUWRgKnTpSqDM/Jvum2DHseqzvT9txC2wOVLSkgP4pDa5V7pLz
vSTiSnIBcU3O4RJ17SgfGQNR9E2n9fVoCSc/BpnZ4b+3vlWMt8Zw5yRu/rAHTQmO
n2FCFy3Ut+KQf+Zkb8gZNbHbflB9KUVmw2uq8z+OutGdnkAcHyTiVHyhCUnc8ZBj
6GB4knYacxET6MtRnYxDIJ/+2S7ev5bUGCLLCrf7rTIbtnmySsh63WsLylUIjoqu
vgVVjaXpdKkOq5WDU0leLB1skksQhhM7EZzydiUrVl8uzouL/GN4R5R9I3t0/AuU
lEhZ78EtYlt8st8V+eGnB5FFuRW7Yhskc5vekJPvlSoEbCJrcLrkJ9cofaT1ptF3
3gniLW2hVb1ZOx7BUrmc6X0moW07DwmNo0RtqzoDdb3fLr2DtmLgfz4ixNxT0b+B
9DnfrW4ICnbmg0ILqWg/kPLo+B8qEjiGAyhV9MNd729DhSWPWD9CdFAYV9Ml92U+
To4V5d0Ip6H9wI5I3/XoqbQiCNyuWXGxkc2fuIhPw8cFwDd0uzdKdp5XqlIpn/Xa
XUq6shKyQ8HOQy2G3W4OzvqLkQubGzuhjiKeRIclbOVlEnK7KKrkqfdjmRXB/Uxz
ue9xHGs2jh+/oF99Yg9j
=76yM
-END PGP SIGNATURE-


Re: Java ME toolchain on NetBSD

2015-08-24 Thread Kamil Rytarowski
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 21.08.2015 11:40, David Brownlee wrote:
 On 21 August 2015 at 10:23, Kamil Rytarowski n...@gmx.com wrote:
 
 I have got a new fancy utility with support for Java ME applets.
 
 Is there a way to build j2me 'hello world' application on NetBSD?
 I don't need the newest toolchain, neither IDE with GUI - just
 plain command line compiler is fine.
 
 We have a small J2ME app we're still supporting under PhoneME on 
 Windows Mobile devices.
 
 For building we just use openjdk8 with source  target set to 1.3.
 It works well enough, providing you avoid String.isEmpty() and
 suchlike, which will build fine but fail to run on the target
 device.
 
 target name=compile !-- The client needs to run under PhoneMe
 on Windows Mobile devices, which is a subset of the J2SE 1.3 stack 
 -- mkdir dir=${build.dir} / javac destdir=${build.dir} 
 debug=true fork=true memoryInitialSize=512m 
 memoryMaximumSize=1024m source=1.3 target=1.3 src
 path=src / compilerarg
 value=-Xbootclasspath/p:${bootstrap.class.path}/ compilerarg
 value=-proc:none / !-- compilerarg value=-Xlint:deprecation
 / -- /javac /target
 

Thank you! I will give it a try.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJV24RSAAoJEEuzCOmwLnZs4pcP/10ToodBhsRQAaZV27ddNTlc
jWXqDBV8U7UdiHRPGWjoRW6vYA5hASuR+YeoQEYOOxnxuKZvIkJZHLA5xF0es0uZ
istUgbSXGwncX+e0dWq1KPoxVBcna/BzUZgaaKO8QCMBs0eIyiOS1nc4br1O8igt
3hOGMzDQoPoWJAtf5pQnlw4ssL1A5+256kOTX/V8GU0u3wXZuOc4Kb9YQ9nqqgOZ
zpZbTGkghAFnSmnP/5dX8AlMoo3532S3gt32Hu69vKfBqoJjivfKMDkVRJ8xw5EJ
g7u6CtNAsYZ0xqqzXGiDUbWyaYc7HRsZaevlGs8Ud89cJHvnZvhXzi8KtzgaeFpJ
CxdxwOeQWGt/BWecsNkUDXsqt0QuwJ7u8I3mYUZPHp/uKMw2gcNc3LVT0saIWZ7H
4PULVhSHHDmYcum0gmJhG9GEktCaN9mLLMwbAku7IK1wBw7RJBXKbQSxQXw06Q7N
SG/l52NfjpO6teP/JLM/srke6lH6XMy1Hz+m54We/IwnGs1rwqH04IyKYJDU8GDY
sZ+hlT5Vq/zbamxC+vtq08G3/31EQQRflzhdbJCsUCDtW1xa7JX1+IUk00jcuTps
PC8SRbe4biQkJBr2TRenfDfsi6RelOFy6Dpq9VzPBYqWwUEkurOgBX+2TXQCHUKG
aats3Ocu2Npg88Y5TndI
=o549
-END PGP SIGNATURE-


Rump kernel - how to make an omelette without breaking the kitchen!

2015-08-21 Thread Kamil Rytarowski
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

For all Polish speakers,

There is a new article in the current magazine for programmers about
principles and design ideas of the rump kernels. It should hit Empik soo
n.

http://programistamag.pl/programista-7-2015-38/

Rump kernel – czyli jak usmażyć omlet bez sprzątania kuchni

Technologia rump kernel oferuje zbiór gotowych podsystemów
pochodzących z kernela NetBSD, a wśród nich: systemy plików,
sterowniki urządzeń oraz stos sieciowy TCP/IP. Dzięki temu, że
wyekstrahowany kod z jądra NetBSD jest niezmodyfikowany, oferowany na
liberalnej licencji BSD, dojrzały i przetestowany na wielu platformach
sprzętowych, nadaje się on znakomicie do budowania w oparciu o niego
wysokiej klasy nowych specjalizowanych kernelów czy uruchamiania
aplikacji POSIX-owych bezpośrednio w przestrzeni użytkownika, na
sprzęcie fizycznym lub w środowisku wirtualizacji takim jak KVM czy Xen.


This is the third article on NetBSD kernel programming.
The first one was about dynamic modules and the second one about
locking and interrupt control.


http://mail-index.netbsd.org/regional-pl/2015/06/21/msg18.html
http://mail-index.netbsd.org/regional-pl/2015/07/15/msg24.html
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJV1ur3AAoJEEuzCOmwLnZsFxMP+wUG3bvkutC9o6SG3AzImHWg
jnBsXMDUtEKatSBe4g0YNh2bgRqOB2YYjJN8LdLryTqtTk6IPyfY2Cy+ubemKHvf
frdq9UekwaZoVG/B8YgBA2YQhUhxEy/FiAxqkJHJA92cS9sOjuTbTxCs1gApfTGF
4DGAnW8LvKwqVUZdyT25sz1yGAJ7wVP0jZHpvk9qFtS0bakssBegOH2zTyLVr5pW
tzf/HQNbcjgpLAklm+XkQhILxDYo9GtbFMXT28SXebeaOo6WlRp6zzw3bhzOBIiu
wk1uRF+/wlvR0m8Wn7spfcJ1k3KyvpAre9ggNT0HmctXmtyVZygzJTH622VEwuVd
++ddvL1o15325Q1skX3WqB3j009ASfUOBXP71tPh4oSS66m+tgDYwDgLgJAsUs1h
j5PdqX7jNDiNK3yFjc27WL50pSxXj4uXXg0SYL2yr3yLE41agyl6vH9uhPsqVC6+
JaRNdx6LJd977Lsy589VEDYlTmvasZapEIzbaFv9rbCIkzzzKxL8x7wfUBxvbQd9
GQoFRzFpbk09/odaE/ksjsTdbULKts2U8Yf0kaiodR34SXwsgfkiQUXiHCMPkugt
zmK1CdNjNJnjWRQDhkTj1602waW9EsvnzIHcC6AYn3ARi4tmJNJ5hQ/PTLgZODWr
at5KtGwO6jMbuIZRqypk
=re/G
-END PGP SIGNATURE-


Re: Wheel behaviour

2015-08-21 Thread Kamil Rytarowski
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 21.08.2015 23:09, Bob Bernstein wrote:
 So I am surprised to see that when, as that user, I type 'su', I
 am propelled into root user status without needing to enter a
 password.
 
 Thoughts, anyone?
 

Please check whether your root password is empty.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJV16UdAAoJEEuzCOmwLnZs0xIP/1zrFmtAkWJ77V2zOBkn1LBD
C5u72jxyjFNpOcz3WLxLs6jJ4kAM/IGGzi182sLqfGnLcwnVhD0Zcl9Stcqc1f1y
4hsYEk/zuaKg8CYjretcyW54jiZ4vWN8WPvXRIGdipZS9yVT81z2tu0On0LeqK+C
aPjhY9IICLcytomUpk5oKy+E68w2MJZ+rhOkPVBOAi4lfVX7HGpytoqG9lkOIYm7
HEEnpGXlC9lTHTN6b+sZ/hVZNNfBSWTbdyAvfnRrl1qjqVqnfkj/oRf2G467Jbz4
v/HRCwnAnNuq3wEZwrQshQulqcDCvuF0+QFSUKKySDNW73h5RR32lKyOb+RTCSbW
zPTVMM87qm0kukwigRGL8NMxafOsj0DxYdDHfsmUTcQuVbeZ5PpolIOabj8AmDfw
Ef/oD32mWC9+VccFuR46b1rWi7sPnl7Q6N6IJno46/WfXq9lId75TO2xKW5mdgaP
YEim2PYzd4GZcXeFjAS8ESPzc8RCgrJ34EV0RaYx/01nqy517GurdvsHb/SNimbI
P6pjw+L/sE5tAW6FzBDWVF/hskIP7faKx8CzTRm7iA0wCQZVd697gj1KlfoF6/7J
Aj3BFKF3F35ZKXQmCXOJqw0m6riwLdg/KzzVfd0Q8yAJmYf76hbNzMSGd+MSr579
iTNed6vADAQHJ6AUU1Al
=IEPV
-END PGP SIGNATURE-


Java ME toolchain on NetBSD

2015-08-21 Thread Kamil Rytarowski
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

I have got a new fancy utility with support for Java ME applets.

Is there a way to build j2me 'hello world' application on NetBSD? I
don't need the newest toolchain, neither IDE with GUI - just plain
command line compiler is fine.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCAAGBQJV1u33AAoJEEuzCOmwLnZs1e8QAMdrzWB/ORvxBzM0yiU3B5f5
GVhukM81m1m8aEVhhjO3Ci7bGWETG4BM3wxZKmXNiClkGDYK4o1bNyLQTYNENCQu
AhYkvnBsf0OLT08qv3Muhhuw2/HS0CPXad39Z9WUztRANQhIiCekM6i9IQqvMMLm
2On/xTdlEuxXNhpyELh0UntYUDMp2vldnVRv12I0YkN5XOV9XGjrrSBgiETzTyQ7
Ywuzc/I+7/fynQdUX/g/UJ11w/9JVOWZINbuhiKr0l1EmOnNpx4rE5mIpPrDOpli
ZMTv43oJIlDxi28BsxMjzQALiQGBagKv37Dj8x1XsOyDxuNdV7S2Bxr4hdp5kCzV
xu5AzcP+jQ7tb2XbFFAKAB+SXM4ST92yzJl0ATPcqFlJfNI6ptuv8HOIWqqtHQFF
trD2pHGwX/Q1t/U+jK84nBB9YVgpoezKMUkMdnhlYAWT48lIYG6GSq4UwdDYaVHL
h78MHbffLOlRnh6lVZXFZPotx4C77F4H4ETsaoGXZx2lj+exuRC1w3h2iQUBUtRF
ojuADE5rgLcsxvyBYRgwt28D+Ozq7ZFSHbye/xiRI7QLat6JEGzD1ELLrGuhRr05
t6UK6YVMrXTmTjYFr7N7uEhUux2sSvLKlCHooSb8evv1I3lzi1kQus1gxzQrDLIM
NSdr4CC4wg0ZPmYJ3bQa
=eaQ2
-END PGP SIGNATURE-


Re: Security and PAX

2015-06-06 Thread Kamil Rytarowski
On 06.06.2015 14:35, Christos Zoulas wrote:
 In article 20150606142015.ga61...@nordend.local.sourire.ch,
  rhin...@epost.ch wrote:
 Hi,
  I am quite new to netbsd and I am curious about 
 the security mechanisms available.

 In the security page http://www.netbsd.org/support/security/;,
 I can see that the PaX module is used in the kernel
 but without any other information.

 What should be done in order to use (and perhaps configure)
 that feature?

 Sould the executables being compiled with the -fpie option?

 Any comment would be greatly appreciated?
 
 $ man 7 sysctl look for pax
 $ man paxctl
 
 To use ASLR effectively you need to build with MKPIE...
 

I saw more PAX / NetBSD pieces here
http://git.edgebsd.org/gitweb/?p=edgebsd-src.git;a=commitdiff;h=add2f1731f9468f3946bf8fea6cc48800c0f2668;hp=ba131ddbc3427f6931d123e93b82a339a879fb78


Re: Request to reconsider removal of groff from base system

2015-04-05 Thread Kamil Rytarowski
Greg A. Woods wrote:
 At Tue, 31 Mar 2015 12:24:51 +0100, Gerard Lally 
 lists+netbsd.us...@netmail.ie wrote:
 Subject: Request to reconsider removal of groff from base system
  
  As someone who uses groff as a lightweight alternative to TeX and
  friends**
 
 I would argue that groff is far from lightweight, even within the
 confines of Troff-like systems.  :-)
 

Well to not talk about the license and GNU I'm in favor of removing
and never including back groff because it's C++.

If the author is familiar with groff I see the solution in changing
the preferences, but add in providing textproc/groff-minimal to
pkgsrc. Probably with a man page in the NetBSD base with description
what happened to groff, and how to get it back.

Not everybody tracks the ChangeLog, README, Release notes.

Probably the same applies to window(1), today in misc/window.

 If you want a truly lightweight version of Troff you should look at the
 old Mark Williams Company COHERENT version, now freely available:
 
   http://www.nesssoftware.com/home/mwc/
   http://www.nesssoftware.com/home/mwc/source.php
 
 The full source for their troff and macros also appears to be included
 in their full documentation archive:
 
   http://www.nesssoftware.com/home/mwc/doc/doc.tgz
 
 It is only about 10k lines of C.  Total.  It seems to be trivial to
 build it on NetBSD, and it seems to work too, though I only tried the
 most rudimentary test.  No other goodies though, like pic, eqn, tbl,
 grap, and so on
 

You have surprised me.

I was looking at the Coherent sources and planned to cleanup it, extract the
sources and make use of it. There are more goodies like the kernel, C compiler,
documentation.
They are KR goodies for 286 where e.g. on-line pages are plain .txt files.


Request for mentorship

2015-03-29 Thread Kamil Rytarowski
Hello,

My name is Kamil, I'm 28 years old and I'm from Poland.
I use systems evolved from the Unix V1 prototype since late nineties.
For the most part of this time I used the GNU/Linux.

I was an apprentice in the mentoring process in the Mageia
distribution for 3 months and I was a packager there for a years or so.

Since mid 2013 I'm a happy user of NetBSD.
I would like to join the dev team and contribute my code directly
to the project. There is a bit of my code and it will be likely
easier to maintain it with commit grants.

My major places of interest:
- _OPENBSD_COMPAT (libc and hopefully pkgsrc),
- AdvFS (kernel),
- ATF checks (tests),
- making software compatible with NetBSD (pkgsrc).


Re: NetBSD for the dekstop

2015-02-17 Thread Kamil Rytarowski
Stephan wrote:
 Hi!
 
 Is there anyone still interested in bringing NetBSD to the desktop?
 

By NetBSD on desktop I understand to have:
1. A choice of using full featured main modern DE: KDE4, Gnome3 and their 
relatives like MATE.

2. Stable DRM (X Window), slacking USB cable not panicking the system (it 
happens to me often, as I'm connected to internet via USB), support for more 
NICs.

3. Graphical installer.

For the installer part I was talking with the authors of Calamares 
Distribution-independent installer framework ( http://calamares.io ). They 
are willing to accept patches for NetBSD, but they won't write the code 
themselves.

With Calamares it could be possible to produce a amd64-oriented CD with 
preinstalled desktop packages.

I know that NetBSD users live without the above features, but to penetrate the 
desktop share of common users they are needed.

BTW. I use NetBSD on my home desktop with dwm + terminator + firefox.


Re: cksum new parameters -q and -r

2014-08-20 Thread Kamil Rytarowski
Alistair Crooks a...@pkgsrc.org, Tuesday, August 05, 2014 at 10:46 PM
 Just provide the file as stdin, e.g.

 % md5  Makefile
 c484c4693b61f058087c0bb84091adfb
 %

Hello,

Thank you for your reply. Actually my idea was to omit pipes (as my tool 
doesn't support it in an unbitter way),

I've just pushed the things forward and did a research. NetBSD ships with '-n', 
an equivalent of '-r' from FreeBSD and OpenBSD. The quiet (-q) mode was added 
and the patch against current is attached to this mail.

I'll submit a public-report for this task along with the patch and link to this 
thread. I'm open for comments.

Thanks in advance,Index: cksum.1
===
RCS file: /cvsroot/src/usr.bin/cksum/cksum.1,v
retrieving revision 1.45
diff -u -r1.45 cksum.1
--- cksum.1	28 Mar 2013 22:54:25 -	1.45
+++ cksum.1	20 Aug 2014 22:57:25 -
@@ -47,32 +47,32 @@
 .Sh SYNOPSIS
 .Nm cksum
 .Op Fl n
-.Op Fl a Ar algorithm Oo Fl ptx Oc Oo Fl s Ar string Oc
+.Op Fl a Ar algorithm Oo Fl pqtx Oc Oo Fl s Ar string Oc
 .Op Fl o Ar 1 Ns | Ns Ar 2
 .Op Ar Li \| Fl c Oo Fl w Oc Oo Ar sumfile Oc
 .Nm sum
 .Op Fl n
-.Op Fl a Ar algorithm Oo Fl ptx Oc Oo Fl s Ar string Oc
+.Op Fl a Ar algorithm Oo Fl pqtx Oc Oo Fl s Ar string Oc
 .Op Fl o Ar 1 Ns | Ns Ar 2
 .Op Ar Li \| Fl c Oo Fl w Oc Oo Ar sumfile Oc
 .Nm md2
-.Op Fl nptx
+.Op Fl npqtx
 .Op Fl s Ar string
 .Op Ar Li \| Fl c Oo Fl w Oc Oo Ar sumfile Oc
 .Nm md4
-.Op Fl nptx
+.Op Fl npqtx
 .Op Fl s Ar string
 .Op Ar Li \| Fl c Oo Fl w Oc Oo Ar sumfile Oc
 .Nm md5
-.Op Fl nptx
+.Op Fl npqtx
 .Op Fl s Ar string
 .Op Ar Li \| Fl c Oo Fl w Oc Oo Ar sumfile Oc
 .Nm rmd160
-.Op Fl nptx
+.Op Fl npqtx
 .Op Fl s Ar string
 .Op Ar Li \| Fl c Oo Fl w Oc Oo Ar sumfile Oc
 .Nm sha1
-.Op Fl nptx
+.Op Fl npqtx
 .Op Fl s Ar string
 .Op Ar Li \| Fl c Oo Fl w Oc Oo Ar sumfile Oc
 .Sh DESCRIPTION
@@ -191,6 +191,10 @@
 .It Fl p
 Echo input from standard input to standard output, and append the
 selected message digest.
+.It Fl q
+Quiet mode \(em only the checksum is printed out. Overrides the
+.Fl n
+option.
 .It Fl s Ar string
 Print the hash of the given string
 .Ar string .
@@ -323,6 +327,10 @@
 .Pq Fl c
 first appeared in
 .Nx 4.0 .
+Quiet mode
+.Pq Fl q
+was added in
+.Nx 7.0 .
 .\ .Pp
 .\ The
 .\ .Nm sum
Index: cksum.c
===
RCS file: /cvsroot/src/usr.bin/cksum/cksum.c,v
retrieving revision 1.46
diff -u -r1.46 cksum.c
--- cksum.c	18 Oct 2013 20:47:06 -	1.46
+++ cksum.c	20 Aug 2014 22:57:25 -
@@ -104,6 +104,9 @@
 
 #include extern.h
 
+#define PRINT_NORMAL 0x01
+#define PRINT_QUIET  0x02
+
 typedef char *(*_filefunc)(const char *, char *);
 
 const struct hash {
@@ -157,14 +160,15 @@
 	int (*cfncn) (int, u_int32_t *, off_t *);
 	void (*pfncn) (char *, u_int32_t, off_t);
 	const struct hash *hash;
-	int normal, i, check_warn, do_check;
+	int i, check_warn, do_check;
+	int print_flags;
 
 	cfncn = NULL;
 	pfncn = NULL;
 	pflag = nohashstdin = 0;
-	normal = 0;
 	check_warn = 0;
 	do_check = 0;
+	print_flags = 0;
 
 	setlocale(LC_ALL, );
 
@@ -186,7 +190,7 @@
 		}
 	}
 
-	while ((ch = getopt(argc, argv, a:cno:ps:twx)) != -1)
+	while ((ch = getopt(argc, argv, a:cno:pqs:twx)) != -1)
 		switch(ch) {
 		case 'a':
 			if (hash) {
@@ -221,7 +225,7 @@
 			do_check = 1;
 			break;
 		case 'n':
-			normal = 1;
+			print_flags |= PRINT_NORMAL;
 			break;
 		case 'o':
 			if (hash) {
@@ -245,6 +249,9 @@
 requirehash(-p);
 			pflag = 1;
 			break;
+		case 'q':
+			print_flags |= PRINT_QUIET;
+			break;
 		case 's':
 			if (hash == NULL)
 requirehash(-s);
@@ -310,7 +317,7 @@
  * Assume 'normal' output if there's a '('
  */
 p_filename += 1;
-normal = 0;
+print_flags = ~(PRINT_NORMAL);
 
 p_cksum = strrchr(p_filename, ')');
 if (p_cksum == NULL) {
@@ -364,7 +371,7 @@
 	/*
 	 * 'normal' output, no (ck)sum
 	 */
-	normal = 1;
+	print_flags |= PRINT_NORMAL;
 	nspaces = 1;
 	
 	p_cksum = buf;
@@ -468,7 +475,7 @@
 			if (*argv) {
 fn = *argv++;
 if (hash != NULL) {
-	if (hash_digest_file(fn, hash, normal)) {
+	if (hash_digest_file(fn, hash, print_flags)) {
 		warn(%s, fn);
 		rval = 1;
 	}
@@ -497,7 +504,7 @@
 }
 
 static int
-hash_digest_file(char *fn, const struct hash *hash, int normal)
+hash_digest_file(char *fn, const struct hash *hash, int flags)
 {
 	char *cp;
 
@@ -505,7 +512,9 @@
 	if (cp == NULL)
 		return 1;
 
-	if (normal)
+	if (flags  PRINT_QUIET)
+		printf(%s\n, cp);
+	else if (flags  PRINT_NORMAL)
 		printf(%s %s\n, cp, fn);
 	else
 		printf(%s (%s) = %s\n, hash-hashname, fn, cp);


Re: Reliable way to run emulated Linux under NetBSD

2014-08-18 Thread Kamil Rytarowski
Hello,

Thank you everybody for your private and public feedback.

To dot my I's I'm going to give the solution for people looking for a solution 
how to run Linux in qemu / NetBSD and have it usable, so in my understanding 
with networking between guest and host and at serial connection.

To spell it out, finish the topic and don't produce off-topic over here 
(neither to go into non-generic details, so I will skip USB ports pass-through 
configuration-details), the formula is as follows:

1. Get ingredients:
- qemu from pkgsrc (tested with 2.0.0, from pkgsrc-2014Q2)
- get your favorite distro (Slackware64 14.1 confirmed to work)

2. Create image with for a hard disk [1]

qemu-img create -f qcow2 slack_hd.img 20G

NB. Full Slackware installation requires at least 8-10GB. 20GB is sufficient 
for basic hacking.

3. Install your favorite distro

NB. You may need X Window environment here.

Run installator inside your qemu machine:

qemu-system-x86_64 -cdrom image.iso -hda slack_hd.img -boot d

At the boot menu you must use (or the guest will crash down) additional kernel 
parameters 'noapic noacpi'. After system being loaded, perform standard 
installation.

4. Setup serial connection in your guest

Execute:
qemu-system-x86_64 -hda slack_hd.img

And now follow standard steps relevant for your solution, eg. 
http://docs.slackware.com/howtos:general_admin:serial_console for Slackware.

5. Setup tap-networking and bring the system up

In your NetBSD host:
ifconfig bridge0 create # Create bridge interface to link tap virtual devices
ifconfig tap0 create # Dedicated as a device piped with qemu's quest
ifconfig tap1 create # Dedicated as a virtual device for host
brconfig bridge0 add tap0 # Bind tap0 to bridge0
brconfig bridge0 add tap1 # Bind tap1 to bridge0
ifconfig tap1 192.168.0.2/24 # Setup host's interface address
ifconfig tap0 up # Bring it up
ifconfig tap1 up # Bring it up
ifconfig bridge0 up # Bring it up

Now run qemu as follows:
emu-system-x86_64 -hda slack_hd.img -net nic -net 
tap,ifname=tap0,script=no,downscript=no -monitor stdio -serial 
telnet:127.0.0.1:3000,server -nographic

This will run emulated x86_64 (amd64) system, with a network device over tap0, 
without up/down network interface scripts (we have done it manually) [2], 
qemu's monitor over stdout (it eases control over guest), serial connection set 
to telnet at localhost port 3000.

Now in your guest machine:
ip link set eth0 up # Bring it up
ip addr add 192.168.0.1/24 dev eth0 # Setup addressing

And try to ping host from guest or the other way around :-)

Cheers and EOT! Happy hacking,

[1] http://en.wikibooks.org/wiki/QEMU/Images
[2] http://en.wikibooks.org/wiki/QEMU/Networking


Reliable way to run emulated Linux under NetBSD

2014-08-13 Thread Kamil Rytarowski
Hello,
 
I'm looking for a reliable and flawless way to run emulated Linux (GNU/Linux 
distribution under some tool). I'm using i386 and amd64.
 
I was trying to use qemu (from pkgsrc) for this purpose... but I can't progress 
farther than grub boot menu. When a system is supposed to boot all I get is a 
black screen and 100% CPU usage. I was trying to use a few of popular desktop / 
livecd Linux distributions (from downloaded .iso).
 
I don't want to dual-boot or get a dedicated physical machine.

Last time I checked XEN, I had fatal issues with X Window under dom0, but it's 
another issue.

Do you run GNU/Linux under your NetBSD? If so how? What's your .iso? What's 
your qemu command?

Running GNU/Linux will ease me to port pieces of software to NetBSD.

Thanks


Re: Import timeout(1) from FreeBSD

2014-07-30 Thread Kamil Rytarowski
Hello,

I've filed a problem-report (hopefully it won't be sorted out by spam-filters) 
with a proposed patches.

The former aims to import FreeBSD sources as they are, the latter to adapt 
timeout(1) for NetBSD.

Comments and tests are welcome... after midnight coding!

The patches are waiting for a sponsor to review and push them to the mainline 
for NetBSD-7.0.

If I'm not mistaken in the FreeBSD version there is a bug, it permits to use a 
signal out range -- this line is exposed with strtonum(3). We don't ship with 
strtonum(3), so I changed it to strtol(3) and assumed that sig_nsig is not a 
valid signal value.

strtonum(3) is an OpenBSD addition, available in FreeBSD and in GNU.

With kind regards,

0002-Adapt-timeout-1-for-NetBSD.patch
Description: Binary data


0001-Import-timeout-from-FreeBSD-r.268745.patch
Description: Binary data


Import timeout(1) from FreeBSD

2014-07-27 Thread Kamil Rytarowski
Hello,
 
The FreeBSD team produced BSD-licensed timeout(1).
 
Sources http://svnweb.freebsd.org/base?view=revisionrevision=268745
Production https://phabric.freebsd.org/D377
 
Is it a good idea to import their result into our base trees?
This tool will make my life easier, my use case is doing tests of a certain 
executable, grab results logs from a certain time (like 1-60 sec) and then 
repeat N times. I was using subshells, transfering PID and then using the 
kill(1) command.
 
Some utilities contain a timeout option, but it won't necessarily help if a 
process hangs.

My goal is not to find a walk-around using chain of existing tools (so 
increasing burden in shell scripts), but make life easier taking this 
specialized tool.
 
With regards.