Patchwork [v2] kmod: Handle undefined O_CLOEXEC

login
register
mail settings
Submitter McClintock Matthew-B29882
Date Aug. 15, 2012, 7:27 p.m.
Message ID <CAEsOVNd1DB0M5pNndxMLt4bdMwRCADPBLv9pw9pC_TELPwXAVA@mail.gmail.com>
Download mbox | patch
Permalink /patch/34661/
State New
Headers show

Comments

McClintock Matthew-B29882 - Aug. 15, 2012, 7:27 p.m.
On Wed, Aug 15, 2012 at 2:10 PM, Chris Larson <clarson@kergoth.com> wrote:
> On Wed, Aug 15, 2012 at 11:37 AM, McClintock Matthew-B29882
> <B29882@freescale.com> wrote:
>> On Tue, Jul 24, 2012 at 8:40 AM, Burton, Ross <ross.burton@intel.com> wrote:
>>> On 24 July 2012 14:27, Chris Larson <clarson@kergoth.com> wrote:
>>>> On Tue, Jul 24, 2012 at 12:37 AM, Radu Moisan <radu.moisan@intel.com> wrote:
>>>>> I have not tested on CentOS 5.8 if the applications are not broken in some
>>>>> way, but that's not in the scope of this patch. If something does indeed
>>>>> break, then a totally different patch is required, targeting a backport of
>>>>> kmod for kernel older than 2.6.23.
>>>>
>>>> Personally, I'd rather see the build fail than have the tools behave
>>>> incorrectly in some inexplicable way. If you haven't tested it, the
>>>> patch shouldn't go in.
>>>
>>> I was curious...
>>>
>>> There are two commits in kmod where the cloexec changes were made:
>>>
>>> http://git.profusion.mobi/cgit.cgi/kmod.git/log/?qt=grep&q=cloexec
>>>
>>> The changes were a simple addition of the O_CLOEXEC flag, so this
>>> patch is simply the union of those two commits.  A release of kmod
>>> that doesn't require O_CLOEXEC has the same behaviour as this patch.
>>> The problem O_CLOEXEC is solving isn't possible to solve cleanly
>>> without it.  Using an older version of kmod instead of patching kmod
>>> to work on older systems would result in more bugs and less features
>>> for no win.
>>
>> Was there any conclusion on this? I'm seeing the same problems. This
>> would only effect kmod-native (unless the target was using the older
>> stuff as well which is uncommon at this point).
>
> For what it's worth, we applied this in our layer and things do seem
> to work fine with this applied. It was either this or what we did
> before (reverted the switch to kmod-native and retained
> module-init-tools-cross), as we require CentOS5/RHEL5 support still.

I've been doing something similar and it's been working OK. -  I think
we should apply Ross's patch.

-M


-M
Ross Burton - Aug. 15, 2012, 7:32 p.m.
On 15 August 2012 20:27, McClintock Matthew-B29882 <B29882@freescale.com> wrote:
> I've been doing something similar and it's been working OK. -  I think
> we should apply Ross's patch.

Radu's, not mine.

Ross
Radu Moisan - Aug. 29, 2012, 1:48 p.m.
On 08/15/2012 10:32 PM, Burton, Ross wrote:
> On 15 August 2012 20:27, McClintock Matthew-B29882 <B29882@freescale.com> wrote:
>> I've been doing something similar and it's been working OK. -  I think
>> we should apply Ross's patch.
> Radu's, not mine.
>
> Ross
What's happening with this one? Is it going to me merged or something 
needs to be changed. As I see the comments, it should be fine.

Radu
Saul Wold - Aug. 29, 2012, 5:05 p.m.
On 08/29/2012 06:48 AM, Radu Moisan wrote:
>
> On 08/15/2012 10:32 PM, Burton, Ross wrote:
>> On 15 August 2012 20:27, McClintock Matthew-B29882
>> <B29882@freescale.com> wrote:
>>> I've been doing something similar and it's been working OK. -  I think
>>> we should apply Ross's patch.
>> Radu's, not mine.
>>
>> Ross
> What's happening with this one? Is it going to me merged or something
> needs to be changed. As I see the comments, it should be fine.
>
Radu,

I think that Matthew's patch was merged

[OE-core] [PATCH v2] kmod-native_git.bb: fix builds for hosts with older 
libc

Did this not fix this issue?

Sau!


> Radu
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
>
Radu Moisan - Aug. 30, 2012, 6:42 a.m.
On 08/29/2012 08:05 PM, Saul Wold wrote:
> On 08/29/2012 06:48 AM, Radu Moisan wrote:
>>
>> On 08/15/2012 10:32 PM, Burton, Ross wrote:
>>> On 15 August 2012 20:27, McClintock Matthew-B29882
>>> <B29882@freescale.com> wrote:
>>>> I've been doing something similar and it's been working OK. -  I think
>>>> we should apply Ross's patch.
>>> Radu's, not mine.
>>>
>>> Ross
>> What's happening with this one? Is it going to me merged or something
>> needs to be changed. As I see the comments, it should be fine.
>>
> Radu,
>
> I think that Matthew's patch was merged
>
> [OE-core] [PATCH v2] kmod-native_git.bb: fix builds for hosts with 
> older libc
>
> Did this not fix this issue?
>
> Sau!
>
>
That's fine Soul, thanks for pointing that out. I just wanted to get it 
of my list of pending patches.

Radu

Patch

diff --git a/meta/recipes-kernel/kmod/kmod-native_git.bb
b/meta/recipes-kernel/kmod/kmod-native_git.bb
index 96de8b8..054a842 100644
--- a/meta/recipes-kernel/kmod/kmod-native_git.bb
+++ b/meta/recipes-kernel/kmod/kmod-native_git.bb
@@ -4,7 +4,9 @@ 
 require kmod.inc
 inherit native

-PR = "${INC_PR}.0"
+PR = "${INC_PR}.1"
+
+CFLAGS += "-D O_CLOEXEC=0"

 do_install_append (){
        for tool in depmod insmod lsmod modinfo modprobe rmmod