Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu Kernel Team (http://www.linux-archive.org/ubuntu-kernel-team/)
-   -   Btrfs v0.14 Released (http://www.linux-archive.org/ubuntu-kernel-team/80074-btrfs-v0-14-released.html)

"Jeff Schroeder" 05-01-2008 04:39 PM

Btrfs v0.14 Released
 
adding the ubuntu kernel team. BenC or TimG, do you have any
suggestions for Chris?

On Thu, May 1, 2008 at 9:26 AM, Chris Mason <chris.mason@oracle.com> wrote:
> On Thursday 01 May 2008, Jeff Schroeder wrote:
> > On Thu, May 1, 2008 at 9:04 AM, Chris Mason <chris.mason@oracle.com> wrote:
> > > On Tuesday 29 April 2008, Chris Mason wrote:
> > > > Hello everyone,
> > > >
> > > > Btrfs v0.14 is now available for download. Please note the disk
> > > > format has changed, and it is not compatible with older versions of
> > > > Btrfs.
> > > >
> > > > For downloads and documention, please see the Btrfs project page:
> > > >
> > > > http://btrfs.wiki.kernel.org
> > >
> > > Hello everyone,
> > >
> > > I've rolled up some fixes for older kernels and fixed an uninitialized
> > > variables in btrfs-progs that could cause an oops on mount. I'll wait a
> > > few days to see if other bug reports come in and cut a 0.15 with any
> > > other critical fixes.
> >
> > Well it oopses on writes everytime in Ubuntu 8.04 (Hardy). I'd planned
> > on digging into
> > it more before spending a bug report, but will send it tonight after
> > getting to the affected
> > machine.
>
> This is because ubuntu kernels ship with apparmor, you'll need this patch:
>
> If there is a #ifdef IM_A_UBUNTU_KERNEL I can use, I'll do it. Jeff Mahoney
> has a similar patch for SUSE that I've been meaning to merge, but I wanted to
> lookup some way to check for ubuntu as well.
>
> -chris
>
> diff -r e7da2489b19b file.c
> --- a/file.c Wed Apr 30 13:59:35 2008 -0400
> +++ b/file.c Thu May 01 12:25:11 2008 -0400
> @@ -852,7 +852,7 @@ static ssize_t btrfs_file_write(struct f
> goto out_nolock;
> if (count == 0)
> goto out_nolock;
> - err = remove_suid(fdentry(file));
> + err = remove_suid(&file->f_path);
> if (err)
> goto out_nolock;
> file_update_time(file);
>



--
Jeff Schroeder

Don't drink and derive, alcohol and analysis don't mix.
http://www.digitalprognosis.com

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team

Tim Gardner 05-01-2008 07:06 PM

Btrfs v0.14 Released
 
Jeff Schroeder wrote:
> adding the ubuntu kernel team. BenC or TimG, do you have any
> suggestions for Chris?
>
> On Thu, May 1, 2008 at 9:26 AM, Chris Mason <chris.mason@oracle.com> wrote:
>> On Thursday 01 May 2008, Jeff Schroeder wrote:
>> > On Thu, May 1, 2008 at 9:04 AM, Chris Mason <chris.mason@oracle.com> wrote:
>> > > On Tuesday 29 April 2008, Chris Mason wrote:
>> > > > Hello everyone,
>> > > >
>> > > > Btrfs v0.14 is now available for download. Please note the disk
>> > > > format has changed, and it is not compatible with older versions of
>> > > > Btrfs.
>> > > >
>> > > > For downloads and documention, please see the Btrfs project page:
>> > > >
>> > > > http://btrfs.wiki.kernel.org
>> > >
>> > > Hello everyone,
>> > >
>> > > I've rolled up some fixes for older kernels and fixed an uninitialized
>> > > variables in btrfs-progs that could cause an oops on mount. I'll wait a
>> > > few days to see if other bug reports come in and cut a 0.15 with any
>> > > other critical fixes.
>> >
>> > Well it oopses on writes everytime in Ubuntu 8.04 (Hardy). I'd planned
>> > on digging into
>> > it more before spending a bug report, but will send it tonight after
>> > getting to the affected
>> > machine.
>>
>> This is because ubuntu kernels ship with apparmor, you'll need this patch:
>>
>> If there is a #ifdef IM_A_UBUNTU_KERNEL I can use, I'll do it. Jeff Mahoney
>> has a similar patch for SUSE that I've been meaning to merge, but I wanted to
>> lookup some way to check for ubuntu as well.
>>
>> -chris
>>
>> diff -r e7da2489b19b file.c
>> --- a/file.c Wed Apr 30 13:59:35 2008 -0400
>> +++ b/file.c Thu May 01 12:25:11 2008 -0400
>> @@ -852,7 +852,7 @@ static ssize_t btrfs_file_write(struct f
>> goto out_nolock;
>> if (count == 0)
>> goto out_nolock;
>> - err = remove_suid(fdentry(file));
>> + err = remove_suid(&file->f_path);
>> if (err)
>> goto out_nolock;
>> file_update_time(file);
>>
>
>
>

Couldn't you #ifdef based on CONFIG_SECURITY_APPARMOR ? This ought to
work for Hardy. However the next development kernel (Intrepid) does not
have the APPARMOR patches, so just knowing that its an UBUNTU kernel is
not specific enough.

rtg
--
Tim Gardner tim.gardner@ubuntu.com

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team

Chris Mason 05-01-2008 07:17 PM

Btrfs v0.14 Released
 
On Thursday 01 May 2008, Tim Gardner wrote:

[ btrfs oops on ubuntu ]

> >> This is because ubuntu kernels ship with apparmor, you'll need this
> >> patch:
> >>
> >> If there is a #ifdef IM_A_UBUNTU_KERNEL I can use, I'll do it. Jeff
> >> Mahoney has a similar patch for SUSE that I've been meaning to merge,
> >> but I wanted to lookup some way to check for ubuntu as well.
> >>
> >> -chris
> >>
> >> diff -r e7da2489b19b file.c
> >> --- a/file.c Wed Apr 30 13:59:35 2008 -0400
> >> +++ b/file.c Thu May 01 12:25:11 2008 -0400
> >> @@ -852,7 +852,7 @@ static ssize_t btrfs_file_write(struct f
> >> goto out_nolock;
> >> if (count == 0)
> >> goto out_nolock;
> >> - err = remove_suid(fdentry(file));
> >> + err = remove_suid(&file->f_path);
> >> if (err)
> >> goto out_nolock;
> >> file_update_time(file);
>
> Couldn't you #ifdef based on CONFIG_SECURITY_APPARMOR ? This ought to
> work for Hardy. However the next development kernel (Intrepid) does not
> have the APPARMOR patches, so just knowing that its an UBUNTU kernel is
> not specific enough.

I've been assuming the apparmor patches change remove_suid even when they are
not enabled in the config.

-chris

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team

Jeff Mahoney 05-01-2008 07:27 PM

Btrfs v0.14 Released
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chris Mason wrote:
> On Thursday 01 May 2008, Tim Gardner wrote:
>
> [ btrfs oops on ubuntu ]
>
>>>> This is because ubuntu kernels ship with apparmor, you'll need this
>>>> patch:
>>>>
>>>> If there is a #ifdef IM_A_UBUNTU_KERNEL I can use, I'll do it. Jeff
>>>> Mahoney has a similar patch for SUSE that I've been meaning to merge,
>>>> but I wanted to lookup some way to check for ubuntu as well.
>>>>
>>>> -chris
>>>>
>>>> diff -r e7da2489b19b file.c
>>>> --- a/file.c Wed Apr 30 13:59:35 2008 -0400
>>>> +++ b/file.c Thu May 01 12:25:11 2008 -0400
>>>> @@ -852,7 +852,7 @@ static ssize_t btrfs_file_write(struct f
>>>> goto out_nolock;
>>>> if (count == 0)
>>>> goto out_nolock;
>>>> - err = remove_suid(fdentry(file));
>>>> + err = remove_suid(&file->f_path);
>>>> if (err)
>>>> goto out_nolock;
>>>> file_update_time(file);
>> Couldn't you #ifdef based on CONFIG_SECURITY_APPARMOR ? This ought to
>> work for Hardy. However the next development kernel (Intrepid) does not
>> have the APPARMOR patches, so just knowing that its an UBUNTU kernel is
>> not specific enough.
>
> I've been assuming the apparmor patches change remove_suid even when they are
> not enabled in the config.

Yeah, unless Ubuntu is doing some magic with the function arguments
(which sounds like the fix is worse than the problem), this is true.

- -Jeff

- --
Jeff Mahoney
SUSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFIGhmULPWxlyuTD7IRAgJcAJ4zYYcgQ2V0eT6Fv6Lstl wpnK9bUwCgpdBD
XHUzfiFBd+HQLt5Tw5vHH0A=
=KWIZ
-----END PGP SIGNATURE-----

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team

Tim Gardner 05-01-2008 07:36 PM

Btrfs v0.14 Released
 
Chris Mason wrote:
> On Thursday 01 May 2008, Tim Gardner wrote:
>
> [ btrfs oops on ubuntu ]
>
>>>> This is because ubuntu kernels ship with apparmor, you'll need this
>>>> patch:
>>>>
>>>> If there is a #ifdef IM_A_UBUNTU_KERNEL I can use, I'll do it. Jeff
>>>> Mahoney has a similar patch for SUSE that I've been meaning to merge,
>>>> but I wanted to lookup some way to check for ubuntu as well.
>>>>
>>>> -chris
>>>>
>>>> diff -r e7da2489b19b file.c
>>>> --- a/file.c Wed Apr 30 13:59:35 2008 -0400
>>>> +++ b/file.c Thu May 01 12:25:11 2008 -0400
>>>> @@ -852,7 +852,7 @@ static ssize_t btrfs_file_write(struct f
>>>> goto out_nolock;
>>>> if (count == 0)
>>>> goto out_nolock;
>>>> - err = remove_suid(fdentry(file));
>>>> + err = remove_suid(&file->f_path);
>>>> if (err)
>>>> goto out_nolock;
>>>> file_update_time(file);
>> Couldn't you #ifdef based on CONFIG_SECURITY_APPARMOR ? This ought to
>> work for Hardy. However the next development kernel (Intrepid) does not
>> have the APPARMOR patches, so just knowing that its an UBUNTU kernel is
>> not specific enough.
>
> I've been assuming the apparmor patches change remove_suid even when they are
> not enabled in the config.
>
> -chris
>

Lets get Kees involved. He developed the patch set for Hardy. I would
hope that if CONFIG_SECURITY_APPARMOR=n then the source would default to
its normal state.

rtg
--
Tim Gardner tim.gardner@ubuntu.com

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team

Kees Cook 05-01-2008 07:51 PM

Btrfs v0.14 Released
 
Hi,

On Thu, May 01, 2008 at 01:36:25PM -0600, Tim Gardner wrote:
> Chris Mason wrote:
> > On Thursday 01 May 2008, Tim Gardner wrote:
> >
> > [ btrfs oops on ubuntu ]
> >
> >>>> This is because ubuntu kernels ship with apparmor, you'll need this
> >>>> patch:
> >>>>
> >>>> If there is a #ifdef IM_A_UBUNTU_KERNEL I can use, I'll do it. Jeff
> >>>> Mahoney has a similar patch for SUSE that I've been meaning to merge,
> >>>> but I wanted to lookup some way to check for ubuntu as well.
> >>>>
> >>>> -chris
> >>>>
> >>>> diff -r e7da2489b19b file.c
> >>>> --- a/file.c Wed Apr 30 13:59:35 2008 -0400
> >>>> +++ b/file.c Thu May 01 12:25:11 2008 -0400
> >>>> @@ -852,7 +852,7 @@ static ssize_t btrfs_file_write(struct f
> >>>> goto out_nolock;
> >>>> if (count == 0)
> >>>> goto out_nolock;
> >>>> - err = remove_suid(fdentry(file));
> >>>> + err = remove_suid(&file->f_path);
> >>>> if (err)
> >>>> goto out_nolock;
> >>>> file_update_time(file);
> >> Couldn't you #ifdef based on CONFIG_SECURITY_APPARMOR ? This ought to
> >> work for Hardy. However the next development kernel (Intrepid) does not
> >> have the APPARMOR patches, so just knowing that its an UBUNTU kernel is
> >> not specific enough.
> >
> > I've been assuming the apparmor patches change remove_suid even when they are
> > not enabled in the config.
> >
> > -chris
> >
>
> Lets get Kees involved. He developed the patch set for Hardy. I would
> hope that if CONFIG_SECURITY_APPARMOR=n then the source would default to
> its normal state.

I can't claim to have developed the patches, only helping coordinate
their merging into Ubuntu. John Johansen is the real person we should
check with -- he did all the heavy lifting -- now added to discussion.
(Hi John!)

-Kees

--
Kees Cook
Ubuntu Security Team

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team

Jeff Mahoney 05-01-2008 08:10 PM

Btrfs v0.14 Released
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tim Gardner wrote:
> Chris Mason wrote:
>> On Thursday 01 May 2008, Tim Gardner wrote:
>>
>> [ btrfs oops on ubuntu ]
>>
>>>>> This is because ubuntu kernels ship with apparmor, you'll need this
>>>>> patch:
>>>>>
>>>>> If there is a #ifdef IM_A_UBUNTU_KERNEL I can use, I'll do it. Jeff
>>>>> Mahoney has a similar patch for SUSE that I've been meaning to merge,
>>>>> but I wanted to lookup some way to check for ubuntu as well.
>>>>>
>>>>> -chris
>>>>>
>>>>> diff -r e7da2489b19b file.c
>>>>> --- a/file.c Wed Apr 30 13:59:35 2008 -0400
>>>>> +++ b/file.c Thu May 01 12:25:11 2008 -0400
>>>>> @@ -852,7 +852,7 @@ static ssize_t btrfs_file_write(struct f
>>>>> goto out_nolock;
>>>>> if (count == 0)
>>>>> goto out_nolock;
>>>>> - err = remove_suid(fdentry(file));
>>>>> + err = remove_suid(&file->f_path);
>>>>> if (err)
>>>>> goto out_nolock;
>>>>> file_update_time(file);
>>> Couldn't you #ifdef based on CONFIG_SECURITY_APPARMOR ? This ought to
>>> work for Hardy. However the next development kernel (Intrepid) does not
>>> have the APPARMOR patches, so just knowing that its an UBUNTU kernel is
>>> not specific enough.
>> I've been assuming the apparmor patches change remove_suid even when they are
>> not enabled in the config.
>>
>> -chris
>>
>
> Lets get Kees involved. He developed the patch set for Hardy. I would
> hope that if CONFIG_SECURITY_APPARMOR=n then the source would default to
> its normal state.

remove_suid() isn't the only change AppArmor makes to the VFS interface.
It's pretty invasive and requires that dentries are passed with a
companion vfsmount in most cases. Putting #ifdefs around all that code
would make the problem worse, not better.

- -Jeff

- --
Jeff Mahoney
SUSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFIGiOrLPWxlyuTD7IRAh3jAKCFCrBa30G5WDwmJHI+Yb 4fNAfu2QCfTUmq
Q6Sf0MVug2X0ywRcSrGi4eY=
=QwF9
-----END PGP SIGNATURE-----

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team

Jan Engelhardt 05-02-2008 06:40 AM

Btrfs v0.14 Released
 
On Thursday 2008-05-01 22:10, Jeff Mahoney wrote:

>>>> Couldn't you #ifdef based on CONFIG_SECURITY_APPARMOR ? This ought to
>>>> work for Hardy. However the next development kernel (Intrepid) does not
>>>> have the APPARMOR patches, so just knowing that its an UBUNTU kernel is
>>>> not specific enough.
>>>
>>> I've been assuming the apparmor patches change remove_suid even when they are
>>> not enabled in the config.
>>
>> Lets get Kees involved. He developed the patch set for Hardy. I would
>> hope that if CONFIG_SECURITY_APPARMOR=n then the source would default to
>> its normal state.
>
>remove_suid() isn't the only change AppArmor makes to the VFS interface.
>It's pretty invasive and requires that dentries are passed with a
>companion vfsmount in most cases. Putting #ifdefs around all that code
>would make the problem worse, not better.

An alternative approach, and IMHO better suited, is to:

make -C ${kdir} all I_HAZ_AN_APPARMOR=1

with this Makefile

ifneq (${I_HAZ_AN_APPARMOR},)
EXTRA_CFLAGS += -DHAZ_APPARMOR
endif

This works very well for kmp-rpms, which are tied to a specific
distro, sometimes kernel, anyway.

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team

Chris Mason 05-02-2008 12:52 PM

Btrfs v0.14 Released
 
On Friday 02 May 2008, Jan Engelhardt wrote:
> On Thursday 2008-05-01 22:10, Jeff Mahoney wrote:
> >>>> Couldn't you #ifdef based on CONFIG_SECURITY_APPARMOR ? This ought to
> >>>> work for Hardy. However the next development kernel (Intrepid) does
> >>>> not have the APPARMOR patches, so just knowing that its an UBUNTU
> >>>> kernel is not specific enough.
> >>>
> >>> I've been assuming the apparmor patches change remove_suid even when
> >>> they are not enabled in the config.
> >>
> >> Lets get Kees involved. He developed the patch set for Hardy. I would
> >> hope that if CONFIG_SECURITY_APPARMOR=n then the source would default to
> >> its normal state.
> >
> >remove_suid() isn't the only change AppArmor makes to the VFS interface.
> >It's pretty invasive and requires that dentries are passed with a
> >companion vfsmount in most cases. Putting #ifdefs around all that code
> >would make the problem worse, not better.
>
> An alternative approach, and IMHO better suited, is to:
>
> make -C ${kdir} all I_HAZ_AN_APPARMOR=1

This is better than the current situation (oops without any clues), but I'd
prefer that people not have to know what apparmor is or if they have it.
(This isn't a knock on apparmor, I'd just rather take care of it
automagically).

-chris

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team

Jan Engelhardt 05-02-2008 01:30 PM

Btrfs v0.14 Released
 
On Friday 2008-05-02 14:52, Chris Mason wrote:
>>
>> An alternative approach, and IMHO better suited, is to:
>>
>> make -C ${kdir} all I_HAZ_AN_APPARMOR=1
>
>This is better than the current situation (oops without any clues), but I'd
>prefer that people not have to know what apparmor is or if they have it.

I guess iff people have a clue just what btrfs is and what it is good for
and why one would need it, I guess they also know of Apparmor.
If not, well, I hope you mentioned it in the INSTALL file!
Documentation on the most important things is always a good thing.

>(This isn't a knock on apparmor, I'd just rather take care of it
>automagically).

Well you could go down the conftest.sh route, but I dislike that
approach because such a Makefile system tries to be smarter than me;
and that often breaks because developers made a mess out of the
remaining Makefile and before long, it broke on odd, but
"standards-conforming", O= builds. (Fun stories with nvidia.)

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team


All times are GMT. The time now is 06:01 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.