Re: [PATCHv9 2/5] ppc/cell: trivial: replace get_unused_fd() by get_unused_fd_flags(0)

2014-10-16 Thread Yann Droneaud
Hi, Le mardi 14 octobre 2014 à 12:57 +1100, Michael Ellerman a écrit : > On Mon, 2014-10-13 at 21:30 +0200, Yann Droneaud wrote: > > This patch replaces calls to get_unused_fd() with equivalent call to > > get_unused_fd_flags(0) to preserve current behavor for existing code. > &

Re: [PATCHv8.1] fanotify: enable close-on-exec on events' fd when requested in fanotify_init()

2014-10-01 Thread Yann Droneaud
Hi, Le mercredi 01 octobre 2014 à 15:36 -0700, Andrew Morton a écrit : > On Mon, 29 Sep 2014 10:49:15 +0200 Yann Droneaud wrote: > > > According to commit 80af258867648 ('fanotify: groups can specify > > their f_flags for new fd'), file descriptors create

[PATCH] fanotify: add a flag to allow setting O_CLOEXEC on event fd

2014-10-02 Thread Yann Droneaud
|FAN_FD_CLOEXEC, O_RDONLY|O_LARGEFILE|O_CLOEXEC|O_NOATIME); Signed-off-by: Yann Droneaud --- Hi Andrew, While I believe fanotify_init() must enable close-on-exec when requested by userspace to prevent unwelcomed security issue, I understand your concerns regarding the possible

Re: [PATCH] fanotify: add a flag to allow setting O_CLOEXEC on event fd

2014-10-02 Thread Yann Droneaud
Hi, Le jeudi 02 octobre 2014 à 10:13 +0100, Pádraig Brady a écrit : > On 10/02/2014 08:52 AM, Yann Droneaud wrote: > > In order to not potentially break applications which were > > requesting O_CLOEXEC on event file descriptors but which > > actually need it to be not ef

[PATCHv8.2] fanotify: enable close-on-exec on events' fd when requested in fanotify_init()

2014-10-03 Thread Yann Droneaud
Cc: Richard Guy Briggs Cc: Eric Paris Cc: Al Viro Cc: Andrew Morton Cc: sta...@vger.kernel.org Cc: linux-...@vger.kernel.org Reviewed-by: Jan Kara Reviewed by: Heinrich Schuchardt Tested-by: Heinrich Schuchardt Signed-off-by: Yann Droneaud --- Hi Andrew, > Fair enough, it sounds like

Re: 32 bit user space compatibility

2014-11-03 Thread Yann Droneaud
/2014/kernel-recipes/lightning-talk-kernel-userspace-ABI/ [2] https://gitorious.org/opteya/talk-kernel-userspace-abi [3] http://kernel.recipes/ Regards. -- Yann Droneaud OPTEYA -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...

[PATCH v2 1/3] coccinelle: also catch kzfree() issues

2016-05-23 Thread Yann Droneaud
Since commit 3ef0e5ba4673 ('slab: introduce kzfree()'), kfree() is no more the only function to be considered: kzfree() should be recognized too. In particular, kzfree() must not be called on memory allocated through devm_*() functions. Cc: Johannes Weiner Signed-off-by: Yan

[PATCH v2 0/3] coccinelle: catchup on memory allocation functions

2016-05-23 Thread Yann Droneaud
ail-ydrone...@opteya.com [2] http://lkml.kernel.org/r/cover.1455638829.git.ydrone...@opteya.com Regards. Yann Droneaud (3): coccinelle: also catch kzfree() issues coccinelle: recognize more devm_* memory allocation functions coccinelle: catch krealloc() on devm_*() allocated memory scripts/cocci

[PATCH v2 3/3] coccinelle: catch krealloc() on devm_*() allocated memory

2016-05-23 Thread Yann Droneaud
, krealloc() must not be used on a pointer returned by devm_*() functions. Cc: Tejun Heo Cc: Pekka Enberg Acked-by: Julia Lawall Signed-off-by: Yann Droneaud --- scripts/coccinelle/free/devm_free.cocci | 4 1 file changed, 4 insertions(+) diff --git a/scripts/coccinelle/free/devm_free.cocci

[PATCH v2 2/3] coccinelle: recognize more devm_* memory allocation functions

2016-05-23 Thread Yann Droneaud
er Cc: Himangi Saraogi Cc: Geert Uytterhoeven Cc: Wolfram Sang Cc: Daniel Thompson Acked-by: Julia Lawall Signed-off-by: Yann Droneaud --- scripts/coccinelle/free/devm_free.cocci | 20 1 file changed, 20 insertions(+) diff --git a/scripts/coccinelle/free/devm_free.co

[PATCH 0/3] coccinelle: catchup on memory allocation functions

2016-02-16 Thread Yann Droneaud
pages() - free_pages() - free_page() I've ran coccicheck on drivers/staging and found no new issue, which is great, but that questions those patches' usefulness, YMMV. Regards. Yann Droneaud (3): coccinelle: also catch kzfree() issues coccinelle: recognize more devm_* memory alloc

[PATCH 2/3] coccinelle: recognize more devm_* memory allocation functions

2016-02-16 Thread Yann Droneaud
er Cc: Himangi Saraogi Cc: Geert Uytterhoeven Cc: Wolfram Sang Cc: Daniel Thompson Signed-off-by: Yann Droneaud --- scripts/coccinelle/free/devm_free.cocci | 20 1 file changed, 20 insertions(+) diff --git a/scripts/coccinelle/free/devm_free.cocci b/scripts/coccinelle/f

[PATCH 1/3] coccinelle: also catch kzfree() issues

2016-02-16 Thread Yann Droneaud
Since commit 3ef0e5ba4673 ('slab: introduce kzfree()'), kfree() is no more the only function to be considered. Cc: Johannes Weiner Signed-off-by: Yann Droneaud --- scripts/coccinelle/free/devm_free.cocci | 2 ++ scripts/coccinelle/free/kfree.cocci | 3 +++ scripts/cocci

[PATCH 3/3] coccinelle: catch krealloc() on devm_*() allocated memory

2016-02-16 Thread Yann Droneaud
, krealloc() must not be used on a pointer returned by devm_*() functions. Cc: Tejun Heo Cc: Pekka Enberg Signed-off-by: Yann Droneaud --- scripts/coccinelle/free/devm_free.cocci | 4 1 file changed, 4 insertions(+) diff --git a/scripts/coccinelle/free/devm_free.cocci b/scripts/coccinelle

[PATCH] arm64/mm: Remove hack in mmap randomize layout

2014-11-17 Thread Yann Droneaud
Cc: Anton Blanchard Cc: Benjamin Herrenschmidt Fixes: 1d18c47c735e ('arm64: MMU fault handling and page table management') Signed-off-by: Yann Droneaud --- arch/arm64/mm/mmap.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/arch/arm64/mm/mmap.c b/a

Re: Device Tree Blob (DTB) licence

2015-05-22 Thread Yann Droneaud
Hi, Le mardi 05 mai 2015 à 11:41 -0500, Rob Herring a écrit : > On Tue, May 5, 2015 at 5:05 AM, Yann Droneaud > wrote: > > > > I believe Device Tree Blob (.dtb file) built from kernel's Device > > Tree > > Sources (.dts, which #include .dtsi, which #inc

Re: Device Tree Blob (DTB) licence

2015-05-22 Thread Yann Droneaud
Hi, [removing Cc: licens...@fsf.org] Le vendredi 22 mai 2015 à 12:05 +0200, Yann Droneaud a écrit : > Le mardi 05 mai 2015 à 11:41 -0500, Rob Herring a écrit : > > On Tue, May 5, 2015 at 5:05 AM, Yann Droneaud > > > > wrote: > > > > > > I believe

[PATCH 0/3] seq_file allocation in seq_open()

2015-05-04 Thread Yann Droneaud
ts the use of file->private_data to hold pointer to struct seq_file. Yann Droneaud (3): fs: use seq_open_private() for proc_mounts fs: allocate structure unconditionally in seq_open() fs: documents seq_open()'s usage of file->private_data fs/mount.h | 3 --- fs/namespac

[PATCH 3/3] fs: documents seq_open()'s usage of file->private_data

2015-05-04 Thread Yann Droneaud
seq_open() stores its struct seq_file in file->private_data, thus, it must not be modified by user of seq_file. Link: http://lkml.kernel.org/r/cover.1430777196.git.ydrone...@opteya.com Signed-off-by: Yann Droneaud --- fs/seq_file.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a

[PATCH 2/3] fs: allocate structure unconditionally in seq_open()

2015-05-04 Thread Yann Droneaud
q_open(). Link: http://lkml.kernel.org/r/cover.1430777196.git.ydrone...@opteya.com Signed-off-by: Yann Droneaud --- fs/seq_file.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/fs/seq_file.c b/fs/seq_file.c index 555f82155be8..cb9c3dbd1a1e 100644 --- a/fs/seq_file.

[PATCH 1/3] fs: use seq_open_private() for proc_mounts

2015-05-04 Thread Yann Droneaud
ed to use seq_release_private(), in order to release the private structure allocated by seq_open_private(). Then, ->private is used directly instead of proc_mounts() macro to access to the proc_mounts structure. Link: http://lkml.kernel.org/r/cover.1430777196.git.ydrone...@opteya.com Signed-

Device Tree Blob (DTB) licence

2015-05-05 Thread Yann Droneaud
, dual licensed (any combination of X11, MIT, BSD, GPLv2). Regards. -- Yann Droneaud OPTEYA -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.ht

[PATCH] MAINTAINERS: add include/rdma/ to InfiniBand subsystem

2015-05-04 Thread Yann Droneaud
Most headers for InfiniBand/RDMA are located under include/rdma/ and include/uapi/rdma. Signed-off-by: Yann Droneaud --- Hi, While checking if Doug Ledford was added as maintainer for IB subsystem (and git tree updated), I've found the headers in rdma/ were not identified as being part

[PATCH v1 1/2] perf tools: shortcut PERF_FLAG_FD_CLOEXEC probing in case of EBUSY error

2015-03-09 Thread Yann Droneaud
error. Cc: Adrian Hunter Cc: David Ahern Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Cc: William Cohen Link: http://lkml.kernel.org/r/cover.1425901229.git.ydrone...@opteya.com Signed-off-by: Yann Droneaud --- tool

[PATCH v1 0/2] perf tool: improve error handling in perf_flag_probe()

2015-03-09 Thread Yann Droneaud
g/r/1406908014-8312-1-git-send-email-jo...@kernel.org [2] http://lkml.kernel.org/r/cover.1410595700.git.ydrone...@opteya.com [3] http://lkml.kernel.org/r/20140920121438.gb15...@krava.brq.redhat.com Yann Droneaud (2): perf tools: shortcut PERF_FLAG_FD_CLOEXEC probing in case of EBUSY

[PATCH v1 2/2] perf tools: report PERF_FLAG_FD_CLOEXEC probing error once

2015-03-09 Thread Yann Droneaud
Olsa Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Cc: William Cohen Link: http://lkml.kernel.org/r/cover.1425901229.git.ydrone...@opteya.com Reported-by: Jiri Olsa Signed-off-by: Yann Droneaud --- tools/perf/util/cloexec.c | 25 + 1

Re: Question on mutex code

2015-03-10 Thread Yann Droneaud
om happening? > If not, should I post a patch that fixes it to LKML? Or is it > considered too "theoretical" and cannot happen in practice? > I haven't looked at your explanations, you should have come with a reproductible test case to demonstrate the issue (involving sl

Re: [GIT PULL] please pull infiniband.git

2015-02-07 Thread Yann Droneaud
n. > > Sorry for sending this at the very end of the release cycle, but we > didn't realize the scope of the required fix until just now. > I hope this could go in v3.19 as, at this stage, we don't want to expose any bits of this ABI in a released kernel. Regards. -- Ya

[PATCH] kbuild: support W=e to make build abort in case of warning

2015-02-01 Thread Yann Droneaud
he compiler. In the end, people not sane enough can do not so useful thing such as 'make W=123e'. Signed-off-by: Yann Droneaud --- Makefile | 1 + scripts/Makefile.extrawarn | 4 2 files changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 6b69223a5

Re: [PATCH 1/2] infiniband: Help gcc generate better code for ocrdma_srq_toggle_bit

2015-01-31 Thread Yann Droneaud
x % 32)); > > > > - if (srq->idx_bit_fields[i] & mask) > > - srq->idx_bit_fields[i] &= ~mask; > > - else > > - srq->idx_bit_fields[i] |= mask; > > + srq->idx_bit_fields[i] ^= mask; > > } > > >

ia64: implicit declaration of functions since change on

2015-01-31 Thread Yann Droneaud
ude/linux/dmar.h Simplify include/linux/dmar.h a bit based on the fact that both CONFIG_INTEL_IOMMU and CONFIG_IRQ_REMAP select CONFIG_DMAR_TABLE. Signed-off-by: Jiang Liu Signed-off-by: Joerg Roedel Regards. -- Yann Droneaud OPTEYA -- To unsubscribe from this list: send t

Re: [PATCH] perf tools: Work around lack of sched_getcpu in glibc < 2.6.

2015-02-16 Thread Yann Droneaud
if > > while (1) { > /* check cloexec flag */ I've reviewed the use of __GLIBC_PREREQ(2, 6), but not whether using cpu = 0 is OK if sched_getcpu() is not available. Reviewed-by: Yann Droneaud Regards. -- Yann Droneaud OPTEYA -- To unsubscribe from this

Re: [PATCH v2 0/5] pid: add pidfd_open()

2019-04-01 Thread Yann Droneaud
hink it would punch a hole in chroot() ... (but in 2019, nobody should rely on it for security purpose). Regards. -- Yann Droneaud OPTEYA

Re: [PATCH 1/2] string: Add stracpy and stracpy_pad mechanisms

2019-07-24 Thread Yann Droneaud
standard, is supposed to return the length of the formatted string, regarless of the size of the destination buffer. So encouraging developper to write something like code below because snprintf() in kernel behave in a non-standard way, will likely create some issues in the near future. for(;...;) offset += snprintf(buf + offset, size - offset, "..", ); (Reminder: the code below is not safe and shouldn't be used) Regards. -- Yann Droneaud OPTEYA

Re: [RFC] UAPI: Check headers by compiling all together as C++

2018-09-05 Thread Yann Droneaud
can't they do the C namespace trick > themselves when they do the import? That must be how they are doing it > today, right? > They can't. Adding extern "C" { } doesn't magically make "class" a non keyword. Even if it was the case, writing C++ code

Re: [PATCH 05/11] UAPI: coda: Don't use internal kernel structs in UAPI

2018-09-05 Thread Yann Droneaud
d from userspace. So the structure can be moved back to . > #define CODA_REQ_ASYNC 0x1 > All CODA_REQ_* defines internals to kernel side and not exchanged with userspace. Please move them back to Regards. -- Yann Droneaud OPTEYA

Re: [RFC] UAPI: Check headers by compiling all together as C++

2018-09-06 Thread Yann Droneaud
Le mercredi 05 septembre 2018 à 19:33 +0200, Yann Droneaud a écrit : > Le mercredi 05 septembre 2018 à 18:55 +0200, Greg KH a écrit : > > On Wed, Sep 05, 2018 at 04:54:27PM +0100, David Howells wrote: > > > > > > Here's a set of patches that inserts a step into

Re: [PATCH 05/11] UAPI: coda: Don't use internal kernel structs in UAPI

2018-09-06 Thread Yann Droneaud
Hi, Le jeudi 06 septembre 2018 à 08:13 +0100, David Howells a écrit : > Yann Droneaud wrote: > > > This structure should not have been exposed to userspace in the > > first > > place: it's unusable by userspace as it is. It was incorrect to > > have it >

Re: [kernel-hardening] [PATCH v2] time: Remove CONFIG_TIMER_STATS

2017-02-09 Thread Yann Droneaud
Hi, Don't forget to send to linux-...@vger.kernel.org Le mercredi 08 février 2017 à 11:26 -0800, Kees Cook a écrit : > Currently CONFIG_TIMER_STATS exposes process information across > namespaces: > > kernel/time/timer_list.c print_timer(): > > SEQ_printf(m, ", %s/%d", tmp, timer->star

Re: [PATCH v3 1/7] random: Simplify API for random address requests

2016-08-04 Thread Yann Droneaud
) % range << PAGE_SHIFT); > +} > + >  /* Interface for in-kernel drivers of true hardware RNGs. >   * Those devices may produce endless random bits and will be > throttled >   * when our pool is full. >  Regards. --  Yann Droneaud OPTEYA

[PATCHv1 1/3] coccinelle: also catch kzfree() issues

2016-02-22 Thread Yann Droneaud
Since commit 3ef0e5ba4673 ('slab: introduce kzfree()'), kfree() is no more the only function to be considered. In particular, kzfree() must not be called on memory allocated through devm_*() functions. Cc: Johannes Weiner Signed-off-by: Yann Droneaud --- Hi Julia, As you suggested

Re: [PATCHv1 1/3] coccinelle: also catch kzfree() issues

2016-02-22 Thread Yann Droneaud
Le lundi 22 février 2016 à 09:20 -0500, Julia Lawall a écrit : > On Mon, 22 Feb 2016, Yann Droneaud wrote: > > > Since commit 3ef0e5ba4673 ('slab: introduce kzfree()'), > > kfree() is no more the only function to be considered. > > > > In particula

[PATCH 4/3] binfmt/elf: don't expose prandom_u32() state

2019-06-13 Thread Yann Droneaud
time. Instead this patch makes use of get_random_u64() to seed once a local PRNG. The local PRNG can be used safely to produces the random offsets, exposing its internal state won't harm. Link: https://lore.kernel.org/lkml/cover.1560423331.git.ydrone...@opteya.com Signed-off-by: Yann Dro

[PATCH 1/3] binfmt/elf: use functions for stack manipulation

2019-06-13 Thread Yann Droneaud
lting stack pointer on 16 bytes boundary. The macro is replaced by elf_stack_add_items() followed by elf_stack_align(). Link: https://lore.kernel.org/lkml/cover.1560423331.git.ydrone...@opteya.com Signed-off-by: Yann Droneaud --- fs/binfmt_elf.c | 68 ---

[PATCH 0/3] ELF interpretor info: align and add random padding

2019-06-13 Thread Yann Droneaud
security as I'm not aware of any attack that can be prevented with this mechanism in place. Regards. Yann Droneaud (3): binfmt/elf: use functions for stack manipulation binfmt/elf: align AT_RANDOM array binfmt/elf: randomize padding between ELF interp info fs/binfmt_elf.c

[PATCH 3/3] binfmt/elf: randomize padding between ELF interp info

2019-06-13 Thread Yann Droneaud
t variables, if someone want to scare userspace). [1] https://www.openwall.com/lists/kernel-hardening/2019/03/29/3 Link: https://lore.kernel.org/lkml/cover.1560423331.git.ydrone...@opteya.com Cc: Elena Reshetova Signed-off-by: Yann Droneaud --- fs/binfmt_elf.c | 30 ++

[PATCH 2/3] binfmt/elf: align AT_RANDOM array

2019-06-13 Thread Yann Droneaud
.org/ [3] https://sourceware.org/ml/libc-alpha/2008-10/msg00013.html [1] https://lore.kernel.org/lkml/20081003001616.gn10...@outflux.net/ Link: https://lore.kernel.org/lkml/cover.1560423331.git.ydrone...@opteya.com Signed-off-by: Yann Droneaud --- fs/binfmt_elf.c | 16 1 file change

Re: [PATCH v1 1/2] fork: add clone3

2019-05-29 Thread Yann Droneaud
kargs->stack_size = args.stack_size; > + kargs->tls = args.tls; > + > + return 0; > +} > + > +SYSCALL_DEFINE2(clone3, struct clone_args __user *, uargs, size_t, size) > +{ > + int err; > + > + struct kernel_clone_args kargs; > + > + err = copy_clone_args_from_user(&kargs, uargs, size); > + if (err) > + return err; > + > + return _do_fork(&kargs); > } > #endif > Regards. -- Yann Droneaud OPTEYA

Re: [RFCv2 6/6] mm: extend process_madvise syscall to support vector arrary

2019-05-31 Thread Yann Droneaud
esult of each operation */ > + const struct iovec __user *results; > + /* input address ranges */ > + const struct iovec __user *ranges; Using pointer type in uAPI structure require a 'compat' version of the syscall need to be provided. If using iovec too. > +}; &

Re: [PATCH v1 1/2] fork: add clone3

2019-06-01 Thread Yann Droneaud
Hi, Le samedi 01 juin 2019 à 00:08 +0200, Christian Brauner a écrit : > On Wed, May 29, 2019 at 05:42:14PM +0200, Yann Droneaud wrote: > > Le mercredi 29 mai 2019 à 17:22 +0200, Christian Brauner a écrit : > > > This adds the clone3 system call. > > > > > >

Re: [kernel-hardening] [PATCH v2 0/5] stackprotector: ascii armor the stack canary

2017-09-20 Thread Yann Droneaud
to set to 0 in each canary ? Regards. -- Yann Droneaud OPTEYA

Re: IB/core: Fine-tuning for ib_is_udata_cleared()

2016-08-22 Thread Yann Droneaud
  goto free; > I find that the two update steps should work in principle, > shouldn't they? > It would be better to squash them here. Regards. --  Yann Droneaud OPTEYA

[tip:perf/core] perf: Introduce a flag to enable close-on-exec in perf_event_open()

2014-01-12 Thread tip-bot for Yann Droneaud
Commit-ID: a21b0b354d4ac39be691f51c53562e2c24443d9e Gitweb: http://git.kernel.org/tip/a21b0b354d4ac39be691f51c53562e2c24443d9e Author: Yann Droneaud AuthorDate: Sun, 5 Jan 2014 21:36:33 +0100 Committer: Ingo Molnar CommitDate: Sun, 12 Jan 2014 10:16:59 +0100 perf: Introduce a flag to

[tip:perf/core] perf tools: Remove unused test-volatile-register-var.c

2014-01-14 Thread tip-bot for Yann Droneaud
Commit-ID: 26f7f9877234e6b9ed87eff4ca450631bafe0182 Gitweb: http://git.kernel.org/tip/26f7f9877234e6b9ed87eff4ca450631bafe0182 Author: Yann Droneaud AuthorDate: Sat, 11 Jan 2014 18:48:15 +0100 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 13 Jan 2014 17:20:05 -0300 perf tools

[tip:perf/core] perf tools: Enable close-on-exec flag on perf file descriptor

2014-07-18 Thread tip-bot for Yann Droneaud
Commit-ID: 57480d2cd93579d665e57e144e1e63f7f02ef058 Gitweb: http://git.kernel.org/tip/57480d2cd93579d665e57e144e1e63f7f02ef058 Author: Yann Droneaud AuthorDate: Mon, 30 Jun 2014 22:28:47 +0200 Committer: Jiri Olsa CommitDate: Fri, 18 Jul 2014 09:09:34 +0200 perf tools: Enable close-on

[tip:perf/urgent] perf/x86: Fix copy_from_user_nmi() return if range is not ok

2015-07-06 Thread tip-bot for Yann Droneaud
Commit-ID: ebf2d2689de551d90965090bb991fc640a0c0d41 Gitweb: http://git.kernel.org/tip/ebf2d2689de551d90965090bb991fc640a0c0d41 Author: Yann Droneaud AuthorDate: Mon, 22 Jun 2015 21:38:43 +0200 Committer: Ingo Molnar CommitDate: Mon, 6 Jul 2015 14:09:27 +0200 perf/x86: Fix

<    1   2   3