Re: Patch Question

2017-04-18 Thread Tobin C. Harding
On Tue, Apr 18, 2017 at 05:07:08PM -0600, Perry Hooker wrote:
> Thanks for the advice, Tobin - I appreciate the reply.

Please don't top post http://daringfireball.net/2007/07/on_top

I'm not an endian expert so I will not comment on the technical
aspects of the path, I can however, comment on the thread and why you
may not be getting the response you desire.

> In this case, I've already followed your advice - I studied the
> reviewer's comments with a fine-toothed comb (some of his comments
> were flat-out incorrect)

Dan Carpenter is very good at what he dose. I would be hesitant to
ever call him or anyone as experienced 'flat-out incorrect'.

> , and traced the buffer in question back to
> its source. It appears to be holding host-endian data, and it's being
> cast to a little-endian type without an explicit conversion. The patch
> I submitted fixes this by using the kernel-defined byte-order macros.

His initial reply hints that this patch may need testing before it can
be applied - have you tested the patch on real hardware? If so, and it
is correct, re-submit the patch stating so.

> I've reached out to the reviewer both individually and via the mailing
> list, and haven't heard back.

>From the thread, and this is only my opinion, it seems Dan has put
more effort than is required of him already. No one is paid to answer
questions on LKML, they are not required to apply effort to your
problems, anything they do is a gift of their time and should be appreciated.

> It's possible that I'm missing something, but I don't see what.

In your comments you in no way display that you understand exactly
what the code is doing and why it should by changed. Your initial
patch does not have an appropriate changelog message, please read
Documentation/process/submitting-patches.rst (section 2 Describing
your changes).

A more subtle point - you may have more success if you do not put
demands onto people (eg can you explain this..) but rather write out
your understanding of the code explaining why your hold the views you
do. Others can then comment or this, agreeing or disagreeing as the
case may be. People like to help by giving their knowledge, no one
likes doing chores.

> At what point is it appropriate to re-submit the patch?

Once you have reworked the patch, taken into consideration the
reviewers comments, written a changelog describing the code as it is
and why it needs changing, explained the patch fully so that the previous
reviewer and future reviewers can understand that you understand what
is going on. Then it is appropriate to re-submit the patch ([PATCH v2]...).

Again, I am only new around here, these are my opinions based on what
I have seen and read. By no means should they be taken as gospel.

Remember, we are all here to make the kernel better. It's not
personal, it's about the kernel.

I hope this helps, best of luck.

Tobin.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Patch Question

2017-04-18 Thread Perry Hooker
Thanks for the advice, Tobin - I appreciate the reply.

In this case, I've already followed your advice - I studied the
reviewer's comments with a fine-toothed comb (some of his comments
were flat-out incorrect), and traced the buffer in question back to
its source. It appears to be holding host-endian data, and it's being
cast to a little-endian type without an explicit conversion. The patch
I submitted fixes this by using the kernel-defined byte-order macros.

I've reached out to the reviewer both individually and via the mailing
list, and haven't heard back.

It's possible that I'm missing something, but I don't see what.

At what point is it appropriate to re-submit the patch?

Here's the link to the last message in the thread:
https://lkml.org/lkml/2017/4/10/1045

Best regards,
Perry


On Mon, Apr 17, 2017 at 5:58 PM, Tobin C. Harding  wrote:
> On Mon, Apr 17, 2017 at 05:28:46PM -0600, Perry Hooker wrote:
>> Hi everyone,
>>
>> I recently submitted a patch to the kernel mailing list:
>> https://lkml.org/lkml/2017/3/21/712
>
> Link is broken.
>
>> I received some feedback on the patch. After a bit of polite
>> back-and-forth, the respondent stopped replying when I asked for more
>> information, and I haven't heard anything from the maintainers.
>
> No one *has* to respond to your email.
>
>> Based on my analysis (contained in the thread), I still think the
>> patch is correct & appropriate.
>
> Perhaps you just need to rework it a bit as the reviewer suggested?
>
>> What's the best way to determine if this is a good fix or not?
>> How should I proceed if the patch is, in fact, a good fix?
>
> If the patch was good it would have probably been picked up.
>
> I have found myself in similar positions. Often, since we are just
> beginners, there is some thing about the situation that we do not
> fully understand. This lack of understanding leads us to think we are
> correct when in fact we are not. Perhaps you could go back over the
> reviewers emails and think all around the code being discussed, make
> sure you understand every minute detail of what is being done.
>
> I have found reviewers to be unusually patient with us newbies, if you
> display that you have put in effort to try and understand their
> position most times you will get a response. If you don't perhaps the
> fix is not worth bothering with, the kernel is large there are always
> more things to work on.
>
> Hope this helps,
> Tobin.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: What is the fastest way to build and boot a kernel

2017-04-18 Thread Guru Das S
On 18 April 2017 at 11:04, Code Soldier1  wrote:
> Thanks a lot Greg and Peter.
Hello,

Top-posting is frowned upon in the Linux Kernel mailing lists. Please
use the interleaved style instead, as described in this Wikipedia
article: https://en.wikipedia.org/wiki/Posting_style#Placement_of_replies

> On Tue, Apr 18, 2017 at 10:44 AM, Greg KH  wrote:
>> On Tue, Apr 18, 2017 at 10:38:52AM -0700, Code Soldier1 wrote:
>>> Hi Greg,
>>>
>>> No I did not know about 'make localmodconfig'. Can you kindly explain.
>>
>> Did you look at the help in the kernel makefile:
>>
>> make help
>> will show you what the different options do.
>>
>> localmodconfig makes a kernel configuration based on your system and the
>> modules loaded, which is much smaller than the "full distribution"
>> kernel build, for all hardware in the world, which you don't usually
>> want for your own development.
>>
>> There's also a whole book, free online, Linux Kernel in a Nutshell, that
>> describes how to configure, build, and boot a custom kernel, that might
>> help you out.
>>
>>> As far as the change is concerned I am planning to change a few things
>>> and experiment, so there is nothing specific.
>>
>> Then experiment away and see how it goes!
>>
>> good luck,
>>
>> greg k-h
>

To add to what Greg said, disabling the staging drivers config option
in the .config file speeds up the entire process. To do this, just
comment out the CONFIG_STAGING line in that file.

>
>
> --
> CS1
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Guru Das Srinagesh.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: What is the fastest way to build and boot a kernel

2017-04-18 Thread Code Soldier1
Thanks a lot Greg and Peter.

On Tue, Apr 18, 2017 at 10:44 AM, Greg KH  wrote:
> On Tue, Apr 18, 2017 at 10:38:52AM -0700, Code Soldier1 wrote:
>> Hi Greg,
>>
>> No I did not know about 'make localmodconfig'. Can you kindly explain.
>
> Did you look at the help in the kernel makefile:
>
> make help
> will show you what the different options do.
>
> localmodconfig makes a kernel configuration based on your system and the
> modules loaded, which is much smaller than the "full distribution"
> kernel build, for all hardware in the world, which you don't usually
> want for your own development.
>
> There's also a whole book, free online, Linux Kernel in a Nutshell, that
> describes how to configure, build, and boot a custom kernel, that might
> help you out.
>
>> As far as the change is concerned I am planning to change a few things
>> and experiment, so there is nothing specific.
>
> Then experiment away and see how it goes!
>
> good luck,
>
> greg k-h



-- 
CS1

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: How to make per process firewall ?

2017-04-18 Thread valdis . kletnieks
On Tue, 18 Apr 2017 10:28:20 +0300, Lev Olshvang said:

> I would like to constrain process (by name) or group of process to specific
> network interface and to specific port.

Let's take a step back.  What problem are you trying to solve by constraining
the processes?


pgprLGP7LqYAe.pgp
Description: PGP signature
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: What is the fastest way to build and boot a kernel

2017-04-18 Thread Greg KH
On Tue, Apr 18, 2017 at 10:38:52AM -0700, Code Soldier1 wrote:
> Hi Greg,
> 
> No I did not know about 'make localmodconfig'. Can you kindly explain.

Did you look at the help in the kernel makefile:

make help
will show you what the different options do.

localmodconfig makes a kernel configuration based on your system and the
modules loaded, which is much smaller than the "full distribution"
kernel build, for all hardware in the world, which you don't usually
want for your own development.

There's also a whole book, free online, Linux Kernel in a Nutshell, that
describes how to configure, build, and boot a custom kernel, that might
help you out.

> As far as the change is concerned I am planning to change a few things
> and experiment, so there is nothing specific.

Then experiment away and see how it goes!

good luck,

greg k-h

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: What is the fastest way to build and boot a kernel

2017-04-18 Thread Peter Senna Tschudin
On Tue, Apr 18, 2017 at 7:38 PM, Code Soldier1  wrote:
> Hi Greg,
>
> No I did not know about 'make localmodconfig'. Can you kindly explain.
> As far as the change is concerned I am planning to change a few things
> and experiment, so there is nothing specific.

Check this out:

https://lwn.net/Articles/660404/

>
> Thanks,
>
> On Tue, Apr 18, 2017 at 9:07 AM, Greg KH  wrote:
>> On Tue, Apr 18, 2017 at 08:59:36AM -0700, Code Soldier1 wrote:
>>> Hi,
>>>
>>> Can someone suggest what is the fastest way to build a minimal kernel
>>> and boot. For example if I am working on TCP and would like to make a
>>> small change and reboot, what is the fastest way, I rather not build
>>> the whole kernel.
>>
>> Why would you need to rebuild the whole kernel?  What did you change
>> that required everything to be rebuilt?
>>
>> And a working kernel can normally be built, from scratch, in just a few
>> minutes.  You do know about 'make localmodconfig' right?
>>
>> thanks,
>>
>> greg k-h
>
>
>
> --
> CS1
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
Peter

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: What is the fastest way to build and boot a kernel

2017-04-18 Thread Code Soldier1
Hi Greg,

No I did not know about 'make localmodconfig'. Can you kindly explain.
As far as the change is concerned I am planning to change a few things
and experiment, so there is nothing specific.

Thanks,

On Tue, Apr 18, 2017 at 9:07 AM, Greg KH  wrote:
> On Tue, Apr 18, 2017 at 08:59:36AM -0700, Code Soldier1 wrote:
>> Hi,
>>
>> Can someone suggest what is the fastest way to build a minimal kernel
>> and boot. For example if I am working on TCP and would like to make a
>> small change and reboot, what is the fastest way, I rather not build
>> the whole kernel.
>
> Why would you need to rebuild the whole kernel?  What did you change
> that required everything to be rebuilt?
>
> And a working kernel can normally be built, from scratch, in just a few
> minutes.  You do know about 'make localmodconfig' right?
>
> thanks,
>
> greg k-h



-- 
CS1

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: What is the fastest way to build and boot a kernel

2017-04-18 Thread Greg KH
On Tue, Apr 18, 2017 at 08:59:36AM -0700, Code Soldier1 wrote:
> Hi,
> 
> Can someone suggest what is the fastest way to build a minimal kernel
> and boot. For example if I am working on TCP and would like to make a
> small change and reboot, what is the fastest way, I rather not build
> the whole kernel.

Why would you need to rebuild the whole kernel?  What did you change
that required everything to be rebuilt?

And a working kernel can normally be built, from scratch, in just a few
minutes.  You do know about 'make localmodconfig' right?

thanks,

greg k-h

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


What is the fastest way to build and boot a kernel

2017-04-18 Thread Code Soldier1
Hi,

Can someone suggest what is the fastest way to build a minimal kernel
and boot. For example if I am working on TCP and would like to make a
small change and reboot, what is the fastest way, I rather not build
the whole kernel.

Thanks

-- 
CS1

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: How to make per process firewall ?

2017-04-18 Thread Daniel.
I think docker or lxc may help you. You run the process(es) in a container
and attach a tap interface to the container, the process inside the
container can only see the attached interface.

Regards,

2017-04-18 4:28 GMT-03:00 Lev Olshvang :

> Hi all,
>
> I would like to constrain process (by name) or group of process to
> specific network interface and to specific port.
>
> Please advice if there is some cgroups controller or netfilter module?
>
> ThanX, Lev
>
>
> ___
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>


-- 
“If you're going to try, go all the way. Otherwise, don't even start. ..."
  Charles Bukowski
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Software and Hardware interrupt in top command

2017-04-18 Thread Daniel.
Hi,

top command show si (sw irq) and hi (hw irq). The linux has
request_threaded_irq(irq, handler, thread_fn, ...) ...

Is `si' the time spend on thread_fn and `hi' the time spend on handler


Regards,
-- 
“If you're going to try, go all the way. Otherwise, don't even start. ..."
  Charles Bukowski
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


How to make per process firewall ?

2017-04-18 Thread Lev Olshvang
Hi all, I would like to constrain process (by name) or group of process to specific network interface and to specific port. Please advice if there is some cgroups controller or netfilter module? ThanX, Lev 

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies