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: <c97ba583-0d03-4981-8113-87babfabbd7d@gmail.com>
Date: Thu, 24 Oct 2024 12:51:16 -0500
From: Denis Kenzior <denkenz@...il.com>
To: Chris Lew <quic_clew@...cinc.com>, netdev@...r.kernel.org
Cc: Marcel Holtmann <marcel@...tmann.org>, Andy Gross <agross@...nel.org>,
 Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH v1 07/10] net: qrtr: allow socket endpoint binding

Hi Chris,

>> @@ -1346,6 +1367,9 @@ static int qrtr_getsockopt(struct socket *sock, int 
>> level, int optname,
>>       case QRTR_REPORT_ENDPOINT:
>>           val = test_bit(QRTR_F_REPORT_ENDPOINT, &ipc->flags);
>>           break;
>> +    case QRTR_BIND_ENDPOINT:
>> +        val = ipc->bound_endpoint;
>> +        break;
> 
> In the case where an endpoint goes away and a client has bound their socket to 
> an endpoint, would there be any notification to unbind the socket?
> 

I didn't think it was needed.  In my use case I would be relying on the relevant 
device to be removed, (e.g. a udev notification would be received for the 
devices associated with the PCIe modem).  ECONNRESET might also happen, with the 
udev events following shortly after.

> Is the expectation that the client would get notified through ECONNRESET on the 
> next sendmsg() or receive the BYE/DEL_CLIENT/DEL_SERVER control message.

Yes.

> 
> On that cleanup, I guess the client would either re-bind the socket back to 0 or 
> wait for the mhi sysfs to come back and get the new endpoint id?

In my case I would be closing the sockets entirely.  But what you describe can 
also be done.

Regards,
-Denis

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ