Re: [PATCH v3] scsi: require CAP_SYS_ADMIN to write to procfs interface

2017-11-04 Thread Aleksa Sarai
On 11/05/2017 01:56 PM, Aleksa Sarai wrote: Previously, the only capability effectively required to operate on the /proc/scsi interface was CAP_DAC_OVERRIDE (or for some other files, having an fsuid of GLOBAL_ROOT_UID was enough). This means that semi-privileged processes could interfere with cor

[PATCH v3] scsi: require CAP_SYS_ADMIN to write to procfs interface

2017-11-04 Thread Aleksa Sarai
Previously, the only capability effectively required to operate on the /proc/scsi interface was CAP_DAC_OVERRIDE (or for some other files, having an fsuid of GLOBAL_ROOT_UID was enough). This means that semi-privileged processes could interfere with core components of a system (such as causing a Do

Re: [PATCH V9 3/4] scsi: Align block queue to dma_get_cache_alignment()

2017-11-04 Thread kbuild test robot
Hi Huacai, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.14-rc7] [cannot apply to next-20171103] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.c

target-pending/for-next patches

2017-11-04 Thread Nicholas A. Bellinger
Hi all, Just a friendly email after catching up on patches this week, the majority of those outstanding on the list have been merged into target-pending/for-next. Please see below. For those who submitted patches, please have a look and let me know if anything is else missing. Note there are tw

[PATCH] scsi: Use vzalloc instead of vmalloc/memset

2017-11-04 Thread Himanshu Jha
Use vzalloc instead of vmalloc/memset to allocate memory filled with 0 value. Done using Coccinelle. Semantic patch used : @@ expression x,a; statement S; @@ - x = vmalloc(a); + x = vzalloc(a); if (x == NULL || ...) S - memset(x, 0, a); Signed-off-by: Himanshu Jha --- drivers/scsi/bfa/bfad.

Re: [PATCH v2] scsi: require CAP_SYS_ADMIN to write to procfs interface

2017-11-04 Thread Randy Dunlap
On 11/04/2017 01:26 PM, Aleksa Sarai wrote: > Previously, the only capability effectively required to operate on the > /proc/scsi interface was CAP_DAC_OVERRIDE (or for some other files, > having an fsuid of GLOBAL_ROOT_UID was enough). This means that > semi-privileged processes could interfere wi

[PATCH v2] scsi: require CAP_SYS_ADMIN to write to procfs interface

2017-11-04 Thread Aleksa Sarai
Previously, the only capability effectively required to operate on the /proc/scsi interface was CAP_DAC_OVERRIDE (or for some other files, having an fsuid of GLOBAL_ROOT_UID was enough). This means that semi-privileged processes could interfere with core components of a system (such as causing a Do

Re: [PATCH] scsi: require CAP_SYS_ADMIN to write to procfs interface

2017-11-04 Thread Aleksa Sarai
Previously, the only capability effectively required to operate on the /proc/scsi interface was CAP_DAC_OVERRIDE (or for some other files, having an fsuid of GLOBAL_ROOT_UID was enough). This means that semi-privileged processes could interfere with core components of a system (such as causing a D

Re: [PATCH] scsi: require CAP_SYS_ADMIN to write to procfs interface

2017-11-04 Thread Randy Dunlap
On 11/04/2017 11:59 AM, Aleksa Sarai wrote: > Previously, the only capability effectively required to operate on the > /proc/scsi interface was CAP_DAC_OVERRIDE (or for some other files, > having an fsuid of GLOBAL_ROOT_UID was enough). This means that > semi-privileged processes could interfere wi

[PATCH] scsi: require CAP_SYS_ADMIN to write to procfs interface

2017-11-04 Thread Aleksa Sarai
Previously, the only capability effectively required to operate on the /proc/scsi interface was CAP_DAC_OVERRIDE (or for some other files, having an fsuid of GLOBAL_ROOT_UID was enough). This means that semi-privileged processes could interfere with core components of a system (such as causing a Do

[PATCH] blk-mq: don't handle failure in .get_budget

2017-11-04 Thread Ming Lei
It is enough to just check if we can get the budget via .get_budget(). And we don't need to deal with device state change in .get_budget(). For SCSI, one issue to be fixed is that we have to call scsi_mq_uninit_cmd() to free allocated ressources if SCSI device fails to handle the request. And it i

Re: [PATCH] SCSI: don't get target/host busy_count in scsi_mq_get_budget()

2017-11-04 Thread Jens Axboe
On 11/03/2017 07:55 PM, Ming Lei wrote: > It is very expensive to atomic_inc/atomic_dec the host wide counter of > host->busy_count, and it should have been avoided via blk-mq's mechanism > of getting driver tag, which uses the more efficient way of sbitmap queue. > > Also we don't check atomic_re

[PATCH 4/4] target: Delete an error message for a failed memory allocation in two functions

2017-11-04 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 4 Nov 2017 13:43:22 +0100 Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/target/target_core_xcopy.c | 10 -- 1 file changed, 4

[PATCH 3/4] target: Improve a size determination in three functions

2017-11-04 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 4 Nov 2017 13:35:08 +0100 Replace the specification of data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This issue was detect

[PATCH 2/4] target: Combine two condition checks into one statement in target_xcopy_do_work()

2017-11-04 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 4 Nov 2017 13:26:46 +0100 The same label was used by goto statements after two condition checks. Thus use a single statement instead. Signed-off-by: Markus Elfring --- drivers/target/target_core_xcopy.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-)

[PATCH 1/4] target: Use common error handling code in three functions

2017-11-04 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 4 Nov 2017 13:13:20 +0100 Adjust jump targets so that a bit of exception handling can be better reused at the end of these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/target/target_core_xcopy.c

[PATCH 0/4] target: Adjustments for four function implementations

2017-11-04 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 4 Nov 2017 14:09:09 +0100 A few update suggestions were taken into account from static source code analysis. Markus Elfring (4): Use common error handling code in three functions Combine two condition checks into one statement in target_xcopy_do_work() Impro