[PATCH] security/lsm_hooks: Updated set/remove xattr documentation

2019-07-10 Thread Carmeli Tamir
it clearer for LSM programmers that when implememting these hooks they are responsible for the CAP check. Signed-off-by: Carmeli Tamir --- include/linux/lsm_hooks.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h

[PATCH] security/commoncap: Use xattr security prefix len

2019-07-06 Thread Carmeli Tamir
Using the existing defined XATTR_SECURITY_PREFIX_LEN instead of sizeof(XATTR_SECURITY_PREFIX) - 1. Pretty simple cleanup. Signed-off-by: Carmeli Tamir --- security/commoncap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/security/commoncap.c b/security/commoncap.c

[PATCH] fs/binfmt: Changed order of elf and misc to prevent privilege escalation

2019-06-17 Thread Carmeli Tamir
ability is prevented. Signed-off-by: Carmeli Tamir --- fs/binfmt_elf.c | 2 +- fs/binfmt_misc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index d4e11b2e04f6..3a2afe84943c 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -2411,7 +

[PATCH 2/2] Changed unsigned param type to unsigned int

2019-05-04 Thread Carmeli Tamir
From: Tamir Fixed a checkpatch warning for usage of unsigned type. Submitted as different patch in the series since it's not related to the change, just wanted to fix checkpatch warnings from it. Signed-off-by: Carmeli Tamir --- fs/filesystems.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH 1/2] Use list.h instead of file_system_type next

2019-05-04 Thread Carmeli Tamir
From: Tamir Changed file_system_type next field to list_head and refactored the code to use list.h functions. Signed-off-by: Carmeli Tamir --- fs/filesystems.c | 68 -- include/linux/fs.h | 2 +- 2 files changed, 36 insertions(+), 34 deletions

[PATCH 0/2] Refactor file_systems to use the kernel's list

2019-05-04 Thread Carmeli Tamir
in register_filesystem and find_filesystem), and eliminates unnecessary usage of * and & operators. Tested by comparing the lists in /proc/filesystems. Carmeli Tamir (2): Use list.h instead of file_system_type next Changed unsigned param type to unsigned int fs/filesystems.c

[PATCH 0/2] Refactor file_systems to use the kernel's list

2019-05-04 Thread Carmeli Tamir
in register_filesystem and find_filesystem), and eliminates unnecessary usage of * and & operators. Tested by comparing the lists in /proc/filesystems. Carmeli Tamir (2): Use list.h instead of file_system_type next Changed unsigned param type to unsigned int fs/filesystems.c

[PATCH v3 3/3] fat: New inline functions to determine the FAT variant (32, 16 or 12)

2018-12-16 Thread Carmeli Tamir
This patch introduces 3 new inline functions - is_fat12, is_fat16 and is_fat32, and replaces every occurrence in the code in which the FS variant (whether this is FAT12, FAT16 or FAT32) was previously checked using msdos_sb_info->fat_bits. Signed-off-by: Carmeli Tamir --- fs/fat/cache.c |

[PATCH v3 0/3] fat: Added functions to determine the FAT variant (12/16/32bit)

2018-12-16 Thread Carmeli Tamir
and readability. In addition, minor cleanups around code that checks for the FAT variant, and fixed comments from v1 and v2. Carmeli Tamir (3): Removed fat_first_ent Moved and inlined MAX_FAT IS_FAT functions fs/fat/cache.c| 2 +- fs/fat/dir.c | 4 ++-- fs/fat

[PATCH v3 2/3] fat: Moved MAX_FAT to fat.h and changed it to inline function

2018-12-16 Thread Carmeli Tamir
to save the double call to MSDOS_SB. This was suggested by j...@perches.com in the previous version. This patch is required for the next in the series, in which the variant (whether this is FAT12, FAT16 or FAT32) checks are replaced with new macros. Signed-off-by: Carmeli Tamir --- fs/fat/fat.h

[PATCH v3 1/3] fat: Removed FAT_FIRST_ENT macro

2018-12-16 Thread Carmeli Tamir
c%20%28SDA%20Contribution%29.pdf). Search for 'volume label'. 2. Microsoft Extensible Firmware Initiative, FAT32 File System Specification (https://staff.washington.edu/dittrich/misc/fatgen103.pdf). Search for 'volume label'. Signed-off-by: Carmeli Tamir --- fs/fat/inode.c

[PATCH v2 1/3] fat: Removed FAT_FIRST_ENT macro

2018-12-15 Thread Carmeli Tamir
c%20%28SDA%20Contribution%29.pdf). Search for 'volume label'. 2. Microsoft Extensible Firmware Initiative, FAT32 File System Specification (https://staff.washington.edu/dittrich/misc/fatgen103.pdf). Search for 'volume label'. Signed-off-by: Carmeli Tamir --- fs/fat/inode.c

[PATCH v2 2/3] fat: Moved MAX_FAT to fat.h and changed it to inline function

2018-12-15 Thread Carmeli Tamir
to save the double call to MSDOS_SB. This was suggested by j...@perches.com in the previous version. This patch is required for the next in the series, in which the variant (whether this is FAT12, FAT16 or FAT32) checks are replaced with new macros. Signed-off-by: Carmeli Tamir --- fs/fat/fat.h

[PATCH v2 3/3] fat: New inline functions to determine the FAT variant (32, 16 or 12)

2018-12-15 Thread Carmeli Tamir
This patch introduces 3 new inline functions - IS_FAT12, IS_FAT16 and IS_FAT32, and replaces every occurrence in the code in which the FS variant (whether this is FAT12, FAT16 or FAT32) was previously checked using msdos_sb_info->fat_bits. Signed-off-by: Carmeli Tamir --- fs/fat/cach

[PATCH v2 0/3] fat: Added functions to determine the FAT variant (12/16/32bit)

2018-12-15 Thread Carmeli Tamir
and readability. In addition, minor cleanups around code that checks for the FAT variant, and fixed comments from v1. Carmeli Tamir (3): Removed fat_first_ent Moved and inlined MAX_FAT IS_FAT functions fs/fat/cache.c| 2 +- fs/fat/dir.c | 4 ++-- fs/fat/fat.h

[PATCH 2/2] fat: New macros to determine the FAT variant (32, 16 or 12)

2018-12-10 Thread Carmeli Tamir
This patch introduces 3 new macros - IS_FAT12, IS_FAT16 and IS_FAT32, and replaces every occurrence in the code in which the FS variant (whether this is FAT12, FAT16 or FAT32) was previously checked using msdos_sb_info->fat_bits. Signed-off-by: Carmeli Tamir --- fs/fat/cache.c | 2 +- fs/

[PATCH 1/2] fat: Moved macros that won't work without fat.h

2018-12-10 Thread Carmeli Tamir
for the next in the series, in which the variant (whether this is FAT12, FAT16 or FAT32) checks are replaced with new macros. Signed-off-by: Carmeli Tamir --- fs/fat/fat.h | 22 +- include/uapi/linux/msdos_fs.h | 5 - 2 files changed, 17 insertions(+), 10

[PATCH 0/2] fat: Added macros to determine the FAT FS variant (12/16/32bit)

2018-12-10 Thread Carmeli Tamir
. Carmeli Tamir (2): fat: Moved macros that won't work without fat.h fat: New macros to determine the FAT variant (32, 16 or 12) fs/fat/cache.c| 2 +- fs/fat/dir.c | 4 ++-- fs/fat/fat.h | 28 ++-- fs/fat/fatent.c

[PATCH] fat: Replaced 11 magic to MSDOS_NAME for volume label

2018-11-24 Thread Carmeli Tamir
. https://github.com/dosfstools/dosfstools/blob/master/src/mkfs.fat.c Signed-off-by: Carmeli Tamir --- include/uapi/linux/msdos_fs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/msdos_fs.h b/include/uapi/linux/msdos_fs.h index fde7537..1216e6c 100644

[PATCH] fat: Replaced 11 magic to MSDOS_NAME for volume label

2018-11-24 Thread Carmeli Tamir
. https://github.com/dosfstools/dosfstools/blob/master/src/mkfs.fat.c Signed-off-by: Carmeli Tamir --- include/uapi/linux/msdos_fs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/msdos_fs.h b/include/uapi/linux/msdos_fs.h index fde7537..1216e6c 100644

[PATCH 2/3] staging: emxx_udc: Added missing __iomem modifier to handle p_regs

2018-11-07 Thread Carmeli Tamir
Since in nbu2ss_drv_probe() p_regs is assigned from mmio_base, which is marked as __iomem, p_regs also should be market with __iomem. Signed-off-by: Carmeli Tamir --- drivers/staging/emxx_udc/emxx_udc.c | 44 ++--- drivers/staging/emxx_udc/emxx_udc.h | 2 +- 2

[PATCH 3/3] staging: emxx_udc: Added missing le16_to_cpu conversions

2018-11-07 Thread Carmeli Tamir
Fixed sparse tool warnings due to missing convesion from le16 to cpu endienness. Signed-off-by: Carmeli Tamir --- drivers/staging/emxx_udc/emxx_udc.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers

[PATCH 2/3] staging: emxx_udc: Added missing __iomem modifier to handle p_regs

2018-11-07 Thread Carmeli Tamir
Since in nbu2ss_drv_probe() p_regs is assigned from mmio_base, which is marked as __iomem, p_regs also should be market with __iomem. Signed-off-by: Carmeli Tamir --- drivers/staging/emxx_udc/emxx_udc.c | 44 ++--- drivers/staging/emxx_udc/emxx_udc.h | 2 +- 2

[PATCH 3/3] staging: emxx_udc: Added missing le16_to_cpu conversions

2018-11-07 Thread Carmeli Tamir
Fixed sparse tool warnings due to missing convesion from le16 to cpu endienness. Signed-off-by: Carmeli Tamir --- drivers/staging/emxx_udc/emxx_udc.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers

[PATCH 0/3] staging: emxx_udc: Fixed all meaningful sparse warnings

2018-11-07 Thread Carmeli Tamir
This series fixes all meaningful sparse (running make C=2... ) warnings. The number of warnings is reduced from ~280 to 12 (only warnings of type 'expression using sizeof(void)' are left). Resent the series to Greg's request. Carmeli Tamir (3): staging: emxx_udc: Added static modifier

[PATCH 1/3] staging: emxx_udc: Added static modifier to udc_controller

2018-11-07 Thread Carmeli Tamir
Added static modifier to the udc_controller, since it's only required within emxx_udc.c. Signed-off-by: Carmeli Tamir --- drivers/staging/emxx_udc/emxx_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc

[PATCH 0/3] staging: emxx_udc: Fixed all meaningful sparse warnings

2018-11-07 Thread Carmeli Tamir
This series fixes all meaningful sparse (running make C=2... ) warnings. The number of warnings is reduced from ~280 to 12 (only warnings of type 'expression using sizeof(void)' are left). Resent the series to Greg's request. Carmeli Tamir (3): staging: emxx_udc: Added static modifier

[PATCH 1/3] staging: emxx_udc: Added static modifier to udc_controller

2018-11-07 Thread Carmeli Tamir
Added static modifier to the udc_controller, since it's only required within emxx_udc.c. Signed-off-by: Carmeli Tamir --- drivers/staging/emxx_udc/emxx_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc

[PATCH 3/3] Added missing le16_to_cpu conversions

2018-11-01 Thread Carmeli Tamir
Fixed sparse tool warnings due to missing convesion from le16 to cpu endienness. Previously posted without any feedback, now updated according to master. Signed-off-by: Carmeli Tamir --- drivers/staging/emxx_udc/emxx_udc.c | 22 -- 1 file changed, 12 insertions(+), 10

[PATCH 3/3] Added missing le16_to_cpu conversions

2018-11-01 Thread Carmeli Tamir
Fixed sparse tool warnings due to missing convesion from le16 to cpu endienness. Previously posted without any feedback, now updated according to master. Signed-off-by: Carmeli Tamir --- drivers/staging/emxx_udc/emxx_udc.c | 22 -- 1 file changed, 12 insertions(+), 10

[PATCH 2/3] staging: emxx_udc: Added missing __iomem modifier to handle p_regs

2018-11-01 Thread Carmeli Tamir
Since in nbu2ss_drv_probe() p_regs is assigned from mmio_base, which is marked as __iomem, p_regs also should be market with __iomem. Previously posted without any feedback, now updated according to master. Signed-off-by: Carmeli Tamir --- drivers/staging/emxx_udc/emxx_udc.c | 44

[PATCH 2/3] staging: emxx_udc: Added missing __iomem modifier to handle p_regs

2018-11-01 Thread Carmeli Tamir
Since in nbu2ss_drv_probe() p_regs is assigned from mmio_base, which is marked as __iomem, p_regs also should be market with __iomem. Previously posted without any feedback, now updated according to master. Signed-off-by: Carmeli Tamir --- drivers/staging/emxx_udc/emxx_udc.c | 44

[PATCH 1/3] staging: emxx_udc: Added static modifier to udc_controller

2018-11-01 Thread Carmeli Tamir
Added static modifier to the udc_controller, since it's only required within emxx_udc.c. Previously posted without any feedback, now updated according to master. Signed-off-by: Carmeli Tamir --- drivers/staging/emxx_udc/emxx_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 1/3] staging: emxx_udc: Added static modifier to udc_controller

2018-11-01 Thread Carmeli Tamir
Added static modifier to the udc_controller, since it's only required within emxx_udc.c. Previously posted without any feedback, now updated according to master. Signed-off-by: Carmeli Tamir --- drivers/staging/emxx_udc/emxx_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] scheduler: wait: Added missing include freezer.h

2018-10-26 Thread Carmeli Tamir
The function 'wait_event_freezable' calls '__wait_event_freezable' that uses 'try_to_freeze', which is defined in freezer.h. This causes a compilation error for callers of 'wait_event_freezables', forcing them to include also freezer.h. Signed-off-by: Carmeli Tamir --- include/linux/wait.h | 1

[PATCH] scheduler: wait: Added missing include freezer.h

2018-10-26 Thread Carmeli Tamir
The function 'wait_event_freezable' calls '__wait_event_freezable' that uses 'try_to_freeze', which is defined in freezer.h. This causes a compilation error for callers of 'wait_event_freezables', forcing them to include also freezer.h. Signed-off-by: Carmeli Tamir --- include/linux/wait.h | 1

[PATCH 2/3] staging: emxx_udc: Added missing __iomem modifier to handle p_regs

2018-10-17 Thread Carmeli Tamir
Since in nbu2ss_drv_probe() p_regs is assigned from mmio_base, which is marked as __iomem, p_regs also should be market with __iomem. Signed-off-by: Carmeli Tamir --- drivers/staging/emxx_udc/emxx_udc.c | 44 ++--- drivers/staging/emxx_udc/emxx_udc.h | 2 +- 2

[PATCH 3/3] staging: emxx_udc: Added missing le16_to_cpu conversions

2018-10-17 Thread Carmeli Tamir
Fixed sparse tool warnings due to missing convesion from le16 to cpu endienness. Signed-off-by: Carmeli Tamir --- drivers/staging/emxx_udc/emxx_udc.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers

[PATCH 2/3] staging: emxx_udc: Added missing __iomem modifier to handle p_regs

2018-10-17 Thread Carmeli Tamir
Since in nbu2ss_drv_probe() p_regs is assigned from mmio_base, which is marked as __iomem, p_regs also should be market with __iomem. Signed-off-by: Carmeli Tamir --- drivers/staging/emxx_udc/emxx_udc.c | 44 ++--- drivers/staging/emxx_udc/emxx_udc.h | 2 +- 2

[PATCH 3/3] staging: emxx_udc: Added missing le16_to_cpu conversions

2018-10-17 Thread Carmeli Tamir
Fixed sparse tool warnings due to missing convesion from le16 to cpu endienness. Signed-off-by: Carmeli Tamir --- drivers/staging/emxx_udc/emxx_udc.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers

[PATCH 1/3] staging: emxx_udc: Added static modifier to udc_controller

2018-10-17 Thread Carmeli Tamir
Added static modifier to the udc_controller, since it's only required within emxx_udc.c. Signed-off-by: Carmeli Tamir --- drivers/staging/emxx_udc/emxx_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc

[PATCH 1/3] staging: emxx_udc: Added static modifier to udc_controller

2018-10-17 Thread Carmeli Tamir
Added static modifier to the udc_controller, since it's only required within emxx_udc.c. Signed-off-by: Carmeli Tamir --- drivers/staging/emxx_udc/emxx_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc

[PATCH] STAGING/EMXX_UDC: Fixed all meaningful sparse errors.

2018-10-06 Thread Carmeli Tamir
Fixed all meaningful sparse errors: 1. Added static to udc_controller 2. Added mising __iomem modifier to handle p_regs 3. Added missing le16_to_cpu Signed-off-by: Tamir Carmeli --- drivers/staging/emxx_udc/emxx_udc.c | 69 +++--

[PATCH] STAGING/EMXX_UDC: Fixed all meaningful sparse errors.

2018-10-06 Thread Carmeli Tamir
Fixed all meaningful sparse errors: 1. Added static to udc_controller 2. Added mising __iomem modifier to handle p_regs 3. Added missing le16_to_cpu Signed-off-by: Tamir Carmeli --- drivers/staging/emxx_udc/emxx_udc.c | 69 +++--

[PATCH] STAGING/EMXX_UDC: emxx_udc.c: Fixed all meaningful sparse errors: 1. Added static to udc_controller 2. Added mising __iomem modifier to handle p_regs 3. Added missing le16_to_cpu

2018-10-05 Thread Carmeli Tamir
Signed-off-by: Tamir Carmeli --- drivers/staging/emxx_udc/Makefile | 2 +- drivers/staging/emxx_udc/emxx_udc.c | 69 +++-- drivers/staging/emxx_udc/emxx_udc.h | 2 +- 3 files changed, 38 insertions(+), 35 deletions(-) diff --git

[PATCH] STAGING/EMXX_UDC: emxx_udc.c: Fixed all meaningful sparse errors: 1. Added static to udc_controller 2. Added mising __iomem modifier to handle p_regs 3. Added missing le16_to_cpu

2018-10-05 Thread Carmeli Tamir
Signed-off-by: Tamir Carmeli --- drivers/staging/emxx_udc/Makefile | 2 +- drivers/staging/emxx_udc/emxx_udc.c | 69 +++-- drivers/staging/emxx_udc/emxx_udc.h | 2 +- 3 files changed, 38 insertions(+), 35 deletions(-) diff --git