Re: [PATCH 1/1] ARM: add printf format attribute to early_print()

2016-09-24 Thread Nicolas Iooss
On 28/08/16 18:58, Nicolas Iooss wrote: > Adding such an attribute is helpful to detect errors related to printf > formats at compile-time. > > Signed-off-by: Nicolas Iooss > --- > arch/arm/include/asm/setup.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

[PATCH 1/1] UBSAN: use uppercase K to format a kernel pointer

2016-07-29 Thread Nicolas Iooss
handle_object_size_mismatch() used %pk to format a kernel pointer in pr_err(). This seems to be a misspelling for %pK. Fixes: c6d308534aef ("UBSAN: run-time undefined behavior sanity checker") Signed-off-by: Nicolas Iooss --- lib/ubsan.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH 1/1] Bluetooth: add printf format attribute to hci_set_[fh]w_info()

2016-07-29 Thread Nicolas Iooss
to printf-formatting at build time. Signed-off-by: Nicolas Iooss --- include/net/bluetooth/hci_core.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index ee7fc47680a1..012e5031fe47 100644 --- a/include/net

[PATCH 1/1] x86/entry: spell EBX register correctly in documentation

2016-07-29 Thread Nicolas Iooss
As EBS does not mean anything reasonable in the context it is used, it seems like a misspelling for EBX. Signed-off-by: Nicolas Iooss --- arch/x86/entry/entry_64.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index

Re: [PATCH 1/1] UBSAN: use uppercase K to format a kernel pointer

2016-07-30 Thread Nicolas Iooss
On 07/29/2016 09:53 PM, Joe Perches wrote: > On Fri, 2016-07-29 at 13:10 +0200, Nicolas Iooss wrote: >> handle_object_size_mismatch() used %pk to format a kernel pointer in >> pr_err(). This seems to be a misspelling for %pK. > > Thanks Thanks for your feedbacks. I agree %

[PATCH 1/1] UBSAN: fix typo in format string

2016-07-30 Thread Nicolas Iooss
handle_object_size_mismatch() used %pk to format a kernel pointer with pr_err(). This seemed to be a misspelling for %pK, but using this to format a kernel pointer does not make much sence here. Therefore use %p instead, like in handle_missaligned_access(). Signed-off-by: Nicolas Iooss

Re: [Intel-gfx] [PATCH 1/1] drm/i915/dsi: silence a warning about uninitialized return value

2016-09-06 Thread Nicolas Iooss
On 06/09/16 12:21, Dave Gordon wrote: > On 04/09/16 19:58, Nicolas Iooss wrote: >> When building the kernel with clang and some warning flags, the compiler >> reports that the return value of dcs_get_backlight() may be >> uninitialized: >> >> drivers/gpu/drm/i9

Re: [Intel-gfx] [PATCH 1/1] drm/i915/dsi: silence a warning about uninitialized return value

2016-09-07 Thread Nicolas Iooss
On 07/09/16 18:03, Dave Gordon wrote: > On 06/09/16 21:36, Nicolas Iooss wrote: >> On 06/09/16 12:21, Dave Gordon wrote: >>> On 04/09/16 19:58, Nicolas Iooss wrote: >>>> When building the kernel with clang and some warning flags, the >>>> comp

[PATCH 1/1] RDS: add __printf format attribute to error reporting functions

2016-08-05 Thread Nicolas Iooss
This is helpful to detect at compile-time errors related to format strings. Signed-off-by: Nicolas Iooss --- net/rds/ib.h | 1 + net/rds/rds.h | 1 + 2 files changed, 2 insertions(+) diff --git a/net/rds/ib.h b/net/rds/ib.h index 046f7508c06b..45ac8e8e58f4 100644 --- a/net/rds/ib.h +++ b/net

[PATCH 1/1] brcmfmac: fix pmksa->bssid usage

2016-08-05 Thread Nicolas Iooss
che handling code"), which replaced pmksa->bssid by &pmksa->bssid while refactoring the code, without modifying struct cfg80211_pmksa definition. Fixes: 6c404f34f2bd ("brcmfmac: Cleanup pmksa cache handling code") Cc: sta...@ger.kernel.org Signed-off-by: Nicolas Iooss --

[PATCH 1/1] x86/mm: kaslr: fix -Wformat-security warning

2016-08-06 Thread Nicolas Iooss
not a string literal (potentially insecure) [-Wformat-security] debug_putstr(purpose); ^~~ Fix this by using "%s" in early_printk(). Signed-off-by: Nicolas Iooss --- arch/x86/lib/kaslr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH 1/1] ASoc: simple-card-utils: add __printf attribute

2016-08-06 Thread Nicolas Iooss
asoc_simple_card_set_dailink_name() uses devm_kvasprintf() to format some of its arguments. Adding a __printf attribute to this function makes it possible to detect at compile-time errors related to format strings. Signed-off-by: Nicolas Iooss --- include/sound/simple_card_utils.h | 1 + 1

[PATCH v2 1/2] ASoC: simple-card-utils: add __printf attribute

2016-08-24 Thread Nicolas Iooss
asoc_simple_card_set_dailink_name() uses devm_kvasprintf() to format some of its arguments. Adding a __printf attribute to this function makes it possible to detect at compile-time errors related to format strings. Signed-off-by: Nicolas Iooss --- include/sound/simple_card_utils.h | 1 + 1

[PATCH v2 2/2] MAINTAINERS: document ASoC header files

2016-08-24 Thread Nicolas Iooss
: Nicolas Iooss --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0bbe4b105c34..3f4e8bf042b9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -11012,6 +11012,7 @@ S: Supported F: Documentation/devicetree/bindings/sound/ F: Documentation/sound

Re: [PATCH 1/1] drm/amd/powerplay: initialize a variable before using it

2017-11-04 Thread Nicolas Iooss
On Sun, Sep 3, 2017 at 2:00 PM, Nicolas Iooss wrote: > > Function vega10_apply_state_adjust_rules() only initializes > stable_pstate_sclk_dpm_percentage when > data->registry_data.stable_pstate_sclk_dpm_percentage is not between 1 > and 100. The variable is then used to compute

[PATCH] input: elan_i2c - fix typo in include header guard

2015-03-19 Thread Nicolas Iooss
Signed-off-by: Nicolas Iooss Fixes: 6696777c6506 ("Input: add driver for Elan I2C/SMbus touchpad") --- drivers/input/mouse/elan_i2c.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/mouse/elan_i2c.h b/drivers/input/mouse/elan_i2c.h index e1

[PATCH] mac802154: fix typo in header guard

2015-03-19 Thread Nicolas Iooss
Signed-off-by: Nicolas Iooss Fixes: b6eea9ca354a ("mac802154: introduce driver-ops header") --- net/mac802154/driver-ops.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/mac802154/driver-ops.h b/net/mac802154/driver-ops.h index 98180a9fff4a..a0533357b9ea 10

Re: [PATCH] mac802154: fix typo in header guard

2015-03-19 Thread Nicolas Iooss
On 03/19/2015 09:46 PM, Paul Bolle wrote: > On Thu, 2015-03-19 at 14:37 +0100, Alexander Aring wrote: >> On Thu, Mar 19, 2015 at 09:23:40PM +0800, Nicolas Iooss wrote: >>> Signed-off-by: Nicolas Iooss >>> Fixes: b6eea9ca354a ("mac802154: introduce driver-ops he

[PATCH RESENT] coredump: fix cn_printf formatting warnings

2015-04-16 Thread Nicolas Iooss
her a user-namespace UID/GID or to init_user_ns UID/GID. As Documentation/sysctl/kernel.txt does not specify which user namespace is used to translate %u and %g in core_pattern, but lowercase %p and %i are used to format pid/tid in current process namespace, it seems intuitive that lowercase %u and

[PATCH] Revert "nfs: replace nfs_add_stats with nfs_inc_stats when add one"

2015-04-16 Thread Nicolas Iooss
rs" (in server->io_stats->bytes). Signed-off-by: Nicolas Iooss --- As I haven't got any reply from the message I sent a few weeks ago, I am now sending a patch. More details about the reason of this revert can be found in my previous e-mail, https://lkml.org/lkml/2015/3/24/226. fs/nfs

[PATCH] Staging: fbtft: fix header guard typo

2015-04-17 Thread Nicolas Iooss
drivers/staging/fbtft/internal.h header guard tests for __LINUX_FBTFT__INTERNAL_H but then defines __LINUX_FBTFT_INTERNAL_H (only 1 underscore) and uses the same name for the #endif comment. Use the same name everywhere. Signed-off-by: Nicolas Iooss --- drivers/staging/fbtft/internal.h | 2

Re: [PATCH v3 1/1] security: Add CONFIG_LSM_AUTO to handle default LSM stack ordering

2021-02-22 Thread Nicolas Iooss
On Mon, Feb 22, 2021 at 9:32 PM Casey Schaufler wrote: > > On 2/22/2021 10:31 AM, Mickaël Salaün wrote: > > On 22/02/2021 17:51, Casey Schaufler wrote: > >> On 2/22/2021 7:06 AM, Mickaël Salaün wrote: > >>> From: Mickaël Salaün > >>> > >>> Add a new option CONFIG_LSM_AUTO to enable users to deleg

Re: [PATCH v3 1/1] security: Add CONFIG_LSM_AUTO to handle default LSM stack ordering

2021-02-22 Thread Nicolas Iooss
On Mon, Feb 22, 2021 at 11:46 PM Casey Schaufler wrote: > > > On 2/22/2021 1:12 PM, Nicolas Iooss wrote: > > On Mon, Feb 22, 2021 at 9:32 PM Casey Schaufler > > wrote: > >> On 2/22/2021 10:31 AM, Mickaël Salaün wrote: > >>> On 22/02/2021 17:51, Casey Sc

[PATCH] eventpoll: fix uninitialized variable in epoll_ctl

2014-08-19 Thread Nicolas Iooss
quot;epoll: Add a flag, EPOLLWAKEUP, to prevent suspend while epoll events are ready") Signed-off-by: Nicolas Iooss --- fs/eventpoll.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index b10b48c..7bcfff9 100644 --- a/fs/eventpoll.

[PATCH 3/3] um/os-Linux: Use char[] for syscall_stub declarations

2014-10-12 Thread Nicolas Iooss
When declaring __syscall_stub_start, use the same type in UML userspace code as in arch/um/include/asm/sections.h. While at it, also declare batch_syscall_stub as char[]. Signed-off-by: Nicolas Iooss --- arch/um/os-Linux/skas/mem.c | 6 +++--- arch/um/os-Linux/skas/process.c | 11

[PATCH 1/3] um: Create asm/sections.h

2014-10-12 Thread Nicolas Iooss
arch/um/kernel/dyn.lds.S and arch/um/kernel/uml.lds.S define some UML-specific symbols. These symbols are used in the kernel part of UML with extern declarations. Move these declarations to a new header, asm/sections.h, like other architectures do. Signed-off-by: Nicolas Iooss --- arch/um

[PATCH 2/3] um: Use char[] for linker script address declarations

2014-10-12 Thread Nicolas Iooss
The linker script defines some variables which are declared either with type char[] in include/asm-generic/sections.h or with a meaningless integer type in arch/um/include/asm/sections.h. Fix this inconsistency by declaring every variable char[]. Signed-off-by: Nicolas Iooss --- arch/um

[PATCH] userns: simplify map_id_range_* functions

2015-07-25 Thread Nicolas Iooss
"break;" in the previous for loop was hit, it is simpler to directly compute the result and return it. Signed-off-by: Nicolas Iooss --- As I could not find any relevant entry for kernel/user_namespace.c in MAINTAINERS, I have built the list of recipients from the git history. Please let me

Re: [PATCH] userns: simplify map_id_range_* functions

2015-07-27 Thread Nicolas Iooss
On 07/27/2015 12:29 PM, Eric W. Biederman wrote: > Nicolas Iooss writes: > >> Functions map_id_range_down, map_id_down and map_id_up all used the >> construction: >> >> if (...) >> id = ... >> else >> id = ... >>

Re: [PATCH] fixdep: constify strrcmp arguments

2015-12-05 Thread Nicolas Iooss
Hello, I sent the path below a few weeks ago and did not have any feedback. Could you please review it? Thanks, Nicolas On 11/18/2015 07:07 PM, Nicolas Iooss wrote: > strrcmp only performs read access to the memory addressed by its > arguments so make them const pointers. > > S

Re: [PATCH] drm: do not use device name as a format string

2015-12-05 Thread Nicolas Iooss
Hello, I sent the path below a few weeks ago and did not have any feedback. Is there any issue in it that I need to fix before submitting it again? Thanks, Nicolas Iooss On 11/18/2015 06:58 PM, Nicolas Iooss wrote: > drm_dev_set_unique() formats its parameter using kvasprintf() but many >

Re: [PATCH] drm: do not use device name as a format string

2015-12-06 Thread Nicolas Iooss
On 12/06/2015 10:35 AM, Daniel Vetter wrote: >> On 11/18/2015 06:58 PM, Nicolas Iooss wrote: >>> drm_dev_set_unique() formats its parameter using kvasprintf() but many >>> of its callers directly pass dev_name(dev) as printf format string, >>> without any forma

Re: [PATCH] drm: do not use device name as a format string

2015-12-07 Thread Nicolas Iooss
On 12/07/2015 01:31 PM, Thierry Reding wrote: > On Mon, Dec 07, 2015 at 12:46:52PM +0100, Daniel Vetter wrote: >> On Mon, Dec 07, 2015 at 11:53:01AM +0200, Jani Nikula wrote: >>> On Mon, 07 Dec 2015, Daniel Vetter wrote: >>>> On Sun, Dec 06, 2015 at 11:16:32AM +0100,

[PATCH] drm: do not use device name as a format string

2015-11-18 Thread Nicolas Iooss
"%s" when using drm_dev_set_unique() with dev_name(). Signed-off-by: Nicolas Iooss --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 2 +- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c| 2 +- drivers/gpu/drm/tegra/drm.c | 2 +- drivers/gpu/drm/vc4/vc4_drv.c

[PATCH] fixdep: constify strrcmp arguments

2015-11-18 Thread Nicolas Iooss
strrcmp only performs read access to the memory addressed by its arguments so make them const pointers. Signed-off-by: Nicolas Iooss --- scripts/basic/fixdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index c68fd61fdc42

[PATCH] iwlwifi: mvm: fix tof.h header guard

2015-09-12 Thread Nicolas Iooss
Commit ce7929186a39 ("iwlwifi: mvm: add basic Time of Flight (802.11mc FTM) support") created drivers/net/wireless/iwlwifi/mvm/tof.h with a broken header guard: #ifndef __tof #define __tof_h__ ... #endif /* __tof_h__ */ Use __tof_h__ in the first line. Signed-off-b

[PATCH 2/2] drm: use dev_name as default unique name in drm_dev_alloc()

2015-12-08 Thread Nicolas Iooss
ecember/096441.html, the unique name of a new DRM device can be set as dev_name(parent_dev) when parent_dev is not NULL (vgem is a special case). Signed-off-by: Nicolas Iooss --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 4 drivers/gpu/drm/drm_drv.c| 9 + driv

[PATCH 1/2] drm: make drm_dev_set_unique() not use a format string

2015-12-08 Thread Nicolas Iooss
79266b1 ("configfs: fix kernel infoleak through user-controlled format string"). False positives which do not bring an extra value make the work of finding real bugs harder. Therefore remove the format-string feature from drm_dev_set_unique(). Signed-off-by: Nicolas Iooss --- drivers/

Re: [PATCH 1/2] drm: make drm_dev_set_unique() not use a format string

2015-12-08 Thread Nicolas Iooss
On 12/09/2015 12:28 AM, Emil Velikov wrote: > On 8 December 2015 at 22:12, Nicolas Iooss > wrote: >> drm_dev_set_unique() uses a format string to define the unique name of a >> device. This feature is not used as currently all the calls to this >> function either use &q

[PATCH] x86/boot: remove unused is_big_kernel variable

2016-02-14 Thread Nicolas Iooss
Variable is_big_kernel is defined in arch/x86/boot/tools/build.c but never used anywhere. Signed-off-by: Nicolas Iooss --- arch/x86/boot/tools/build.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/boot/tools/build.c b/arch/x86/boot/tools/build.c index a7661c430cd9..0702d2531bc7

[PATCH] um: always use the same type for __syscall_stub_start

2014-10-11 Thread Nicolas Iooss
: Nicolas Iooss --- arch/um/kernel/physmem.c| 2 +- arch/um/kernel/skas/mmu.c | 2 +- arch/um/os-Linux/skas/process.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/um/kernel/physmem.c b/arch/um/kernel/physmem.c index 30fdd5d0067b..f1d7ed26d638 100644

Re: [PATCH] um: always use the same type for __syscall_stub_start

2014-10-11 Thread Nicolas Iooss
2014-10-11 13:42 GMT+02:00 Richard Weinberger: > Am 11.10.2014 um 13:29 schrieb Nicolas Iooss: >> syscall_stub_start is declared with different types in C files: >> >> arch/um/kernel/physmem.c: extern int __syscall_stub_start; >> arch/um/kernel/skas/mmu.c: exte

Re: [PATCH] um: always use the same type for __syscall_stub_start

2014-10-11 Thread Nicolas Iooss
Le 11/10/2014 14:24, Richard Weinberger a écrit : > Am 11.10.2014 um 14:15 schrieb Nicolas Iooss: >> 2014-10-11 13:42 GMT+02:00 Richard Weinberger: >>> Am 11.10.2014 um 13:29 schrieb Nicolas Iooss: >>>> syscall_stub_start is declared with different types in C fil

[PATCH v2 2/2] coredump: add __printf attribute to cn_*printf functions

2015-05-14 Thread Nicolas Iooss
); ^ As si_signo is always an int, the format should be %d here. Signed-off-by: Nicolas Iooss --- fs/coredump.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/fs/coredump.c b/fs/coredump.c index 833a57bc856c..e52e0064feac 100644 --- a/fs/coredump.c ++

[PATCH v2 1/2] coredump: use from_kuid/kgid when formatting corename

2015-05-14 Thread Nicolas Iooss
While at it, format uid and gid values with %u instead of %d because uid_t/__kernel_uid32_t and gid_t/__kernel_gid32_t are unsigned int. Signed-off-by: Nicolas Iooss --- Documentation/sysctl/kernel.txt | 4 ++-- fs/coredump.c | 8 ++-- 2 files changed, 8 insertions(+), 4

Re: [PATCH] rcu: declare rcu_data variables in the section they are defined in

2015-05-04 Thread Nicolas Iooss
On 05/05/2015 04:33 AM, Paul E. McKenney wrote: > On Sun, May 03, 2015 at 12:27:02PM -0700, Josh Triplett wrote: >> On Sun, May 03, 2015 at 05:57:53PM +0800, Nicolas Iooss wrote: >>> Commit 11bbb235c26f ("rcu: Use DEFINE_PER_CPU_SHARED_ALIGNED for >>> rcu_d

[PATCH] rcu: make rcu_*_data variables static

2015-05-05 Thread Nicolas Iooss
..percpu..shared_aligned since commit 11bbb235c26f ("rcu: Use DEFINE_PER_CPU_SHARED_ALIGNED for rcu_data"). Signed-off-by: Nicolas Iooss --- kernel/rcu/tree.c | 2 +- kernel/rcu/tree.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tr

Re: [PATCH 1/2] coredump: use from_kuid/kgid_munged when formatting corename

2015-05-06 Thread Nicolas Iooss
On 05/06/2015 03:13 AM, Eric W. Biederman wrote: > Nicolas Iooss writes: > >> When adding __printf attribute to cn_printf, gcc reports some issues: >> >> fs/coredump.c:213:5: warning: format '%d' expects argument of type >> 'int', but argu

[PATCH] rcu: declare rcu_data variables in the section they are defined in

2015-05-03 Thread Nicolas Iooss
LLVMLinux because the variables are declared in .data..percpu but defined in .data..percpu..shared_aligned. Signed-off-by: Nicolas Iooss --- kernel/rcu/tree.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h index a69d3dab2ec4..c5

[PATCH] tracing: remove ftrace_output_event prototype

2015-05-03 Thread Nicolas Iooss
The prototype of ftrace_output_event was added by commit 1d6bae966e90 ("tracing: Move raw output code from macro to standalone function") but this function was not defined anywhere, and is still nowhere to be found. Signed-off-by: Nicolas Iooss --- When sending the patc

[PATCH 1/2] coredump: use from_kuid/kgid_munged when formatting corename

2015-05-03 Thread Nicolas Iooss
g in core_pattern, but lowercase %p and %i are used to format pid/tid in the current process namespace, it seems intuitive that lowercase %u and %g use the current user namespace. While at it, format uid and gid values with %u instead of %d because uid_t/__kernel_uid32_t and gid_t/__kernel_gid32_t are

[PATCH 2/2] coredump: add __printf attribute to cn_*printf functions

2015-05-03 Thread Nicolas Iooss
); ^ As si_signo is always an int, the format should be %d here. Signed-off-by: Nicolas Iooss --- fs/coredump.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fs/coredump.c b/fs/coredump.c index 99c8af640c5a..30fc1a83cb09 100644 --- a/fs/coredump.c ++

wl18xx: Bad format for rx_frames_per_rates in debugfs?

2015-03-12 Thread Nicolas Iooss
Hello, While adding __printf attributes to several functions in the kernel, I got a surprising gcc warning in drivers/net/wireless/ti/wl18xx/debugfs.c about "format '%u' expects argument of type 'unsigned int', but argument 5 has type 'u32 *'". Indeed it seems that commit c5d94169e818 ("wl18xx: u

[PATCH] wl18xx: show rx_frames_per_rates as an array as it really is

2015-03-13 Thread Nicolas Iooss
found by adding a __printf attribute to wl1271_format_buffer. gcc complained about "format '%u' expects argument of type 'unsigned int', but argument 5 has type 'u32 *'". Fixes: c5d94169e818 ("wl18xx: use new fw stats structures") Signed-off-by: N

nfs: wrong function to increment NFSIOS_READPAGES/WRITEPAGES stat counters?

2015-03-24 Thread Nicolas Iooss
Hello, Since commit 5a254d08b086 ("nfs: replace nfs_add_stats with nfs_inc_stats when add one") [1], nfs_readpage and nfs_do_writepage use nfs_inc_stats to increment NFSIOS_READPAGES and NFSIOS_WRITEPAGES instead of nfs_add_stats. However nfs_inc_stats is not similar as nfs_add_stats with parame

[PATCH] reiserfs: fix several reiserfs_warning calls

2015-03-06 Thread Nicolas Iooss
tribute to __reiserfs_warning and using "gcc -Wformat=2" when building the kernel. Fixes: 45b03d5e8e67 ("reiserfs: rework reiserfs_warning") Signed-off-by: Nicolas Iooss --- fs/reiserfs/bitmap.c | 4 ++-- fs/reiserfs/journal.c | 4 ++-- fs/reiserfs/procfs.c | 4 ++-- 3 files changed, 6 inser

[PATCH] coredump: fix cn_printf formatting warnings

2015-03-06 Thread Nicolas Iooss
her a user-namespace UID/GID or to init_user_ns UID/GID. As Documentation/sysctl/kernel.txt does not specify which user namespace is used to translate %u and %g in core_pattern, but lowercase %p and %i are used to format pid/tid in current process namespace, it seems intuitive that lowercase %u an

[PATCH] kdbus: fix minor typo in the walk-through example

2015-03-14 Thread Nicolas Iooss
s/receveiver/receiver/ Signed-off-by: Nicolas Iooss --- samples/kdbus/kdbus-workers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/kdbus/kdbus-workers.c b/samples/kdbus/kdbus-workers.c index d1d8f7a7697b..d331e0186899 100644 --- a/samples/kdbus/kdbus-workers.c

Re: [PATCH] coredump: fix cn_printf formatting warnings

2015-03-16 Thread Nicolas Iooss
Ping? Comments (or NACK or ACK) would be greatly appreciated on this patch. Of course, if you prefer to use init_user_ns instead of cred->user_ns, I can send an other patch. Nicolas On 03/06/2015 09:00 PM, Nicolas Iooss wrote: > Add __printf attributes to cn_*printf functions. With thes

Re: [PATCH] NFC: st21nfca: fix st21nfca_get_iso14443_3_uid data copy

2015-03-16 Thread Nicolas Iooss
Hello, I have not received any comments about this patch so I'm sending it again. Could you please review it? Nicolas On 03/03/2015 12:58 PM, Nicolas Iooss wrote: > st21nfca_get_iso14443_3_uid() does not correctly copy the uid from > uid_skb->data to its gate parameter. "g

reiserfs: inconsistent format in __RASSERT

2015-03-16 Thread Nicolas Iooss
Hello, When adding a __printf attribute to reiserfs_panic, gcc reported an inconsistent format for __RASSERT. This macro is currently defined in fs/reiserfs/reiserfs.h as: reiserfs_panic(NULL, "assertion failure", "(" #cond ") at " \ __FILE__ ":%i:%s: " format "\n",

Re: reiserfs: inconsistent format in __RASSERT

2015-03-16 Thread Nicolas Iooss
On 03/16/2015 09:05 PM, Jeff Mahoney wrote: > On 3/16/15 8:55 AM, Nicolas Iooss wrote: >> * I missed something in my analysis and in fact the PID argument >> is processed by reiserfs_panic (don't know where), or * the PID >> argument is not used and should be rem

[PATCH] reiserfs: fix __RASSERT format string

2015-03-16 Thread Nicolas Iooss
t; prefix. This bug is only triggered when using CONFIG_REISERFS_CHECK, otherwise __RASSERT is never used. Signed-off-by: Nicolas Iooss Fixes: c3a9c2109f84 ("reiserfs: rework reiserfs_panic") --- fs/reiserfs/reiserfs.h | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/reiserfs/reise

[PATCH] NFC: st21nfca: fix st21nfca_get_iso14443_3_uid data copy

2015-03-02 Thread Nicolas Iooss
C_NFCID1_MAXSIZE]" local variable is never initialized before being used in memcpy(target->nfcid1, uid, len). Fix this by replacing the local variable assignment with a memcpy. This was found by compiling Linux with "gcc -Wunused-but-set-parameter". Signed-off-by: Nicolas Iooss

[PATCH] ihex: restore missing default in switch statement

2015-03-04 Thread Nicolas Iooss
g with HOSTCC=clang and adding -Wunreachable-code-return to HOSTCFLAGS. Fixes: 2473238eac95 ("ihex: add support for CS:IP/EIP records") Signed-off-by: Nicolas Iooss --- firmware/ihex2fw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/firmware/ihex2fw.c b/firmware/ihex2fw.c index

[PATCH] MAINTAINERS: fix UTF-8 encoding

2015-03-04 Thread Nicolas Iooss
heir UTF-8 counterparts fixes grep. $ grep -n drivers/android MAINTAINERS 733:F: drivers/android/ This also fixes the display of https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/MAINTAINERS?id=v3.19#n713 Signed-off-by: Nicolas Iooss --- MAINTAINERS | 2 +- 1 file

Re: [PATCH] MAINTAINERS: fix UTF-8 encoding

2015-03-04 Thread Nicolas Iooss
-UTF-8-encoding.patch The following files are 8bit, but do not declare a Content-Transfer-Encoding. 0001-MAINTAINERS-fix-UTF-8-encoding.patch Which 8bit encoding should I declare [UTF-8]? y (mbox) Adding cc: Nicolas Iooss from line 'From: Nicolas Iooss ' (body) Adding cc: Nicolas Ioos

[PATCH] MAINTAINERS: fix UTF-8 encoding

2015-03-04 Thread Nicolas Iooss
heir UTF-8 counterparts fixes grep. $ grep -n drivers/android MAINTAINERS 733:F: drivers/android/ This also fixes the display of https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/MAINTAINERS?id=v3.19#n713 Signed-off-by: Nicolas Iooss --- MAINTAINERS | 2 +- 1 file

[PATCH] proc: get a reference to the owning module when opening file

2015-02-10 Thread Nicolas Iooss
this by making proc_reg_open grab a reference to the module owning pde->proc_fops. More information and example code to reproduce this oops can be found on https://bugzilla.kernel.org/show_bug.cgi?id=92511 Signed-off-by: Nicolas Iooss --- fs/proc/inode.c | 5 + 1 file changed, 5 inserti

Re: [PATCH] proc: get a reference to the owning module when opening file

2015-02-21 Thread Nicolas Iooss
On 02/18/2015 04:14 AM, Al Viro wrote: > On Wed, Feb 11, 2015 at 11:05:07AM +0800, Nicolas Iooss wrote: >> Fix this by making proc_reg_open grab a reference to the module owning >> pde->proc_fops. > > NAK. > > procfs doesn't pin modules while the file is opene

Invalid assignment to gate in st21nfca_get_iso14443_3_uid

2015-02-28 Thread Nicolas Iooss
Hello, While compiling Linux with -Wunused-but-set-parameter, gcc reported a warning in st21nfca_get_iso14443_3_uid function, about "gate" being set but not used [1]. By looking at the code, it is clear that "gate = uid_skb->data;" does nothing useful. The function is only called once, by st21nf

Bluetooth: always-true condition in dtl1_confcheck

2017-01-15 Thread Nicolas Iooss
Hello, Since commit 00990e7ce0b0 ("pcmcia: use autoconfiguration feature for ioports and iomem") function dtl1_confcheck() starts with the following statements (in drivers/bluetooth/dtl1_cs.c): static int dtl1_confcheck(struct pcmcia_device *p_dev, void *priv_data) { if ((p_dev->r

qla3xxx: u32 constant overflow in fm93c56a_select()

2017-01-15 Thread Nicolas Iooss
Hello, In drivers/net/ethernet/qlogic/qla3xxx.c, fm93c56a_select() currently calls: ql_write_nvram_reg(qdev, spir, ((ISP_NVRAM_MASK << 16) | qdev->eeprom_cmd_data)); and ISP_NVRAM_MASK is defined as (0x000F << 16). ql_write_nvram_reg() writes a 32-bit value but (ISP_NVRAM_MASK << 16) expa

[PATCH 1/1] crypto: img-hash - use dma_data_direction when calling dma_map_sg

2017-01-15 Thread Nicolas Iooss
) when calling dma_map_sg() and dma_unmap_sg(). Signed-off-by: Nicolas Iooss --- drivers/crypto/img-hash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/img-hash.c b/drivers/crypto/img-hash.c index a2e77b87485b..9b07f3d88feb 100644 --- a/drivers/crypto/img

[PATCH 1/1] ASoC: fsl_asrc: use dma_transfer_direction enum when calling dmaengine_prep_dma_cyclic

2017-01-15 Thread Nicolas Iooss
DMA_MEM_TO_DEV and DMA_FROM_DEVICE with DMA_DEV_TO_MEM to fix this type mismatch issue. Signed-off-by: Nicolas Iooss --- sound/soc/fsl/fsl_asrc_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/fsl/fsl_asrc_dma.c b/sound/soc/fsl/fsl_asrc_dma.c index dc30d780f874

Re: [PATCH v3 1/1] x86, relocs: add printf attribute to die()

2017-01-31 Thread Nicolas Iooss
Hello, As I have not received any comment on the patch I sent in December, I am wondering whether I did anything wrong with it. How can I get it queued for the next merge window? Thanks, Nicolas On 18/12/16 20:47, Nicolas Iooss wrote: > Adding such an attribute helps to detect errors in

Re: [PATCH v3 1/1] x86, relocs: add printf attribute to die()

2017-02-01 Thread Nicolas Iooss
On 01/02/17 10:04, Ingo Molnar wrote: > > * Nicolas Iooss wrote: > >> Adding such an attribute helps to detect errors in the format string at >> build time. After doing this, the compiler complains about such issues: >> >> arch/x86/tools/relocs.c:460:5:

Re: [PATCH v3 1/1] x86, relocs: add printf attribute to die()

2017-02-02 Thread Nicolas Iooss
On 02/02/17 02:39, h...@zytor.com wrote: > On January 31, 2017 10:52:11 AM PST, Nicolas Iooss > wrote: >> Hello, >> >> As I have not received any comment on the patch I sent in December, I >> am >> wondering whether I did anything wrong with it. How can I

[PATCH 1/1] IB/cxgb3: fix misspelling in header guard

2017-01-22 Thread Nicolas Iooss
Use CXGB3_... instead of CXBG3_... Signed-off-by: Nicolas Iooss --- include/uapi/rdma/cxgb3-abi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/rdma/cxgb3-abi.h b/include/uapi/rdma/cxgb3-abi.h index 48a19bda071b..d24eee12128f 100644 --- a/include/uapi/rdma

[PATCH 1/1] drm/amd/powerplay: fix misspelling in header guard

2017-01-22 Thread Nicolas Iooss
In smu7_clockpowergating.h, the #ifndef statement which prevents multiple inclusions of the header file uses _SMU7_CLOCK_POWER_GATING_H_ but the following #define statement uses _SMU7_CLOCK__POWER_GATING_H_. Signed-off-by: Nicolas Iooss --- drivers/gpu/drm/amd/powerplay/hwmgr

[PATCH 1/1] EDAC: always return an initialized value in knl_show_interleave_mode

2017-01-22 Thread Nicolas Iooss
lt case. While at it, make knl_show_interleave_mode() and show_interleave_mode() return const char* values as the returned pointers refer to read-only memory. Signed-off-by: Nicolas Iooss --- drivers/edac/sb_edac.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/driv

Re: [PATCH 1/1] EDAC: always return an initialized value in knl_show_interleave_mode

2017-01-22 Thread Nicolas Iooss
On 22/01/17 15:41, Borislav Petkov wrote: > On Sun, Jan 22, 2017 at 02:51:15PM +0100, Nicolas Iooss wrote: >> When building drivers/edac/sb_edac.c with compiler warning flags which >> aim to detect the use of uninitialized values at compile time, the >>

[PATCH v2 1/1] EDAC: kill ->show_interleave_mode()

2017-01-22 Thread Nicolas Iooss
compiler fails to understand that the default branch of the switch condition can never be reached because reg is a 2-bit value). Merge show_interleave_mode() and knl_show_interleave_mode() in a single implementation and use it without an indirect function pointer. Signed-off-by: Nicol

[PATCH 1/1] ath10k: use the right length of "background"

2016-10-29 Thread Nicolas Iooss
The word "background" contains 10 characters so the third argument of strncmp() need to be 10 in order to match this prefix correctly. Signed-off-by: Nicolas Iooss Fixes: 855aed1220d2 ("ath10k: add spectral scan feature") --- drivers/net/wireless/ath/ath10k/spectral.c | 2 +

[PATCH 1/1] nvdimm: use the right length of "pmem"

2016-10-29 Thread Nicolas Iooss
In order to test that the name of a resource begins with "pmem", call strncmp() with 4 as length instead of 3 to match the whole prefix. Fixes: 16660eaea0cc ("libnvdimm, namespace: update label implementation for multi-pmem") Signed-off-by: Nicolas Iooss --- drivers/nvdi

[PATCH 1/1] ALSA: bebob: use the right string length in check_audiophile_booted()

2016-10-29 Thread Nicolas Iooss
p(). This patch has only been compile-tested. Fixes: 9076c22ddd9d ("ALSA: bebob: Add support for M-Audio usual Firewire series") Signed-off-by: Nicolas Iooss --- sound/firewire/bebob/bebob.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/firewire/bebob/bebob.c

[PATCH 1/4] isdn/eicon: remove unused argument in DBG_ERR call

2016-10-29 Thread Nicolas Iooss
example the compiler complains when "%08x" is used to format a pointer, as it is done with all usages of "E(%08x)" in um_idi.c), this patch does not add any __printf attribute. This patch has only been compile-tested. Signed-off-by: Nicolas Iooss --- drivers/isdn/hardwar

[PATCH 4/4] isdn/eicon: use const strings with format arguments

2016-10-29 Thread Nicolas Iooss
Functions using a printf format argument do not modify the value of this argument. These functions can therefore use type "const char *" instead of "char *". This patch has only been compile-tested. Signed-off-by: Nicolas Iooss --- drivers/isdn/hardware/e

[PATCH 2/4] isdn/eicon: fix some message formatting errors

2016-10-29 Thread Nicolas Iooss
s patch does not add any __printf attribute. This patch has only been compile-tested. Signed-off-by: Nicolas Iooss --- drivers/isdn/hardware/eicon/message.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/isdn/hardware/eicon/message.c b/drivers/isdn/hardware/e

[PATCH 3/4] isdn/eicon: add some __printf attributes

2016-10-29 Thread Nicolas Iooss
Add __printf attributes to some functions. This helps detecting errors related to printf-formats at compile time. When doing this, gcc reports some issues in debug.c. Fix them. This patch has only been compile-tested. Signed-off-by: Nicolas Iooss --- drivers/isdn/hardware/eicon/debug.c

Re: sound: bebop: strncmp length oddity

2016-11-17 Thread Nicolas Iooss
On 17/11/16 21:07, Takashi Sakamoto wrote: > On Nov 17 2016 20:47, Takashi Iwai wrote: >> On Sat, 29 Oct 2016 23:37:00 +0200, >> Joe Perches wrote: >>> >>> 15 isn't the length of the string, is that really what's desired? >>> >>> linux/next/sound/firewire/bebob/bebop.c >>> >>> -

Re: [PATCH v2 1/1] x86, relocs: add function attributes to die()

2016-10-23 Thread Nicolas Iooss
Hello, A few weeks ago I sent the patch below and got a review, but this patch has not been applied yet in linux-next. Does it cause a problem I need to fix? Thanks, Nicolas On 05/09/16 17:28, Nilay Vaish wrote: > On 4 September 2016 at 11:51, Nicolas Iooss > wrote: >> When

Re: [PATCH 1/1] drm/i915/dsi: silence a warning about uninitialized return value

2016-10-23 Thread Nicolas Iooss
/patch/108941/ On 04/09/16 20:58, Nicolas Iooss wrote: > When building the kernel with clang and some warning flags, the compiler > reports that the return value of dcs_get_backlight() may be > uninitialized: > > drivers/gpu/drm/i915/intel_dsi_dcs_backlight.c:53:2: error: variable

Re: [PATCH 1/1] [media] ite-cir: initialize use_demodulator before using it

2016-10-23 Thread Nicolas Iooss
, Nicolas Iooss wrote: > Function ite_set_carrier_params() uses variable use_demodulator after > having initialized it to false in some if branches, but this variable is > never set to true otherwise. > > This bug has been found using clang -Wsometimes-uninitialized warning >

Re: [PATCH 1/1] [media] mb86a20s: always initialize a return value

2016-10-23 Thread Nicolas Iooss
:49, Nicolas Iooss wrote: > In mb86a20s_read_status_and_stats(), when mb86a20s_read_status() fails, > the function returns the value in variable rc without initializing it > first. Fix this by propagating the error code from variable status_nr. > > This bug has been found

[PATCH 1/1] libnvdimm, namespace: fix the type of name variable

2016-11-26 Thread Nicolas Iooss
o makes it look right. Signed-off-by: Nicolas Iooss --- drivers/nvdimm/namespace_devs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/namespace_devs.c index abe5c6bc756c..7569ba70cdde 100644 --- a/drivers/nvdimm/namespace_de

[PATCH 1/1] kthread: add __printf attributes

2016-11-26 Thread Nicolas Iooss
(they have been detected thanks to -Wmissing-format-attribute warning flag). Add the missing __printf attributes to the newly-introduced functions in order to detect formatting issues at build-time with -Wformat flag. Signed-off-by: Nicolas Iooss --- include/linux/kthread.h | 2 +- kernel

[PATCH 1/1] [media] tw686x: silent -Wformat-security warning

2016-11-26 Thread Nicolas Iooss
rity issue. Nevertheless adding a "%s" format string to silent the warning helps to detect real bugs in the kernel. Signed-off-by: Nicolas Iooss --- drivers/media/pci/tw686x/tw686x-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/tw686x/tw686x-core.c

Re: [PATCH 1/1] nvdimm: use the right length of "pmem"

2016-10-30 Thread Nicolas Iooss
On 30/10/16 16:50, Dan Williams wrote: > On Sat, Oct 29, 2016 at 4:28 AM, Nicolas Iooss > wrote: >> In order to test that the name of a resource begins with "pmem", call >> strncmp() with 4 as length instead of 3 to match the whole prefix. >> >> Fixes: 166

[PATCH 2/2] HID: intel-ish-hid: format 32-bit integers with %X

2016-12-22 Thread Nicolas Iooss
int') [-Werror,-Wformat] hid->vendor, hid->product); ^~~~ Signed-off-by: Nicolas Iooss --- drivers/hid/intel-ish-hid/ishtp-hid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hid/intel-ish-hid

  1   2   >