Eric McCorkle | 23 Apr 07:06 2015
Picon

FreeBSD and Gentoo Linux on the same ZFS volume

I had previously posted asking if anyone had ever gotten FreeBSD and a
linux distro to share the same ZFS volume.  I have since accomplished
this setup with FreeBSD and Gentoo linux on a GPT disk with a single ZFS
volume.  I'll write a quick-and-dirty description of how to do it here;
at some point in the future, I'll write a more in-depth wiki page about it.

== Setting up the Volume ==

Assume the pool's name is "data".  I have the following datasets:

data/freebsd, mountpoint = legacy (root of FreeBSD)
data/freebsd/*, all mountpoints = legacy
data/home, mountpoint = /home (shared home dirs between linux and BSD)
data/linux, mountpoint = legacy (root of linux)
data/linux/*, all mountpoints = legacy

Note that only the datasets that are shared between the two OSes use the
ZFS mounting system.  The ZFS code doesn't seem to support a "just mount
everything under my root" option (if it does, someone please point it
out).  Thus, I have fstab entries for all the OS-specific datasets.

I also have a /linux directory under the FreeBSD root, and a /freebsd
directory under the linux root, at which the corresponding OS's
filesystems are mounted.  Thus, each OS is accessible from the other.  I
can see this being particularly useful to folks trying to port device
drivers.

Lastly, make sure to set data/freebsd as the boot dataset.  Linux can
specify which dataset to use as root.

(Continue reading)

Dheeraj Kandula | 21 Apr 13:03 2015
Picon

Clarification: Acquiring a mutex when a read/write lock is held

Hey All,
       Can you clarify the following

I have a read write lock locked. Next I want to acquire a mutex when the
read write lock is held. Is this allowed or not. As far as I can understand
from the "FreeBSD Kernel Developers Handbook" this operation is allowed in
FreeBSD9.0, 10.0 and further.

But the read write lock cannot be held while sleeping. Doesn't this
contradict the above statement, as a thread will go to sleep if can't
acquire the mutex when another thread holds the mutex.

Hence what sleep are we referring here. Is this sleep(unbounded sleep) or
the bounded sleep.

Dheeraj
_______________________________________________
freebsd-hackers <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe <at> freebsd.org"

Daniel Braniss | 17 Apr 10:04 2015
Picon
Picon

help with coding a loadable kernel module

Hi,
I know I’m embarking on a dangerous trip, but I want to use a Raspberry Pi
and or a BeagleBone to read (and write) RFID cards.
Since a driver is needed to use the spibus, I have 2 options while
developing:
1- write a conventional driver module
    means cross compiling, generating a new kernel, making a new image,
    writing a SD card, etc, etc
2- make it a loadable module
    cross compile,via NFS load/unload 

2 seems the logical path, but I’m getting entangled trying to use
   the spibus, while with 1 there are several drivers I can use to
   learn from.

So before I give up on option 2, is there some examples/help?

I should point out that I have no experience (yet) with arm/spi/fdt
and so option 2 will make the trial and error faster :-)

thanks

	danny

_______________________________________________
freebsd-hackers <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe <at> freebsd.org"
Yuri | 17 Apr 04:50 2015

Is it possible to check the running kernel signature?

I came across this horror story: 
https://pbs.twimg.com/media/Bd7LUMYCMAAJcqJ.jpg
Three letter agencies subverted the BIOS manufacturers to produce BIOSes 
that were/are able to inject the malicious code right into the FreeBSD 
kernel during the final BIOS boot stage. This may well be going on with 
the modern FreeBSD versions.

The idea that comes to mind is the ability to verify that the running 
kernel wasn't tampered with by comparing it with its disk image copy. 
Same with the kernel modules. Kernel can be verified through the memory 
mmapped to /dev/mem device.

Is this idea feasible, and would it make sense to implement it?

Yuri
_______________________________________________
freebsd-hackers <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe <at> freebsd.org"

Ed Schouten | 16 Apr 17:32 2015
Picon

CloudABI: Taking capability-based security to the next level?

Hello fellow FreeBSD hackers,

If you are planning on attending BSDCan this year, you may have
noticed that I am going to give a talk on something mysterious called
CloudABI[1]. I thought it would make sense to also announce its
availability here before the conference.

Before you read the announcement below, I would like to invite you to
read a manifesto on capability-based security that I wrote. This
document tries to explain the necessity for a system like CloudABI.

https://docs.google.com/a/nuxi.nl/document/d/1tW_4CDRuy7HZSkUd6AcDccga_efuIx6ZoyNV9ZLXbJ8/edit

# What is CloudABI?

CloudABI is an alternative POSIX-like runtime environment that is
purely based on the principles behind Capsicum. It can be used to
design complex applications that behave correctly in an environment
that enforces capability-based security. CloudABI executables can be
executed in such a way that the expose as little as possible about the
host operating system, making it perfectly suitable as a building
block for a safe and secure cluster/cloud computing setup. It could
also be used to add support for untrusted plugins and extensions to
existing applications (like Google's Native Client, but not tied to a
browser).

Compared to FreeBSD's binary interface, CloudABI is extremely compact
(~60 system calls). The idea behind this is that adding support for
CloudABI to existing operating systems should not be hard. An
implementation for FreeBSD exists and support for Linux is planned.
(Continue reading)

Garrett Cooper | 13 Apr 11:26 2015
Picon

Where is gtags?

Hi,
	A number of spots in the base system reference gtags, but I can’t seem to find it in the base system or in
ports. Was gtags replaced by ctags, or is it in a more obscure location?
Thanks!
Wojciech Puchar | 13 Apr 09:31 2015
Picon

another question - VM mappings

below is mapping for very simple process (no libc etc)

[wojtek <at> laptop ~]$ procstat -v 917
   PID              START                END PRT  RES PRES REF SHD   FL TP PATH
   917           0x400000           0x401000 r-x    1    0   1   0 CN-- vn /home/wojtek/test/1
   917           0x600000           0x601000 rw-    1    0   1   0 ---- df
   917     0x7ffffffdf000     0x7ffffffff000 rw-    1    0   1   0 ---D df
   917     0x7ffffffff000     0x800000000000 r-x    0    0  39   0 ---- ph

what is "ph" mapping and why read&executable?
_______________________________________________
freebsd-hackers <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe <at> freebsd.org"

Wojciech Puchar | 12 Apr 21:19 2015
Picon

stack pointer on 64-bit architecture

what decides where stack is located when process starts on 64-bit machine 
(x86-64)?

it starts normally below 0x0000800000000000

can starting address be set to different (smaller) value?

_______________________________________________
freebsd-hackers <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe <at> freebsd.org"

Wojciech Puchar | 12 Apr 00:05 2015
Picon

Help with 8TB Seagate Archive

got it and connected

in logs i see

(aprobe0:ahcich0:0:0:0): SETFEATURES SET TRANSFER MODE. ACB: ef 03 00 00 
00 40 00 00 00 00 46 00
(aprobe0:ahcich0:0:0:0): CAM status: ATA Status Error
(aprobe0:ahcich0:0:0:0): ATA status: 51 (DRDY SERV ERR), error: 04 (ABRT )
(aprobe0:ahcich0:0:0:0): RES: 51 04 00 00 00 40 00 00 00 46 00
(aprobe0:ahcich0:0:0:0): Retrying command
(aprobe0:ahcich0:0:0:0): SETFEATURES SET TRANSFER MODE. ACB: ef 03 00 00 
00 40 00 00 00 00 46 00
(aprobe0:ahcich0:0:0:0): CAM status: ATA Status Error
(aprobe0:ahcich0:0:0:0): ATA status: 51 (DRDY SERV ERR), error: 04 (ABRT )
(aprobe0:ahcich0:0:0:0): RES: 51 04 00 00 00 40 00 00 00 46 00
(aprobe0:ahcich0:0:0:0): Error 5, Retries exhausted

and it doesn't connect.

any ideas?
_______________________________________________
freebsd-hackers <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe <at> freebsd.org"

Alex Merritt | 10 Apr 23:45 2015
Picon

Page Coloring Manipulation

Hello hackers,

I am interested in playing with the page-coloring support within the
virtual memory subsystem. Specifically:

i. Methods to specify the number of colors a task receives
ii. Methods to change the quantity of colors at runtime
iii. Understand what areas of memory coloring governs, e.g., just task
data/instructions, file-backed/anon, or even task page-table entries
created by the kernel?

Great if there are user-level methods, but not necessary. Does the kernel
determine these values automatically? Is it disabled by default or always
exercised?

Here is what I found thus far --

// during page fault, in vm_fault_hold()
#if VM_NRESERVLEVEL > 0
    if ((fs.object->flags & OBJ_COLORED) == 0) {
        fs.object->flags |= OBJ_COLORED;
            fs.object->pg_color = atop(vaddr) -
                fs.pindex;
    }
#endif

// and in vm_object_init
#if VM_NRESERVLEVEL > 0
    kernel_object->flags |= OBJ_COLORED;
    kernel_object->pg_color = (u_short)atop(VM_MIN_KERNEL_ADDRESS);
(Continue reading)

Rakesh Sharma | 8 Apr 04:15 2015
Picon

Free BSD ARM Qualcomm kernel

hey i applied for gsoc15, to port BSD to any android phone, i thought
irrespective of me selected or not, i should do some research.

I came across the page of BSD
https://www.freebsd.org/platforms/arm.html

Where is state hardware support for qualcomm snapdragon processor. But i am
unable to get the source for qualcomm. I checked on git in the given link
which is all for ARM.

https://github.com/freebsd/freebsd/tree/master/sys/arm

I will be glad to have help on the qualcomm source

Thanks
_______________________________________________
freebsd-hackers <at> freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe <at> freebsd.org"


Gmane