Re: git pull

2017-11-16 Thread Linus Torvalds
On Tue, Nov 14, 2017 at 1:46 PM, Linus Torvalds
 wrote:
> And then people can do this:
>
>   [url "ssh://g...@gitolite.kernel.org"]
>   insteadOf = https://git.kernel.org
>   insteadOf = http://git.kernel.org
>   insteadOf = git://git.kernel.org
>
> which makes git.kernel.org addresses use ssh, and avoid the whole
> possible DNS spoofing problem.

So credit goes for Konstantin for pointing that out, and I actually
used it this merge window.

A few notes for other people who end up doing this:

 (a) ssh is slower, and the gitolite machine is not as reachable.

 (b) it affects your merge commit message.

As to (a), yes it's noticeable, but the extra couple of seconds isn't
really that big of a deal. Depending on exactly where you are, though,
you might end up wanting to use https:// to the public servers
instead.

But (b) actually ends up being annoying, because I don't like my merge
commits to contain references to repositories that aren't actually
available unless you have a kernel.org account.

I tried to edit things up by hand, but honestly, that just meant that
I forgot about 50% of the time. Do a

git log --author=Torvalds --grep=ssh://gitolite

to see my shameful lack of actually fixing up the end result.

Happily, once you realize that you have the attention span of a
slightly retarded chipmunk, and that you keep on forgetting to fix
things up, you hopefully also go "I'm a moron, but I can compensate
for that automatically".

Which is simple. Just create a .git/hooks/prepare-commit-msg file that contains

  #!/bin/sh
  sed -i 's|ssh://gitolite.kernel.org/|git://git.kernel.org/|g' "$1"

and make it executable, and git will do that commit message editing for you.

Tadaa! Now you don't look like quite the tool that I did.

  Linus

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


Dangling/orphaned shared library as MAP_DENYWRITE result ( BUG)

2017-11-16 Thread Lev Olshvang
Hello list, I applied MAP_DENYWRITE flag to shared object ( kernel 4.8) I compiled test shared library and small executable who uses it. Then executable which used it works as expected, and any attempt to change shared library rejected with EXTBUSY error. But when executable terminated, library is still busy. I though that kernel will clean inode counters, if nobody else reference it(and this is my case - I am the only user of this lib) Is this behaviour a BUG , I mean reference count is zero, but kernel not zeroed i_writecount ?) I suppose that the memory is unmapped, but how can I confirm it ? ( do not have pid for pmap ) Regars,Lev 

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


Re: sleep

2017-11-16 Thread Bruno E. O. Meneguele
On 14-11, Max Filippov wrote:
> On Tue, Nov 14, 2017 at 8:52 AM, Bruno E. O. Meneguele
>  wrote:
> > What
> > confused me for sometime was the 'atomic' vs 'interrupt' naming, but
> > after reading Robert's book it cames to the fact that they're the same.
> 
> Not exactly the same. Atomic means you're protected from some sort of
> interruption: e.g. you raise preemption counter and you're protected from
> scheduling, but you still may be interrupted, or you disable interrupts and
> you're protected from scheduling and interrupts, but there still may be an
> NMI.
> 

Ahh, well pointed. Got it. Thank you for the info :)


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


Re: Linux release & branch management

2017-11-16 Thread Carlo Caione
On Thu, Nov 16, 2017 at 1:27 AM, Anand Arumugam  wrote:
> Hello All,
>
> I am looking for some good wiki or documentation about about Linux branches
> and release management. I have read in the web about the benevolent dictator
> model of git is used by Linus. But what I'm looking for is the actual
> logistical details like what are the official blessed repos/branches that
> Linus' lieutenants use and where does the patch submitted by any contributor
> get to and how does it get to, etc. The recent email thread on submitting
> patches to Linus triggered this question for me.

look at https://elixir.free-electrons.com/linux/latest/source/MAINTAINERS

-- 
Carlo Caione

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


Re: Invoking a system call from within the kernel

2017-11-16 Thread Greg KH
On Wed, Nov 15, 2017 at 09:16:35PM -0500, Demi Marie Obenour wrote:
> I am looking to write my first driver.  This driver will create a single
> character device, which can be opened by any user.  The device will
> support one ioctl:
> 
> long ioctl_syscall(int fd, long syscall, long args[6]);
> 
> This is simply equivalent to:
> 
> syscall(syscall, args[0], args[1], args[2], args[3], args[4],
> args[5], args[6]);

Wait, why?  Why do you want to do something like this, what problem are
you trying to solve that you feel that something like this is the
solution?  Let's step back and see if there isn't a better way to do
this.

> and indeed I want it to behave *identically* to that.  That means that
> ptracers are notified about the syscall (and given the opportunity to
> update its arguments), and that seccomp_bpf filters are applied.
> Furthermore, it means that all arguments to the syscall need full
> validation, as if they came from userspace (because they do).
> 
> Is there an in-kernel API that allows one to invoke an arbitrary syscall
> with arguments AND proper ptrace/seccomp_bpf filtering?  If not, how
> difficult would it be to create one?

Wouldn't creating such an interface be more work than just using the
correct user/kernel interface in the first place?  :)

Again, what is the problem you are trying to solve here.

thanks,

greg k-h

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