lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 17 Apr 2024 15:06:00 +0000
From: Saurav Kashyap <skashyap@...vell.com>
To: John Meneghini <jmeneghi@...hat.com>
CC: "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        GR-QLogic-Storage-Upstream <GR-QLogic-Storage-Upstream@...vell.com>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
        "guazhang@...hat.com" <guazhang@...hat.com>,
        Nilesh Javali
	<njavali@...vell.com>
Subject: RE: [EXTERNAL] [PATCH] scsi: qedf: make qedf_execute_tmf
 non-preemptible

Acked-by: Saurav Kashyap <skashyap@...vell.com>

> -----Original Message-----
> From: John Meneghini <jmeneghi@...hat.com>
> Sent: Wednesday, April 3, 2024 8:32 PM
> To: Saurav Kashyap <skashyap@...vell.com>
> Cc: linux-scsi@...r.kernel.org; linux-kernel@...r.kernel.org; GR-QLogic-Storage-
> Upstream <GR-QLogic-Storage-Upstream@...vell.com>;
> martin.petersen@...cle.com; guazhang@...hat.com; Nilesh Javali
> <njavali@...vell.com>
> Subject: [EXTERNAL] [PATCH] scsi: qedf: make qedf_execute_tmf non-
> preemptible
> 
> Prioritize security for external emails: Confirm sender and content safety before
> clicking links or opening attachments
> 
> ----------------------------------------------------------------------
> Stop calling smp_processor_id from preemptible code in qedf_execute_tmf.
> This results in BUGON when running an RT kernel.
> 
> [ 659.343280] BUG: using smp_processor_id() in preemptible [00000000] code:
> sg_reset/3646
> [ 659.343282] caller is qedf_execute_tmf+0x8b/0x360 [qedf]
> 
> Tested-by: Guangwu Zhang <guazhang@...hat.com>
> Cc: Saurav Kashyap <skashyap@...vell.com>
> Cc: Nilesh Javali <njavali@...vell.com>
> Signed-off-by: John Meneghini <jmeneghi@...hat.com>
> ---
>  drivers/scsi/qedf/qedf_io.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/scsi/qedf/qedf_io.c b/drivers/scsi/qedf/qedf_io.c
> index bf921caaf6ae..054a51713d55 100644
> --- a/drivers/scsi/qedf/qedf_io.c
> +++ b/drivers/scsi/qedf/qedf_io.c
> @@ -2324,9 +2324,6 @@ static int qedf_execute_tmf(struct qedf_rport
> *fcport, u64 tm_lun,
>  	io_req->fcport = fcport;
>  	io_req->cmd_type = QEDF_TASK_MGMT_CMD;
> 
> -	/* Record which cpu this request is associated with */
> -	io_req->cpu = smp_processor_id();
> -
>  	/* Set TM flags */
>  	io_req->io_req_flags = QEDF_READ;
>  	io_req->data_xfer_len = 0;
> @@ -2349,6 +2346,9 @@ static int qedf_execute_tmf(struct qedf_rport
> *fcport, u64 tm_lun,
> 
>  	spin_lock_irqsave(&fcport->rport_lock, flags);
> 
> +	/* Record which cpu this request is associated with */
> +	io_req->cpu = smp_processor_id();
> +
>  	sqe_idx = qedf_get_sqe_idx(fcport);
>  	sqe = &fcport->sq[sqe_idx];
>  	memset(sqe, 0, sizeof(struct fcoe_wqe));
> --
> 2.39.3
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ