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]
Message-ID: <20230110200403.GA23567@quicinc.com>
Date:   Tue, 10 Jan 2023 12:04:03 -0800
From:   Guru Das Srinagesh <quic_gurus@...cinc.com>
To:     Bjorn Andersson <andersson@...nel.org>
CC:     Sibi Sankar <quic_sibis@...cinc.com>, <agross@...nel.org>,
        <linux-arm-msm@...r.kernel.org>, <devicetree@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>,
        <krzysztof.kozlowski+dt@...aro.org>, <robh+dt@...nel.org>,
        <konrad.dybcio@...ainline.org>, <robimarko@...il.com>
Subject: Re: [PATCH V7 2/2] firmware: qcom: scm: Add wait-queue handling logic

On Jan 10 2023 11:54, Bjorn Andersson wrote:
> On Tue, Jan 10, 2023 at 12:14:11AM -0800, Guru Das Srinagesh wrote:
> > On Jan 10 2023 12:07, Sibi Sankar wrote:
> > 
> > ...
> > 
> > > +static int __scm_smc_do_quirk_handle_waitq(struct device *dev, struct arm_smccc_args *waitq,
> > > +					   struct arm_smccc_res *res)
> > > +{
> > > +	int ret;
> > > +	struct arm_smccc_args resume;
> > > +	u32 wq_ctx, smc_call_ctx, flags;
> > > +	struct arm_smccc_args *smc = waitq;
> > > +
> > > +	do {
> > > +		__scm_smc_do_quirk(smc, res);
> > > +
> > > +		if (res->a0 == QCOM_SCM_WAITQ_SLEEP) {
> > > +			wq_ctx = res->a1;
> > > +			smc_call_ctx = res->a2;
> > > +			flags = res->a3;
> > > +
> > > +			if (!dev)
> > > +				return -EPROBE_DEFER;
> > > +
> > > +			ret = qcom_scm_lookup_completion(wq_ctx);
> > 
> > I see that this function has been created in response to Bjorn's comment [1]
> > about avoiding the dev_get_drvdata() call, but I would prefer to not use this
> > function as it hides the fact that the wait_for_completion() is occurring here.
> > 
> 
> My reasoning here is that I don't want the waiting for the completion
> that happen in one part of the driver and the completion happening in a
> completely different one.

ACK.

Thank you.

Guru Das.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ