Re: Struggling with git (format-patch & send-email)

2017-03-08 Thread Prasant J
On Thu, Mar 9, 2017 at 4:33 AM, Jim Davis  wrote:
> On Wed, Mar 8, 2017 at 10:35 AM, Prasant J  wrote:
>> Hi,
>>
>> I want to send my 2 commits as patches in chain reply to my first
>> email. My first email will have multiple files as attachment. How can
>> I achieve it?
>>
>> first email subject: [mystring] Feature 01
>> patch 01:  |_ [mystring] [PATCH 01/02] My commit msg 1
>> patch 02:|_ [mystring] [PATCH 02/02] My commit msg 2
>>
>>
>> My git send-email is working, but I want to achieve the above desired
>> outcome which I'm unable to.
>>
>> I have tried so many combinations of git format-patch and send-email
>> over the past days but I'm unable to get the above outcome.
>>
>> One combination that was close to working:
>> => git format-patch -2 --numbered --start-number 01 -o patch-dir --thread
>> => git send-email --in-reply-to="Message-Id" --to u...@gmail.com
>> --chain-reply-to --suppress-cc=self patch-dir/*
>>
>> I'm trying to see the desired effect in my web gmail, but I do not see.
>
> If you don't have access to something like mutt or thunderbird that
> can show you threads, then you may have to mail it to yourself and try
> the 'show original' option and look at the References: header to check
> that you have the results you'd like to see.
>
> Yes, that's painful.

I use mutt only to send emails.

>>
>>
>> * What am I doing wrong? Any inputs will be of help!
>> * How to add subject prefix? (subject-prefix of git format-patch is
>> not working as above)
>> * How to get 2 digit patch number? I'm getting PATCH 1/2 instead of PATCH 
>> 01/02
>
> Well, one way is to use --subject-prefix="PATCH 01/02" --no-numbered
> arguments to format-patch.  But then you'd have to write a shell loop
> of some sort to process each patch, instead of having format-patch do
> that for you.
>

So, If I understand correct
* there is no way to prefix subject with "[mystring]" directly from
git it has to be done manually.
* there is no way to make the numbers 2 digit stuffed with '0'
directly from git.

Thanks for inputs Jim!

Regards, Pj

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


Re: Struggling with git (format-patch & send-email)

2017-03-08 Thread Prasant J
On Thu, Mar 9, 2017 at 1:47 AM, Greg KH  wrote:
> On Wed, Mar 08, 2017 at 11:05:35PM +0530, Prasant J wrote:
>> Hi,
>>
>> I want to send my 2 commits as patches in chain reply to my first
>> email. My first email will have multiple files as attachment. How can
>> I achieve it?
>>
>> first email subject: [mystring] Feature 01
>> patch 01:  |_ [mystring] [PATCH 01/02] My commit msg 1
>> patch 02:|_ [mystring] [PATCH 02/02] My commit msg 2
>>
>>
>> My git send-email is working, but I want to achieve the above desired
>> outcome which I'm unable to.
>>
>> I have tried so many combinations of git format-patch and send-email
>> over the past days but I'm unable to get the above outcome.
>>
>> One combination that was close to working:
>> => git format-patch -2 --numbered --start-number 01 -o patch-dir --thread
>> => git send-email --in-reply-to="Message-Id" --to u...@gmail.com
>> --chain-reply-to --suppress-cc=self patch-dir/*
>>
>> I'm trying to see the desired effect in my web gmail, but I do not see.
>
> gmail does not show threading like this, you are going to have to use
> another mail client that will show the threading properly, to be able to
> see if you did it correctly or not.
>
> good luck!

@Greg:
Thanks for response, that helped partially. Thunderbird shows threaded mails.

But chain-reply-to does not seem to work, or may be thunderbird is not
showing as expected or my understanding is wrong.

In Thunderbird I see as follows:
>> first email subject: [mystring] Feature 01
>> patch 01:  |_ [mystring] [PATCH 01/02] My commit msg 1
>> patch 02:  |_ [mystring] [PATCH 02/02] My commit msg 2
Both patches are seen as response to first email.


Below is the Mail header when I do chain-reply:

Lets say, First Mail:   Message-Id => 

after git send-email, the header for the patches is as follows:

Patch 1:
  Message-Id => 
  In-Reply-to => 
  References => 

Patch 2:
  Message-Id => 
  In-Reply-to => 
  References =>  



* Do the above headers look as expected & correct? If yes, then my
thunderbird is not showing properly or my understanding is wrong.
* Why in Patch 2 "References"  prepended? (That should
not be the case in chaining.. am I right?)


Thanks & regards, Pj

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


Understanding get_maintainer.pl and MAINTAINERS

2017-03-08 Thread Robin Krahl
Hi again,

I’m now preparing my patchset for bcm2835-audio.  get_maintainer.pl
returns:

$ ./scripts/get_maintainer.pl --nokeywords --nogit --nogit-fallback 
drivers/staging/vc04_services/bcm2835-audio/
Stephen Warren  (maintainer:BROADCOM BCM2835 ARM 
ARCHITECTURE)
Lee Jones  (maintainer:BROADCOM BCM2835 ARM 
ARCHITECTURE)
Eric Anholt  (maintainer:BROADCOM BCM2835 ARM 
ARCHITECTURE)
Greg Kroah-Hartman  (supporter:STAGING 
SUBSYSTEM)
Florian Fainelli  (maintainer:BROADCOM 
BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...)
Ray Jui  (maintainer:BROADCOM 
BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...)
Scott Branden  (maintainer:BROADCOM 
BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...)
bcm-kernel-feedback-l...@broadcom.com (maintainer:BROADCOM 
BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...)
linux-rpi-ker...@lists.infradead.org (moderated list:BROADCOM BCM2835 
ARM ARCHITECTURE)
linux-arm-ker...@lists.infradead.org (moderated list:BROADCOM BCM2835 
ARM ARCHITECTURE)
de...@driverdev.osuosl.org (open list:STAGING SUBSYSTEM)
linux-ker...@vger.kernel.org (open list)

Why are the BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE guys added
to the list?  The MAINTAINERS file defines these rules:

BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITECTURE
M:  Florian Fainelli 
M:  Ray Jui 
M:  Scott Branden 
M:  bcm-kernel-feedback-l...@broadcom.com
T:  git git://github.com/broadcom/mach-bcm
S:  Maintained
N:  bcm281*
N:  bcm113*
N:  bcm216*
N:  kona
F:  arch/arm/mach-bcm/

As far as I see, none of these rules matches the given path.  Am I
missing something?

Regards,
Robin

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


Re: Struggling with git (format-patch & send-email)

2017-03-08 Thread Jim Davis
On Wed, Mar 8, 2017 at 10:35 AM, Prasant J  wrote:
> Hi,
>
> I want to send my 2 commits as patches in chain reply to my first
> email. My first email will have multiple files as attachment. How can
> I achieve it?
>
> first email subject: [mystring] Feature 01
> patch 01:  |_ [mystring] [PATCH 01/02] My commit msg 1
> patch 02:|_ [mystring] [PATCH 02/02] My commit msg 2
>
>
> My git send-email is working, but I want to achieve the above desired
> outcome which I'm unable to.
>
> I have tried so many combinations of git format-patch and send-email
> over the past days but I'm unable to get the above outcome.
>
> One combination that was close to working:
> => git format-patch -2 --numbered --start-number 01 -o patch-dir --thread
> => git send-email --in-reply-to="Message-Id" --to u...@gmail.com
> --chain-reply-to --suppress-cc=self patch-dir/*
>
> I'm trying to see the desired effect in my web gmail, but I do not see.

If you don't have access to something like mutt or thunderbird that
can show you threads, then you may have to mail it to yourself and try
the 'show original' option and look at the References: header to check
that you have the results you'd like to see.

Yes, that's painful.

>
>
> * What am I doing wrong? Any inputs will be of help!
> * How to add subject prefix? (subject-prefix of git format-patch is
> not working as above)
> * How to get 2 digit patch number? I'm getting PATCH 1/2 instead of PATCH 
> 01/02

Well, one way is to use --subject-prefix="PATCH 01/02" --no-numbered
arguments to format-patch.  But then you'd have to write a shell loop
of some sort to process each patch, instead of having format-patch do
that for you.

-- 
Jim

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


Re: Struggling with git (format-patch & send-email)

2017-03-08 Thread Greg KH
On Wed, Mar 08, 2017 at 11:05:35PM +0530, Prasant J wrote:
> Hi,
> 
> I want to send my 2 commits as patches in chain reply to my first
> email. My first email will have multiple files as attachment. How can
> I achieve it?
> 
> first email subject: [mystring] Feature 01
> patch 01:  |_ [mystring] [PATCH 01/02] My commit msg 1
> patch 02:|_ [mystring] [PATCH 02/02] My commit msg 2
> 
> 
> My git send-email is working, but I want to achieve the above desired
> outcome which I'm unable to.
> 
> I have tried so many combinations of git format-patch and send-email
> over the past days but I'm unable to get the above outcome.
> 
> One combination that was close to working:
> => git format-patch -2 --numbered --start-number 01 -o patch-dir --thread
> => git send-email --in-reply-to="Message-Id" --to u...@gmail.com
> --chain-reply-to --suppress-cc=self patch-dir/*
> 
> I'm trying to see the desired effect in my web gmail, but I do not see.

gmail does not show threading like this, you are going to have to use
another mail client that will show the threading properly, to be able to
see if you did it correctly or not.

good luck!

greg k-h

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


Re: how to get filename of execve() system call from kernel module which install hook to syscall table to intercept original syscall in kernels before 4.2 and atter 4.2 ? X86_64

2017-03-08 Thread valdis . kletnieks
On Wed, 08 Mar 2017 15:20:57 +0300, Lev Olshvang said:

> Hi Greg,
>  
> Thank you for a prompt reply. My intention is to build some euristics for
> Intrusion detection of embedded based on sequence of syscalls.
> I am collecting syscall events and send then with netlink to my monitor.
> Since platform may use SELinux or other LSM, I thought the hook of syscall is
> the only point I can use to catch syscalls.
>  
> Is it wrong direction ?

SELinux supports being stacked with a "small" LSM that can do what you want.

Or use the already-provided audit function to track syscalls and send them
to userspace via netlink to your monitor.


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


Struggling with git (format-patch & send-email)

2017-03-08 Thread Prasant J
Hi,

I want to send my 2 commits as patches in chain reply to my first
email. My first email will have multiple files as attachment. How can
I achieve it?

first email subject: [mystring] Feature 01
patch 01:  |_ [mystring] [PATCH 01/02] My commit msg 1
patch 02:|_ [mystring] [PATCH 02/02] My commit msg 2


My git send-email is working, but I want to achieve the above desired
outcome which I'm unable to.

I have tried so many combinations of git format-patch and send-email
over the past days but I'm unable to get the above outcome.

One combination that was close to working:
=> git format-patch -2 --numbered --start-number 01 -o patch-dir --thread
=> git send-email --in-reply-to="Message-Id" --to u...@gmail.com
--chain-reply-to --suppress-cc=self patch-dir/*

I'm trying to see the desired effect in my web gmail, but I do not see.


* What am I doing wrong? Any inputs will be of help!
* How to add subject prefix? (subject-prefix of git format-patch is
not working as above)
* How to get 2 digit patch number? I'm getting PATCH 1/2 instead of PATCH 01/02


Awaiting help!

Thanks & regards, Pj

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


Re: how to get filename of execve() system call from kernel module which install hook to syscall table to intercept original syscall in kernels before 4.2 and atter 4.2 ? X86_64

2017-03-08 Thread Lev Olshvang
Hi Greg, Thank you for a prompt reply. My intention is to build some euristics for Intrusion detection of embedded based on sequence of syscalls.I am collecting syscall events and send then with netlink to my monitor.Since platform may use SELinux or other LSM, I thought the hook of syscall is the only point I can use to catch syscalls. Is it wrong direction ? I was googling and reading kernel git logs trying find out the why execve, clone, fork use assembly glue code instead of calling sys_execve like others syscalls.Can you give me some point where to look? Regards.Lev.07.03.2017, 22:23, "Greg KH" :On Mon, Mar 06, 2017 at 10:18:26AM +0300, Lev Olshvang wrote: Hello all,  In kernels 3.X up to 4.2 execve(|) system call was  for x86_64 architecture the the system call was made through some  magic ( I can't say I understand it ) assembly stub in arch/x86/kernel/entry_64.S so up to kernel 4.2 it was possble to patch this assembly to install the hook, ex. see  http://stackoverflow.com/questions/8372912/hooking-sys-execve-on-linux-3-x/9672512#9672512 But this hook still can't access  in a proper way filename argument, althouth I tried to do it with in the same way as  fs/exec.c does : using  kernel's getname() function (which I was need to find through kallsyms_lookup_name()  In kernels 4.2 and up, the arch/x86/kernel/entry_64.S is gone, and I still dont' have a clue what to do to get filename as a char string.Why do you want to hook a syscall?  that's a very complex, and broken,and ill-advised thing to do.  Please don't do that.What problem are you trying to solve here that led you to think thatputting a syscall hook in is a good solution?thanks,greg k-h___Kernelnewbies mailing listKernelnewbies@kernelnewbies.orghttps://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: how to get filename of execve() system call from kernel module which install hook to syscall table to intercept original syscall in kernels before 4.2 and atter 4.2 ? X86_64

2017-03-08 Thread Greg KH
On Wed, Mar 08, 2017 at 03:20:57PM +0300, Lev Olshvang wrote:
> Hi Greg,
>  
> Thank you for a prompt reply. My intention is to build some euristics for
> Intrusion detection of embedded based on sequence of syscalls.
> I am collecting syscall events and send then with netlink to my monitor.
> Since platform may use SELinux or other LSM, I thought the hook of syscall is
> the only point I can use to catch syscalls.
>  
> Is it wrong direction ?

Yes it is, please use the audit subsystem for something like that, it is
exactly what it was designed and built for.  You can do everything you
want to from userspace.

> I was googling and reading kernel git logs trying find out the why execve,
> clone, fork use assembly glue code instead of calling sys_execve like others
> syscalls.
> Can you give me some point where to look?

Nope, don't mess with that :)

good luck!

greg k-h

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


MS_BIND flag on / folder not working

2017-03-08 Thread Prabhunath G
Hi All,

 Binding / folder onto someother folder say /opt/lxc is not working
but otherway round is working. Can I get some help on this.

The following code snippet is executed after cloning
After executing the following code snippet the contents of / is visible in
/opt/lxc
  ret = mount("/", "/opt/lxc", NULL, MS_BIND, NULL);
  if (ret) {
perror("mount bind / on /opt/lxc");
exit(1);
 }

But after executing the following code snippet the contents of /opt/lxc is
not visible in /
  ret = mount("/opt/lxc", "/", NULL, MS_BIND, NULL);
  if (ret) {
perror("mount bind /opt/lxc on /");
exit(1);
 }

The code is executing successfully, but the result is not as expected.

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


Re: bcm2835-audio: logging mechanism

2017-03-08 Thread Robin Krahl
On 2017-03-08 05:58:35, Greg KH wrote:
> On Wed, Mar 08, 2017 at 12:52:38AM +0100, Robin Krahl wrote:
> > So my question is:  Does it make sense to replace the audio_* and LOG_*
> > macros with the standard dev_* functions?
> 
> Yes.
> 
> > And is it okay to remove log messages like "IN" and "OUT" that are
> > only used to track function entries and exits?
> 
> Yes please!

Thanks!  I’ll prepare a patch.

Robin


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