Re: unable to pwd in ZFS snapshot

2010-12-25 Thread Denny Lin
On Sun, Dec 26, 2010 at 09:26:13AM +0200, Daniel Braniss wrote:
> this is still broken in 8.2-PRERELEASE, there seems to be a patch, but
> it's almost a year old.
>   http://people.freebsd.org/~jh/patches/zfs-ctldir-vptocnp.diff

Setting snapdir to visible should fix this right away:
# zfs set snapdir=visible tank/foo

-- 
Denny Lin
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


unable to pwd in ZFS snapshot

2010-12-25 Thread Daniel Braniss
hi,
this is still broken in 8.2-PRERELEASE, there seems to be a patch, but
it's almost a year old.
http://people.freebsd.org/~jh/patches/zfs-ctldir-vptocnp.diff

danny


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: MCA messages after upgrade to 8.2-BEAT1

2010-12-25 Thread Sergey Kandaurov
On 25 December 2010 07:48, Carl Johnson  wrote:
> Alan Cox  writes:
>
>> On Fri, Dec 24, 2010 at 5:08 PM, Carl Johnson  wrote:
>>
>>> Alan Cox  writes:
>>>
>>> > 2010/12/23 Dan Langille 
>>> >
>>> >> On 12/22/2010 9:57 AM, John Baldwin wrote:
>>> >>
>>> >>> On Wednesday, December 22, 2010 7:41:25 am Miroslav Lachman wrote:
>>> >>>
>>>  Dec 21 12:42:26 kavkaz kernel: MCA: Bank 0, Status 0xd40e4833
>>>  Dec 21 12:42:26 kavkaz kernel: MCA: Global Cap 0x0105,
>>>  Status 0x
>>>  Dec 21 12:42:26 kavkaz kernel: MCA: Vendor "AuthenticAMD", ID 0x40f33,
>>>  APIC ID 0
>>>  Dec 21 12:42:26 kavkaz kernel: MCA: CPU 0 COR OVER BUSLG Source DRD
>>>  Memory
>>>  Dec 21 12:42:26 kavkaz kernel: MCA: Address 0x236493c0
>>> 
>>> >>>
>>> >>> You are getting corrected ECC errors in your RAM.  You see them once an
>>> >>> hour
>>> >>> because we poll the machine check registers once an hour.  If this
>>> happens
>>> >>> constantly you might have a DIMM that is dying?
>>> >>>
>>> >>
>>> >> John:
>>> >>
>>> >> I take it these ECC errors *may* have been happening for some time. What
>>> >> has changed is the OS now polls for the errors and reports them.
>>> >>
>>> >>
>>> > Yes, we enabled MCA by default in 8.1-RELEASE.
>>>
>>> Is there some reason that it is only available for i386 and not for
>>> amd64?  Linux has something called mcelog, for machine check errors,
>>> which sounds similar and is available for amd64.
>>>
>>>
>> Perhaps I'm misunderstanding your question, but our MCA driver is supported
>> and enabled by default on both i386 and amd64.
>
> Thanks, it appears that I misunderstood.  I ran whereis and found
> /usr/src/sbin/mca and didn't find it on my amd64 system.  I do see it in
> my sysctl listing now that I look there.
>

I guess that's designed for ia64 only
(at least there's no hw.mca.first on other arches).

-- 
wbr,
pluknet
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: /libexec/ld-elf.so.1: Cannot execute objects on /

2010-12-25 Thread Miroslav Lachman

John Baldwin wrote:

On Saturday, December 11, 2010 11:51:41 am Miroslav Lachman wrote:

Miroslav Lachman wrote:

Garrett Cooper wrote:

2010/4/20 Miroslav Lachman<000.f...@quip.cz>:

I have large storage partition (/vol0) mounted as noexec and nosuid.
Then
one directory from this partition is mounted by nullfs as "exec and
suid" so
anything on it can be executed.

The directory contains full installation of jail. Jail is running
fine, but
some ports (PHP for example) cannot be compiled inside the jail with
message:

/libexec/ld-elf.so.1: Cannot execute objects on /

The same apply to executing of apxs

r...@rainnew ~/# /usr/local/sbin/apxs -q MPM_NAME
/libexec/ld-elf.so.1: Cannot execute objects on /

apxs:Error: Sorry, no shared object support for Apache.
apxs:Error: available under your platform. Make sure.
apxs:Error: the Apache module mod_so is compiled into.
apxs:Error: your server binary '/usr/local/sbin/httpd'..

(it should return "prefork")

So I think there is some bug in checking the mountpoint options,
where the
check is made on "parent" of the nullfs instead of the nullfs target
mountpoint.

It is on 6.4-RELEASE i386 GENERIC. I did not test it on another release.

This is list of related mount points:

/dev/mirror/gm0s2d on /vol0 (ufs, local, noexec, nosuid, soft-updates)
/vol0/jail/.nullfs/rain on /vol0/jail/rain_new (nullfs, local)
/usr/ports on /vol0/jail/rain_new/usr/ports (nullfs, local)
devfs on /vol0/jail/rain_new/dev (devfs, local)

If I changed /vol0 options to (ufs, local, soft-updates) the above
error is
gone and apxs / compilation works fine.

Can somebody look at this problem?


Can you please provide output from ktrace / truss for the issue?


I did
# ktrace /usr/local/sbin/apxs -q MPM_NAME

The output is here http://freebsd.quip.cz/ld-elf/ktrace.out

Let me know if you need something else.

Thank you for your interest!


The problem is still there in FreeBSD 8.1-RELEASE amd64 GENERIC (and in
7.x).

Can somebody say if this is a bug or an expected "feature"?


I think this is the expected behavior as nullfs is simply re-exposing /vol0
and it shouldn't be able to create a more privileged mount than the underlying
mount I think (e.g. a read/write nullfs mount of a read-only filesystem would
not make the underlying files read/write).  It can be used to provide less
privilege (e.g. a readonly nullfs mount of a read/write filesystem does not
allow writes via the nullfs layer).

That said, I'm not sure exactly where the permission check is failing.
execve() only checks MNT_NOEXEC on the "upper" vnode's mountpoint (i.e. the
nullfs mountpoint) and the VOP_ACCESS(.., V_EXEC) check does not look at
MNT_NOEXEC either.

I do think there might be bugs in that a nullfs mount that specifies noexec or
nosuid might not enforce the noexec or nosuid bits if the underlying mount
point does not have them set (from what I can see).


Thank you for your explanation. Then it is strange, that there is bug, 
that allows execution on originally non executable mountpoint.

It should be mentioned in the bugs section of the mount_nullfs man page.

It would be useful, if 'mount' output shows inherited options for nullfs.

If parent is:
/dev/mirror/gm0s2d on /vol0 (ufs, local, noexec, nosuid, soft-updates)

Then nullfs line will be:
/vol0/jail/.nullfs/rain on /vol0/jail/rain_new (nullfs, local, noexec, 
nosuid)


instead of just
/vol0/jail/.nullfs/rain on /vol0/jail/rain_new (nullfs, local)


Then I can understand what is expected behavior, but our current state 
is half working, if I can execute scripts and binaries, run jail on it, 
but can't execute "apxs -q MPM_NAME" and few others.


Miroslav Lachman

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"