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

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 1/1] scsi: fnic: add a space after %p in printf format

2017-12-11 Thread Nicolas Iooss
On Mon, Dec 11, 2017 at 11:22 PM, Bart Van Assche wrote: > > On Sun, 2017-12-10 at 20:23 +0100, Nicolas Iooss wrote: > > fnic_fcpio_icmnd_cmpl_handler() displays the value of sc with: > > > > FNIC_SCSI_DBG(KERN_INFO... > > "...

[PATCH 1/1] rtlwifi: always initialize variables given to RT_TRACE()

2017-12-10 Thread Nicolas Iooss
~~ drivers/net/wireless/realtek/rtlwifi/base.c:1671:4: note: uninitialized use occurs here reject_agg, ctrl_agg_size, agg_size); ^~ Fixes: 2635664e6e4a ("rtlwifi: Add rx ampdu cfg for btcoexist.") Signed-off-by: Nicolas Iooss --- dr

[PATCH 1/1] staging: rtl8723bs: make memcmp() calls consistent

2017-12-10 Thread Nicolas Iooss
sscanf(extra+4, "%u", &mode); The space between the key ("lps" and "ips") and the equal sign seems suspicious. Remove it in order to make the calls to memcmp() consistent. Signed-off-by: Nicolas Iooss --- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 4

[PATCH 1/1] scsi: fnic: add a space after %p in printf format

2017-12-10 Thread Nicolas Iooss
a space. Signed-off-by: Nicolas Iooss --- drivers/scsi/fnic/fnic_scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c index 242e2ee494a1..8cbd3c9f0b4c 100644 --- a/drivers/scsi/fnic/fnic_scsi.c +++ b/drivers/s

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

Re: [PATCH 1/2] RAS/CEC: Use the right length for "cec_disable"

2017-10-07 Thread Nicolas Iooss
On Tue, Oct 3, 2017 at 11:04 AM, Borislav Petkov wrote: > On Mon, Oct 02, 2017 at 05:42:56PM +0200, Thomas Gleixner wrote: >> On Mon, 2 Oct 2017, Borislav Petkov wrote: >> > From: Nicolas Iooss >> > >> > parse_cec_param() compares a string with "cec_dis

[tip:ras/urgent] RAS/CEC: Use the right length for "cec_disable"

2017-10-05 Thread tip-bot for Nicolas Iooss
Commit-ID: 69a330007091ea8a801dd9fcd897ec52f9529586 Gitweb: https://git.kernel.org/tip/69a330007091ea8a801dd9fcd897ec52f9529586 Author: Nicolas Iooss AuthorDate: Mon, 2 Oct 2017 11:28:35 +0200 Committer: Thomas Gleixner CommitDate: Thu, 5 Oct 2017 14:23:06 +0200 RAS/CEC: Use the right

[PATCH 1/1] staging/atomisp: fix header guards

2017-09-03 Thread Nicolas Iooss
#ifndef. Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Nicolas Iooss --- .../css2400/css_2400_system/hrt/input_formatter_subsystem_defs.h| 2 +- .../css2400/css_2401_csi2p_system/hrt/input_formatter_subsystem_defs.h | 2 +- .

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

2017-09-03 Thread Nicolas Iooss
support (v5)") Signed-off-by: Nicolas Iooss --- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c index 197174e562d2..c8d28f78c

[PATCH 1/1] x86/xen: fix section of xen_init_time_ops() in header

2017-09-03 Thread Nicolas Iooss
is initialized") Signed-off-by: Nicolas Iooss --- arch/x86/xen/xen-ops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h index 0d5004477db6..b2a5d48a2c2a 100644 --- a/arch/x86/xen/xen-ops.h +++ b/arch/x86/xen/xen-ops.h @@

[PATCH 1/1] dax: initialize variable pfn before using it

2017-09-03 Thread Nicolas Iooss
inode, vmf, length, pfn, ret); ^~~ Signed-off-by: Nicolas Iooss --- fs/dax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/dax.c b/fs/dax.c index ab925dc6647a..20e6d76d6fff 100644 --- a/fs/dax.c +++ b

[PATCH 1/1] RAS/CEC: use the right length of "cec_disable"

2017-09-03 Thread Nicolas Iooss
parse_cec_param() compares a string with "cec_disable" using only 7 characters of the 11-character-long string. Fix the length. Fixes: 011d82611172 ("RAS: Add a Corrected Errors Collector") Signed-off-by: Nicolas Iooss --- drivers/ras/cec.c | 2 +- 1 file changed, 1 inse

[PATCH v2 1/1] printk: add __printf attributes to internal functions

2017-05-23 Thread Nicolas Iooss
When compiling with -Wsuggest-attribute=format, gcc complains that some functions in kernel/printk/printk_safe.c transmit their argument to printf-like functions without having a printf attribute. Silence these warnings by adding relevant __printf attributes. Signed-off-by: Nicolas Iooss Acked

[PATCH 1/1] genksyms: add printf format attribute to error_with_pos()

2017-05-20 Thread Nicolas Iooss
=format] vfprintf(stderr, fmt, args); ^~~~ This would allow catching printf-format errors at compile time in callers to error_with_pos(). Add this attribute. Signed-off-by: Nicolas Iooss --- I am sending this to the maintainers listed in section "KERNEL BUILD + files below sc

[PATCH 2/2] pcmcia: nsp_cs: add __printf attribute to logging functions

2017-05-20 Thread Nicolas Iooss
Adding __printf attributes helps to detect errors in printf format strings at build time. Signed-off-by: Nicolas Iooss --- drivers/scsi/pcmcia/nsp_cs.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c index

[PATCH 1/2] scsi: nsp32: add __printf attribute to logging functions

2017-05-20 Thread Nicolas Iooss
x27;, but argument 6 has type 'pm_message_t {aka struct pm_message}' [-Werror=format=] nsp32_msg(KERN_INFO, "pci-suspend: pdev=0x%p, state=%ld, slot=%s, host=0x%p", pdev, state, pci_name(pdev), host); Fix all format string errors which were report

[PATCH 1/1] printk: add __printf attributes to internal functions

2017-05-20 Thread Nicolas Iooss
When compiling with -Wsuggest-attribute=format, gcc complains that some functions in kernel/printk/printk_safe.c transmit their argument to printf-like functions without having a printf attribute. Silence these warnings by adding relevant __printf attributes. Signed-off-by: Nicolas Iooss

[PATCH 1/1] pcmcia: remove left-over %Z format

2017-05-20 Thread Nicolas Iooss
Commit 5b5e0928f742 ("lib/vsprintf.c: remove %Z support") removed some usages of format %Z but forgot "%.2Zx". This makes clang 4.0 reports a -Wformat-extra-args warning because it does not know about %Z. Replace %Z with %z. Cc: sta...@vger.kernel.org # v4.11+ Signed-o

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

2017-05-16 Thread Nicolas Iooss
at 11:06 PM, Nicolas Iooss wrote: > On Tue, Mar 7, 2017 at 1:37 PM, Nicolas Iooss > wrote: >> On Tue, Mar 7, 2017 at 10:16 AM, Ingo Molnar wrote: >>> >>> * Nicolas Iooss wrote: >>> >>>> Adding such an attribute helps to detect errors in the form

[PATCH 1/1] drm/sti: use seq_puts to display a string

2017-03-31 Thread Nicolas Iooss
t a string literal and no format arguments [-Wformat-security] seq_printf(s, gdp_format_to_str[i].name); ^ Silence this warning by using seq_puts() instead. Signed-off-by: Nicolas Iooss --- drivers/gpu/drm/sti/sti_gdp.c | 2 +- 1 file changed, 1

Pointer type of _arp in __skb_flow_dissect()

2017-03-31 Thread Nicolas Iooss
Hello, Linux 4.11-rc4 contains the following code in function __skb_flow_dissect(), file net/core/flow_dissector.c: const struct arphdr *arp; struct arphdr *_arp; arp = __skb_header_pointer(skb, nhoff, sizeof(_arp), data, hlen, &_arp);

Re: [PATCH 1/1] apparmor: use SHASH_DESC_ON_STACK

2017-03-28 Thread Nicolas Iooss
Hello, I sent the following patch three weeks ago and have not got any reply. Could you please review it? Thanks, Nicolas On Sun, Mar 5, 2017 at 3:30 PM, Nicolas Iooss wrote: > When building the kernel with clang, the compiler fails to build > security/apparmor/crypto.c with the following

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

2017-03-28 Thread Nicolas Iooss
On Tue, Mar 7, 2017 at 1:37 PM, Nicolas Iooss wrote: > On Tue, Mar 7, 2017 at 10:16 AM, Ingo Molnar wrote: >> >> * Nicolas Iooss wrote: >> >>> Adding such an attribute helps to detect errors in the format string at >>> build time. After doing this, t

[PATCH 1/1] gconfig: remove misleading parentheses around a condition

2017-03-13 Thread Nicolas Iooss
ned-off-by: Nicolas Iooss --- scripts/kconfig/gconf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c index 26d208b435a0..cfb9c9d7 100644 --- a/scripts/kconfig/gconf.c +++ b/scripts/kconfig/gconf.c @@ -91

[PATCH 1/1] ALSA: es1688: Use strcpy() instead of sprintf()

2017-03-13 Thread Nicolas Iooss
There is no point in using sprintf() without a format string when strcpy() can perform the same operation. Signed-off-by: Nicolas Iooss --- sound/isa/es1688/es1688_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/isa/es1688/es1688_lib.c b/sound/isa/es1688

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

2017-03-07 Thread Nicolas Iooss
On Tue, Mar 7, 2017 at 10:16 AM, 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 some issues: >> >> arch/x86/tools/relocs

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

2017-03-05 Thread Nicolas Iooss
e file is included by relocs_64.c, these expressions are 64-bit unsigned integers. Add casts to unsigned long long, which length is always 64-bit, and use %llu to format sec->shdr.sh_size and sec->shdr.sh_offset in relocs.c. While at it, constify the format attribute of

[PATCH 1/1] apparmor: use SHASH_DESC_ON_STACK

2017-03-05 Thread Nicolas Iooss
aa_calc_profile_hash(). Signed-off-by: Nicolas Iooss --- security/apparmor/crypto.c | 32 +--- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/security/apparmor/crypto.c b/security/apparmor/crypto.c index de8dc78b6144..136f2a047836 100644 --- a/securi

[PATCH 1/1] selinux: include sys/socket.h in host programs to have PF_MAX

2017-03-05 Thread Nicolas Iooss
h. Therefore host programs have to rely on the definition from libc's /usr/include/bits/socket.h, included by . Fix the issue by using sys/socket.h in mdp and genheaders. When classmap.h is included by security/selinux/avc.c, it uses the kernel definition of PF_MAX, which makes the test cons

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

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-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

[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

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 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

[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] 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] 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

[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

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

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

[PATCH] [media] am437x-vpfe: always assign bpp variable

2016-12-27 Thread Nicolas Iooss
has been found by compiling the kernel with clang. Fixes: 417d2e507edc ("[media] media: platform: add VPFE capture driver support for AM437X") Cc: sta...@vger.kernel.org Signed-off-by: Nicolas Iooss --- drivers/media/platform/am437x/am437x-vpfe.c | 2 +- 1 file changed, 1 insertion(+

[PATCH 1/1] Coccinelle: memdup: fix the report mode

2016-12-27 Thread Nicolas Iooss
ge of some semantic patches") Signed-off-by: Nicolas Iooss --- scripts/coccinelle/api/memdup.cocci | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/coccinelle/api/memdup.cocci b/scripts/coccinelle/api/memdup.cocci index 3d1aa71b7579..8fd6437beda8 100644 ---

[PATCH 1/1] drm/i915/gvt: verify functions types in new_mmio_info()

2016-12-26 Thread Nicolas Iooss
e-mismatch] info->write = write ? write : intel_vgpu_default_mmio_write; ^ ~ ~ This allows the compiler to detect that sbi_ctl_mmio_write() returns a "bool" value instead of an expected "int" one. Fix

[PATCH 1/1] [media] v4l: rcar_fdp1: use %4.4s to format a 4-byte string

2016-12-26 Thread Nicolas Iooss
mat specifier "%4.4s" is also used by other media drivers to print pixelformat value. Signed-off-by: Nicolas Iooss --- drivers/media/platform/rcar_fdp1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/rcar_fdp1.c b/drivers/media/pla

[PATCH 2/2] scsi: qla2xxx: make msix_entries const

2016-12-26 Thread Nicolas Iooss
msix_entries and qla82xx_msix_entries arrays are never modified in drivers/scsi/qla2xxx/qla_isr.c. Move their contents to read-only data. Signed-off-by: Nicolas Iooss --- drivers/scsi/qla2xxx/qla_isr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi

[PATCH 1/2] scsi: qla2xxx: silent -Wformat-security warning

2016-12-26 Thread Nicolas Iooss
odified, introduce a "%s" format parameter in order to silent this -Wformat-security warning and make clang able to detect at compile time real bugs related to string formatting. Signed-off-by: Nicolas Iooss --- drivers/scsi/qla2xxx/qla_isr.c | 4 ++-- 1 file changed, 2 insertions(+)

[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

[PATCH 1/2] HID: intel-ish-hid: add printf attribute to print_log()

2016-12-22 Thread Nicolas Iooss
format parameter a const pointer as print_log() is not supposed to modify it. Signed-off-by: Nicolas Iooss --- drivers/hid/intel-ish-hid/ipc/pci-ish.c | 3 ++- drivers/hid/intel-ish-hid/ishtp/ishtp-dev.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/hid/intel

[tip:x86/urgent] x86/platform/intel/quark: Add printf attribute to imr_self_test_result()

2016-12-20 Thread tip-bot for Nicolas Iooss
Commit-ID: 9120cf4fd9ae77245ce9137869bcbd16575cc633 Gitweb: http://git.kernel.org/tip/9120cf4fd9ae77245ce9137869bcbd16575cc633 Author: Nicolas Iooss AuthorDate: Mon, 19 Dec 2016 14:21:44 +0100 Committer: Ingo Molnar CommitDate: Tue, 20 Dec 2016 09:37:24 +0100 x86/platform/intel/quark

[PATCH 1/1] xfs: silent -Wformat-security warning

2016-12-19 Thread Nicolas Iooss
silent the warning by calling xfs_warn with "%s" format string. Signed-off-by: Nicolas Iooss --- fs/xfs/xfs_log_recover.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 4a98762ec8b4..9208296e9f15

[PATCH 1/1] x86/platform/intel/quark: add printf attribute to imr_self_test_result()

2016-12-19 Thread Nicolas Iooss
the attribute. Signed-off-by: Nicolas Iooss --- arch/x86/platform/intel-quark/imr_selftest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/platform/intel-quark/imr_selftest.c b/arch/x86/platform/intel-quark/imr_selftest.c index f5bad40936ac..b8f562049cad 100644

Uninitialized variable in bfad_im_bsg_els_ct_request

2016-12-18 Thread Nicolas Iooss
ode and dereferencing self-initialized local variables looks black magic to me, could you please describe why this code is valid? It has recently been introduced by commit 01e0e15c8b3b ("scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directly"). Thanks, Nicolas Iooss [1] https://

Uninitialized variable in bfad_im_bsg_els_ct_request

2016-12-18 Thread Nicolas Iooss
ode and dereferencing self-initialized local variables looks black magic to me, could you please describe why this code is valid? It has recently been introduced by commit 01e0e15c8b3b ("scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directly"). Thanks, Nicolas Iooss [1] https://

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

2016-12-18 Thread Nicolas Iooss
e file is included by relocs_64.c, these expressions are 64-bit unsigned integers. Introduce a PRIuELF macro to define the right format to use when printing sh_size and sh_offset values. While at it, constify the format attribute of die(). Signed-off-by: Nicolas Iooss --- I sent the first ver

[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

[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] 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

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 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/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

[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 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 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/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] 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 +

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

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] 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 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] 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(-) >

[tip:mm/pkeys] x86/mm/pkeys: Do not skip PKRU register if debug registers are not used

2016-09-13 Thread tip-bot for Nicolas Iooss
Commit-ID: ba6d018e3d2f6a0fad58a668cadf66b2d1f80f59 Gitweb: http://git.kernel.org/tip/ba6d018e3d2f6a0fad58a668cadf66b2d1f80f59 Author: Nicolas Iooss AuthorDate: Sat, 10 Sep 2016 20:30:45 +0200 Committer: Thomas Gleixner CommitDate: Tue, 13 Sep 2016 15:52:28 +0200 x86/mm/pkeys: Do not

[tip:mm/pkeys] x86/mm/pkeys: Do not skip PKRU register if debug registers are not used

2016-09-13 Thread tip-bot for Nicolas Iooss
Commit-ID: 19ab2b679c4af895ac0f3e79eea14952a6b2b2ce Gitweb: http://git.kernel.org/tip/19ab2b679c4af895ac0f3e79eea14952a6b2b2ce Author: Nicolas Iooss AuthorDate: Sat, 10 Sep 2016 20:30:45 +0200 Committer: Thomas Gleixner CommitDate: Tue, 13 Sep 2016 15:12:17 +0200 x86/mm/pkeys: Do not

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

2016-09-11 Thread Nicolas Iooss
On 08/09/16 16:31, Dave Gordon wrote: > On 08/09/16 00:02, Nicolas Iooss wrote: >> 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 wrot

[PATCH 1/1] x86: do not skip PKRU register if debug registers are not used

2016-09-10 Thread Nicolas Iooss
when debug registers are in their default state. Signed-off-by: Nicolas Iooss --- arch/x86/kernel/process_64.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index 63236d8f84bf..a21068e49dac 100644 --- a/arch/

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

2016-09-10 Thread Nicolas Iooss
based ite-cir driver for several ITE CIRs") Signed-off-by: Nicolas Iooss --- drivers/media/rc/ite-cir.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c index 0f301903aa6f..63165d324fff 100644 --- a/drivers/media/rc/ite-cir.c +++

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

2016-09-10 Thread Nicolas Iooss
. Signed-off-by: Nicolas Iooss --- drivers/media/dvb-frontends/mb86a20s.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/dvb-frontends/mb86a20s.c b/drivers/media/dvb-frontends/mb86a20s.c index 41325328a22e..eca07432645e 100644 --- a/drivers/media/dvb-frontends/mb86a20s.c +++ b

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

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

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

2016-09-04 Thread Nicolas Iooss
^~~~ As intel_dsi->dcs_backlight_ports seems to be always initialized to a non-null value, the content of the for loop is always executed and there is no bug in the current code. Nevertheless the compiler has no way of knowing that assumption, so initialize variable 'data'

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

2016-09-04 Thread Nicolas Iooss
expressions are 64-bit unsigned integers. Introduce a PRIuELF macro to define the right format to use when printing these expressions. Signed-off-by: Nicolas Iooss --- arch/x86/tools/relocs.c| 14 +++--- arch/x86/tools/relocs.h| 3 ++- arch/x86/tools/relocs_32.c

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

2016-09-03 Thread Nicolas Iooss
On 03/09/16 17:16, Nilay Vaish wrote: > On 3 September 2016 at 09:50, Nicolas Iooss > wrote: >> >> arch/x86/tools/relocs.c:460:5: error: format specifies type 'int' >> but the argument has type 'Elf64_Xword' (a

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

2016-09-03 Thread Nicolas Iooss
signed long') [-Werror,-Wformat] sec->shdr.sh_offset, strerror(errno)); ^~~ To support both 32-bit and 64-bit modes, add casts to long types and use %lu and %ld to format the numbers. Signed-off-by: Nicolas Iooss --- arch/x86/tools/relocs

[PATCH 1/1] staging: rtl8192u: do not use undefined $(TOPDIR) in Makefile

2016-09-03 Thread Nicolas Iooss
drivers/staging/rtl8192u/ieee80211/Makefile uses $(TOPDIR) to configure an include directory, without defining this variable first. The path which is configured is therefore "/drivers/net/wireless", which does not seem to be the intended path. Remove the offending line. Signed-off-b

[PATCH v2 1/1] ASoC: Intel: Atom: add a missing star in a memcpy call

2016-08-28 Thread Nicolas Iooss
f filling the newly-allocated memory (which pointer is hold by *data). Fix this by merging kzalloc+memcpy into a single kmemdup() call. Thanks Joe Perches for suggesting using kmemdup() Fixes: 60dc8dbacb00 ("ASoC: Intel: sst: Add some helper functions") Cc: sta...@vger.kernel.org # 3.19.x

Re: Misuses of ** ? (was Re: [PATCH 1/1] ASoC: Intel: Atom: add a missing star in a memcpy call)

2016-08-28 Thread Nicolas Iooss
On 28/08/16 19:50, Joe Perches wrote: > On Sun, 2016-08-28 at 19:39 +0200, Nicolas Iooss wrote: >> In sst_prepare_and_post_msg(), when a response is received in "block", >> the following code gets executed: >> >> *data = kzalloc(block->size, GFP_KER

Re: [PATCH 1/1] ASoC: Intel: Atom: add a missing star in a memcpy call

2016-08-28 Thread Nicolas Iooss
On 28/08/16 20:17, Joe Perches wrote: > On Sun, 2016-08-28 at 19:39 +0200, Nicolas Iooss wrote: >> In sst_prepare_and_post_msg(), when a response is received in "block", >> the following code gets executed: >> >> *data = kzalloc(block->size, GFP_KER

[PATCH 1/1] ASoC: Intel: Atom: add a missing star in a memcpy call

2016-08-28 Thread Nicolas Iooss
f filling the newly-allocated memory (which pointer is hold by *data). Fix this by using *data in the memcpy() call. Fixes: 60dc8dbacb00 ("ASoC: Intel: sst: Add some helper functions") Cc: sta...@vger.kernel.org # 3.19.x Signed-off-by: Nicolas Iooss --- sound/soc/intel/atom/sst/sst_pv

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

2016-08-28 Thread Nicolas Iooss
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(-) diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h index

[PATCH 1/1] ceph: do not modify fi->frag in need_reset_readdir()

2016-08-28 Thread Nicolas Iooss
ry offset") Cc: sta...@vger.kernel.org # 4.7.x Signed-off-by: Nicolas Iooss --- fs/ceph/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index c64a0b794d49..df4b3e6fa563 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -597,7 +597,7 @@ static b

[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

[PATCH v2 1/1] printk: fix parsing of "brl=" option

2016-08-23 Thread Nicolas Iooss
upport into separate braille.[ch] files") Signed-off-by: Nicolas Iooss --- kernel/printk/braille.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/printk/braille.c b/kernel/printk/braille.c index 276762f3a460..d5760c42f042 100644 --- a/kernel/printk/brail

Re: [PATCH 1/1] printk: fix parsing of "brl=" option

2016-08-23 Thread Nicolas Iooss
On 23/08/16 18:25, Joe Perches wrote: > On Tue, 2016-08-23 at 17:47 +0200, Nicolas Iooss wrote: >> Commit bbeddf52adc1 ("printk: move braille console support into separate >> braille.[ch] files") moved the parsing of braille-related options into >> _braille_consol

[PATCH 1/1] printk: fix parsing of "brl=" option

2016-08-23 Thread Nicolas Iooss
ly updated to memcmp(*str, "brl,", 4) but not memcmp(str, "brl=", 4). Update the code to make "brl=" option work again. Fixes: bbeddf52adc1 ("printk: move braille console support into separate braille.[ch] files") Signed-off-by: Nicolas Iooss --- kerne

[PATCH 1/1] usb: usbip: vudc: fix left shift overflow

2016-08-23 Thread Nicolas Iooss
equires 35 bits to represent, but 'int' only has 32 bits [-Wshift-overflow] urb_p->urb->pipe &= ~(11 << 30); ~~ ^ ~~ Fixes: 79c02cb1fd5c ("usbip: vudc: Add vudc_rx") Signed-off-by: Nicolas Iooss --- drivers

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

2016-08-23 Thread Nicolas Iooss
On 23/08/16 12:09, Kuninori Morimoto wrote: > Hi Nicolas > >> include/sound/simple_card_utils.h is handled by ASoC maintainers, as >> stated in https://lkml.org/lkml/2016/8/22/307, and >> include/sound/simple_card.h seems to be an ASoC file too. >> &

  1   2   >