From: Daniel Borkmann <dborkman@redhat.com>
To: David Laight <David.Laight@ACULAB.COM>
Cc: "'Neil Horman'" <nhorman@tuxdriver.com>,
Vlad Yasevich <vyasevich@gmail.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"geirola@gmail.com" <geirola@gmail.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-sctp@vger.kernel.org" <linux-sctp@vger.kernel.org>
Subject: Re: [PATCH net-next 0/5] SCTP updates
Date: Thu, 10 Jul 2014 11:37:19 +0200 [thread overview]
Message-ID: <53BE5ECF.3050202@redhat.com> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D1726FBA0@AcuExch.aculab.com>
On 07/10/2014 11:02 AM, David Laight wrote:
> From: Neil Horman
> ...
>>> No there is not direct overlap between the two. However, as Michael pointed out,
>>> there is a new option to control SCTP_RCVINFO. So would could add a deprecation
>>> warning to the over SCTP_EVENTS option and carry SCTP_SNDRCVINFO with it.
>>> Once SCTP_EVENTS goes away so can SCTP_SNDRCVINFO.
>>>
>> Ok, so we should still consider deprecation warnings then. Daniel, what about
>> ratelimited warnings with pids included then?
>
> Can you defer any deprecation warnings for a few kernel versions?
> This gives time for applications to be recoded.
I am fine either way, adding the warning a bit later seems fine, too.
Right now, even in-kernel users like dlm would hit it if we include
it immediately.
Otherwise, I'll just add something like the below ...
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index d95a50c..6a0e5a4 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -2205,8 +2205,13 @@ static int sctp_setsockopt_events(struct sock *sk, char __user *optval,
if (copy_from_user(&sctp_sk(sk)->subscribe, optval, optlen))
return -EFAULT;
- /*
- * At the time when a user app subscribes to SCTP_SENDER_DRY_EVENT,
+ if (sctp_sk(sk)->subscribe.sctp_data_io_event)
+ pr_warn_ratelimited(DEPRECATED "%s (pid %d) "
+ "Requested SCTP_SNDRCVINFO event.\n"
+ "Use SCTP_RCVINFO through SCTP_RECVRCVINFO option instead.\n",
+ current->comm, task_pid_nr(current));
+
+ /* At the time when a user app subscribes to SCTP_SENDER_DRY_EVENT,
* if there is no data to be sent or retransmit, the stack will
* immediately send up this notification.
*/
> Including argv[0] (even just the exec-time value) is much more use than the pid.
>
> Actually this is 'right PITA' for an application.
> A program binary that needs to work with old and new kernels will have to
> try the new option, and if it fails fall back to the old one, and then
> conditionally create/inspect the cmsg data.
> I can't actually imagine anyone bothering!
>
> Our sctp code is actually in a kernel module, so we can look at the kernel
> version when (part of) the driver is compiled on the target system.
>
> David
>
>
>
next prev parent reply other threads:[~2014-07-10 9:37 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-04 21:05 [PATCH net-next 0/5] SCTP updates Daniel Borkmann
2014-07-04 21:05 ` [PATCH net-next 1/5] net: sctp: fix information leaks in ulpevent layer Daniel Borkmann
2014-07-04 21:05 ` [PATCH net-next 5/5] net: sctp: implement rfc6458, 8.1.31. SCTP_DEFAULT_SNDINFO support Daniel Borkmann
2014-07-08 11:14 ` [PATCH net-next 0/5] SCTP updates Neil Horman
2014-07-08 14:05 ` Daniel Borkmann
2014-07-08 14:41 ` Neil Horman
2014-07-09 9:57 ` Daniel Borkmann
2014-07-09 10:49 ` Neil Horman
2014-07-09 11:12 ` David Laight
2014-07-09 13:28 ` Daniel Borkmann
2014-07-09 15:13 ` Neil Horman
2014-07-09 15:25 ` Daniel Borkmann
2014-07-09 15:41 ` Neil Horman
2014-07-09 15:36 ` Vlad Yasevich
2014-07-09 15:44 ` Neil Horman
2014-07-09 16:02 ` David Laight
2014-07-09 16:12 ` Michael Tuexen
2014-07-09 16:30 ` Vlad Yasevich
2014-07-09 16:32 ` Vlad Yasevich
2014-07-09 18:35 ` Neil Horman
2014-07-10 9:02 ` David Laight
2014-07-10 9:37 ` Daniel Borkmann [this message]
2014-07-10 10:57 ` Neil Horman
2014-07-10 19:04 ` Vlad Yasevich
2014-07-10 10:55 ` Neil Horman
2014-07-09 16:10 ` Daniel Borkmann
2014-07-08 21:40 ` David Miller
2014-07-09 7:59 ` Daniel Borkmann
-- strict thread matches above, loose matches on Subject: below --
2008-12-20 1:47 [PATCH net-next 0/5]: " Vlad Yasevich
2008-12-20 1:47 ` Vlad Yasevich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53BE5ECF.3050202@redhat.com \
--to=dborkman@redhat.com \
--cc=David.Laight@ACULAB.COM \
--cc=davem@davemloft.net \
--cc=geirola@gmail.com \
--cc=linux-sctp@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=vyasevich@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).