Re: [PATCH net-next 00/23] rxrpc: Fixes and preparation for RxGK

2020-10-03 Thread David Howells
David Miller wrote: > > Since the fixes in the set need to go after the patches in net-next, should > > I > > resubmit just those for net-next, or sit on them till -rc1? > > My 'net' tree is always open for bug fixes, and that's where bug fixes > belong. Not 'net-next'. "Need to go after the

Re: [PATCH net-next 00/23] rxrpc: Fixes and preparation for RxGK

2020-10-03 Thread David Howells
David Miller wrote: > > The patches are tagged here: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git > > rxrpc-next-20201010 > > No, they aren't. oops. I transposed the last two digits. I really need to make my script check the cover message. > Also, you

[PATCH net-next 22/23] rxrpc: Make the parsing of xdr payloads more coherent

2020-10-01 Thread David Howells
Make the parsing of xdr-encoded payloads, as passed to add_key, more coherent. Shuttling back and forth between various variables was a bit hard to follow. Signed-off-by: David Howells --- net/rxrpc/key.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a

[PATCH net-next 20/23] rxrpc: Don't leak the service-side session key to userspace

2020-10-01 Thread David Howells
Don't let someone reading a service-side rxrpc-type key get access to the session key that was exchanged with the client. The server application will, at some point, need to be able to read the information in the ticket, but this probably shouldn't include the key material. Signed-off

[PATCH net-next 21/23] rxrpc: Allow security classes to give more info on server keys

2020-10-01 Thread David Howells
Allow a security class to give more information on an rxrpc_s-type key when it is viewed in /proc/keys. This will allow the upcoming RxGK security class to show the enctype name here. Signed-off-by: David Howells --- net/rxrpc/ar-internal.h |3 +++ net/rxrpc/server_key.c |4 2

[PATCH net-next 23/23] rxrpc: rxkad: Don't use pskb_pull() to advance through the response packet

2020-10-01 Thread David Howells
to just add the displacement to the next offset. Signed-off-by: David Howells --- net/rxrpc/rxkad.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/net/rxrpc/rxkad.c b/net/rxrpc/rxkad.c index f3182edfcbae..e5b4bbdd0f34 100644 --- a/net/rxrpc/rxkad.c +++ b/net/rxrpc/rxkad.c @@

[PATCH net-next 16/23] rxrpc: Split the server key type (rxrpc_s) into its own file

2020-10-01 Thread David Howells
Split the server private key type (rxrpc_s) out into its own file rather than mingling it with the authentication/client key type (rxrpc) since they don't really bear any relation. Signed-off-by: David Howells --- net/rxrpc/Makefile |1 net/rxrpc/ar-internal.h |9 ++- net/

[PATCH net-next 18/23] rxrpc: Don't reserve security header in Tx DATA skbuff

2020-10-01 Thread David Howells
encrypt-and-checksum function that is used in a number of circumstances. Signed-off-by: David Howells --- net/rxrpc/ar-internal.h |5 + net/rxrpc/insecure.c|6 ++ net/rxrpc/rxkad.c | 24 +--- net/rxrpc/sendmsg.c |6 ++ 4 files changed, 14

[PATCH net-next 19/23] rxrpc: Organise connection security to use a union

2020-10-01 Thread David Howells
Organise the security information in the rxrpc_connection struct to use a union to allow for different data for different security classes. Signed-off-by: David Howells --- net/rxrpc/ar-internal.h | 11 --- net/rxrpc/rxkad.c | 40 2

[PATCH net-next 17/23] rxrpc: Hand server key parsing off to the security class

2020-10-01 Thread David Howells
-off-by: David Howells --- net/rxrpc/ar-internal.h | 11 + net/rxrpc/rxkad.c | 47 +++ net/rxrpc/security.c|2 +- net/rxrpc/server_key.c | 56 +++ 4 files changed, 86 insertions(+), 30

[PATCH net-next 09/23] rxrpc: Change basic data packet size alignment to 1

2020-10-01 Thread David Howells
Change the basic data packet size alignment to be 1 not 4. There isn't really any need to do otherwise unless there's crypto involved. Signed-off-by: David Howells --- net/rxrpc/conn_object.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rxrpc/conn_obje

[PATCH net-next 14/23] rxrpc: Support keys with multiple authentication tokens

2020-10-01 Thread David Howells
higher layer) and go through the tokens to find one that's supported. Signed-off-by: David Howells --- net/rxrpc/ar-internal.h |4 +++- net/rxrpc/conn_event.c |3 ++- net/rxrpc/insecure.c|3 ++- net/rxrpc/rxkad.c |5 ++--- net/rxrpc/security.c|

[PATCH net-next 12/23] rxrpc: Allow for a security trailer in a packet

2020-10-01 Thread David Howells
-by: David Howells --- net/rxrpc/ar-internal.h |1 + net/rxrpc/sendmsg.c | 28 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h index dce48162f6c2..5aacd6d7cf28 100644 --- a/net/rxrpc/ar-interna

[PATCH net-next 13/23] rxrpc: Merge prime_packet_security into init_connection_security

2020-10-01 Thread David Howells
Merge the ->prime_packet_security() into the ->init_connection_security() hook as they're always called together. Signed-off-by: David Howells --- net/rxrpc/ar-internal.h |2 -- net/rxrpc/conn_client.c |6 -- net/rxrpc/conn_event.c |4 net/rxrpc/insecure.

[PATCH net-next 11/23] rxrpc: List the held token types in the key description in /proc/keys

2020-10-01 Thread David Howells
When viewing an rxrpc-type key through /proc/keys, display a list of held token types. Signed-off-by: David Howells --- net/rxrpc/key.c | 29 - 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/net/rxrpc/key.c b/net/rxrpc/key.c index 75b500650257

[PATCH net-next 15/23] rxrpc: Don't retain the server key in the connection

2020-10-01 Thread David Howells
ding types. Keys of this type have an extra bit in the description: ":::" Signed-off-by: David Howells --- net/rxrpc/ar-internal.h | 11 +++--- net/rxrpc/call_accept.c | 14 net/rxrpc/conn_event.c |1 - net/rxrpc/conn_object.c |1 - net/rxrpc/co

[PATCH net-next 10/23] rxrpc: Remove the rxk5 security class as it's now defunct

2020-10-01 Thread David Howells
Remove the rxrpc rxk5 security class as it's now defunct and nothing uses it anymore. Signed-off-by: David Howells --- include/keys/rxrpc-type.h | 55 - net/rxrpc/key.c | 468 - 2 files changed, 523 deletions(-) diff --git a/in

[PATCH net-next 08/23] rxrpc: The server keyring isn't network-namespaced

2020-10-01 Thread David Howells
quest_key mechanism") Signed-off-by: David Howells --- net/rxrpc/key.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rxrpc/key.c b/net/rxrpc/key.c index c668e4b7dbff..75e84ed4fa63 100644 --- a/net/rxrpc/key.c +++ b/net/rxrpc/key.c @@ -940,7 +940,7 @@ int rx

[PATCH net-next 07/23] rxrpc: Fix accept on a connection that need securing

2020-10-01 Thread David Howells
et. Change the mode of operation for userspace rxrpc server sockets to work like this too. Although this is a UAPI change, server sockets aren't currently functional. Fixes: 248f219cb8bc ("rxrpc: Rewrite the data and ack handling code") Signed-off-by: David Howells --- include/u

[PATCH net-next 02/23] rxrpc: Fix bundle counting for exclusive connections

2020-10-01 Thread David Howells
Signed-off-by: David Howells cc: Hillf Danton --- net/rxrpc/conn_client.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/rxrpc/conn_client.c b/net/rxrpc/conn_client.c index 78c845a4f1ad..5d9adfd4c84f 100644 --- a/net/rxrpc/conn_client.c +++ b/net/rxrpc/con

[PATCH net-next 03/23] rxrpc: Fix rxkad token xdr encoding

2020-10-01 Thread David Howells
quot;) Signed-off-by: Marc Dionne Signed-off-by: David Howells --- net/rxrpc/key.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/net/rxrpc/key.c b/net/rxrpc/key.c index 94c3df392651..8f7d7a6187db 100644 --- a/net/rxrpc/key.c +++ b/net/rxrpc/key.c @@ -1072,7 +1

[PATCH net-next 06/23] rxrpc: Fix loss of final ack on shutdown

2020-10-01 Thread David Howells
quot;rxrpc: Delay terminal ACK transmission on a client call") Signed-off-by: David Howells --- net/rxrpc/ar-internal.h |1 + net/rxrpc/conn_client.c |3 +++ net/rxrpc/conn_event.c |6 +++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/net/rxrpc/ar-internal.h

[PATCH net-next 05/23] rxrpc: Fix some missing _bh annotations on locking conn->state_lock

2020-10-01 Thread David Howells
s should have separate call number spaces") Signed-off-by: David Howells --- net/rxrpc/conn_event.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/rxrpc/conn_event.c b/net/rxrpc/conn_event.c index 0628dad2bdea..bba5d7906df6 100644 --- a/net/rxrpc/conn_even

[PATCH net-next 04/23] rxrpc: Downgrade the BUG() for unsupported token type in rxrpc_read()

2020-10-01 Thread David Howells
ty index 5 keys (Kerberos 5)") Signed-off-by: David Howells --- net/rxrpc/key.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/rxrpc/key.c b/net/rxrpc/key.c index 8f7d7a6187db..c668e4b7dbff 100644 --- a/net/rxrpc/key.c +++ b/net/rxrpc/key.c @@ -1107,7 +1107,8

[PATCH net-next 01/23] keys: Provide the original description to the key preparser

2020-10-01 Thread David Howells
it's better to do that when the key is loaded rather than deep in trying to process a response packet. Signed-off-by: David Howells cc: Jarkko Sakkinen cc: keyri...@vger.kernel.org --- include/linux/key-type.h |1 + security/keys/key.c |2 ++ 2 files changed, 3 insertions(+)

[PATCH net-next 00/23] rxrpc: Fixes and preparation for RxGK

2020-10-01 Thread David Howells
tches are tagged here: git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git rxrpc-next-20201010 and can also be found on this branch: http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=rxrpc-next David --- David Howells (22):

[PATCH net-next 1/5] rxrpc: Fix an error goto in rxrpc_connect_call()

2020-09-14 Thread David Howells
Fix an error-handling goto in rxrpc_connect_call() whereby it will jump to free the bundle it failed to allocate. Fixes: 245500d853e9 ("rxrpc: Rewrite the client connection manager") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: David Howells ---

[PATCH net-next 2/5] rxrpc: Fix a missing NULL-pointer check in a trace

2020-09-14 Thread David Howells
/0x650 [rxrpc] ? wake_up_q+0xa0/0xa0 ? rxrpc_kernel_begin_call+0x12a/0x1b0 [rxrpc] rxrpc_new_client_call+0x2a5/0x5e0 [rxrpc] Fixes: 245500d853e9 ("rxrpc: Rewrite the client connection manager") Reported-by: Marc Dionne Signed-off-by: David Howells Tested-by: M

[PATCH net-next 4/5] rxrpc: Fix conn bundle leak in net-namespace exit

2020-09-14 Thread David Howells
+0x1f/0x30 arch/x86/entry/entry_64.S:294 Fixes: 245500d853e9 ("rxrpc: Rewrite the client connection manager") Reported-by: syzbot+52071f826a617b9c7...@syzkaller.appspotmail.com Signed-off-by: David Howells --- net/rxrpc/conn_client.c |1 + 1 file changed, 1 insertion(+) diff -

[PATCH net-next 0/5] rxrpc: Fixes for the connection manager rewrite

2020-09-14 Thread David Howells
/kernel/git/dhowells/linux-fs.git/log/?h=rxrpc-next David --- David Howells (5): rxrpc: Fix an error goto in rxrpc_connect_call() rxrpc: Fix a missing NULL-pointer check in a trace rxrpc: Fix rxrpc_bundle::alloc_error to be signed rxrpc: Fix conn bundle leak in net-namespace

[PATCH net-next 5/5] rxrpc: Fix an overget of the conn bundle when setting up a client conn

2020-09-14 Thread David Howells
the candidate conn to the bundle. Fixes: 245500d853e9 ("rxrpc: Rewrite the client connection manager") Signed-off-by: David Howells --- net/rxrpc/conn_client.c |1 - 1 file changed, 1 deletion(-) diff --git a/net/rxrpc/conn_client.c b/net/rxrpc/conn_client.c index 0e

[PATCH net-next 3/5] rxrpc: Fix rxrpc_bundle::alloc_error to be signed

2020-09-14 Thread David Howells
; is unsigned Fixes: 245500d853e9 ("rxrpc: Rewrite the client connection manager") Reported-by Dan Carpenter Signed-off-by: David Howells --- net/rxrpc/ar-internal.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-intern

[PATCH net-next 1/3] rxrpc: Impose a maximum number of client calls

2020-09-08 Thread David Howells
affect the limits on service calls and connections. Signed-off-by: David Howells --- net/rxrpc/af_rxrpc.c|7 --- net/rxrpc/ar-internal.h |2 ++ net/rxrpc/call_object.c | 43 +++ 3 files changed, 49 insertions(+), 3 deletions(-) diff --git a

[PATCH net-next 3/3] rxrpc: Allow multiple client connections to the same peer

2020-09-08 Thread David Howells
Allow the number of parallel connections to a machine to be expanded from a single connection to a maximum of four. This allows up to 16 calls to be in progress at the same time to any particular peer instead of 4. Signed-off-by: David Howells --- net/rxrpc/conn_client.c |6 ++ 1 file

[PATCH net-next 2/3] rxrpc: Rewrite the client connection manager

2020-09-08 Thread David Howells
t could also be made such that new call allocations are forced to wait until the number of outstanding connections subsides. Signed-off-by: David Howells --- include/trace/events/rxrpc.h | 33 - net/rxrpc/ar-internal.h | 68 +-- net/rxrpc/conn_clien

[PATCH net-next 0/3] rxrpc: Allow more calls to same peer

2020-09-08 Thread David Howells
is branch: http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=rxrpc-next David --- David Howells (3): rxrpc: Impose a maximum number of client calls rxrpc: Rewrite the client connection manager rxrpc: Allow multiple client connections to the same peer inc

[PATCH net] rxrpc: Fix memory leak in rxkad_verify_response()

2020-08-27 Thread David Howells
From: Dinghao Liu Fix a memory leak in rxkad_verify_response() whereby the response buffer doesn't get freed if we fail to allocate a ticket buffer. Fixes: ef68622da9cc ("rxrpc: Handle temporary errors better in rxkad security") Signed-off-by: Dinghao Liu Signed-off-by

[PATCH net 0/7] rxrpc, afs: Fix probing issues

2020-08-27 Thread David Howells
o be found on the following branch: http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=rxrpc-fixes David --- David Howells (7): rxrpc: Keep the ACK serial in a var in rxrpc_input_ack() rxrpc: Fix loss of RTT samples due to interposed ACK r

[PATCH net 3/7] rxrpc: Make rxrpc_kernel_get_srtt() indicate validity

2020-08-27 Thread David Howells
Fix rxrpc_kernel_get_srtt() to indicate the validity of the returned smoothed RTT. If we haven't had any valid samples yet, the SRTT isn't useful. Fixes: c410bf01933e ("rxrpc: Fix the excessive initial retransmission timeout") Signed-off-by: David Howells --- fs/afs/fs_

[PATCH net 2/7] rxrpc: Fix loss of RTT samples due to interposed ACK

2020-08-27 Thread David Howells
quot;) Signed-off-by: David Howells --- include/trace/events/rxrpc.h | 27 +-- net/rxrpc/ar-internal.h | 13 +++-- net/rxrpc/call_object.c |1 net/rxrpc/input.c| 104 -- net/rxrpc/outpu

[PATCH net 4/7] afs: Remove afs_vlserver->probe.have_result

2020-08-27 Thread David Howells
Remove afs_vlserver->probe.have_result as it's neither read nor waited upon. Fixes: 3bf0fb6f33dd ("afs: Probe multiple fileservers simultaneously") Signed-off-by: David Howells --- fs/afs/internal.h |1 - fs/afs/vl_probe.c |5 + 2 files changed, 1 insertion(+), 5

[PATCH net 5/7] afs: Expose information from afs_vlserver through /proc for debugging

2020-08-27 Thread David Howells
Convert various bitfields in afs_vlserver::probe to a mask and then expose this and some other bits of information through /proc/net/afs//vlservers to make it easier to debug VL server communication issues. Signed-off-by: David Howells --- fs/afs/internal.h |9 + fs/afs/proc.c

[PATCH net 7/7] afs: Fix error handling in VL server rotation

2020-08-27 Thread David Howells
dling") Signed-off-by: David Howells --- fs/afs/vl_rotate.c |4 1 file changed, 4 insertions(+) diff --git a/fs/afs/vl_rotate.c b/fs/afs/vl_rotate.c index ab2beb4ba20e..c0458c903b31 100644 --- a/fs/afs/vl_rotate.c +++ b/fs/afs/vl_rotate.c @@ -263,10 +263,14 @@ bool afs_select_vlser

[PATCH net 6/7] afs: Don't use VL probe running state to make decisions outside probe code

2020-08-27 Thread David Howells
e if the server is known to be responding and update these as and when we know what to change them to. Fixes: 3bf0fb6f33dd ("afs: Probe multiple fileservers simultaneously") Signed-off-by: David Howells --- fs/afs/internal.h |4 +++- fs/afs/proc.c |2 +- fs/afs/vl_

[PATCH net 1/7] rxrpc: Keep the ACK serial in a var in rxrpc_input_ack()

2020-08-27 Thread David Howells
Keep the ACK serial number in a variable in rxrpc_input_ack() as it's used frequently. Signed-off-by: David Howells --- net/rxrpc/input.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c index 7675793

How to make a change in both net and net-next

2020-07-28 Thread David Howells
Hi Dave, In the fix I just posted, subject: [PATCH net] rxrpc: Fix race between recvmsg and sendmsg on immediate call failure there's a change I need to make as part of the patch: - spin_lock_bh(&conn->params.peer->lock); - hlist_del_rcu(&call

[PATCH net] rxrpc: Fix race between recvmsg and sendmsg on immediate call failure

2020-07-28 Thread David Howells
;) Reported-by: syzbot+b54969381df354936...@syzkaller.appspotmail.com Signed-off-by: David Howells Reviewed-by: Marc Dionne --- net/rxrpc/call_object.c | 27 +++ net/rxrpc/conn_object.c |8 +--- net/rxrpc/recvmsg.c |2 +- net/rxrpc/sendmsg.c |3 ++

[PATCH net] rxrpc: Fix sendmsg() returning EPIPE due to recvmsg() returning ENODATA

2020-07-20 Thread David Howells
by the networking core. Also change rxrpc_sendmsg() so that it doesn't fail with delayed receive errors (there's no way for it to report which call, if any, the error was caused by). Fixes: 17926a79320a ("[AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kern

Re: [PATCH 7/7] Documentation: networking: rxrpc: drop doubled word

2020-07-06 Thread David Howells
Randy Dunlap wrote: > Drop the doubled word "have". > > Signed-off-by: Randy Dunlap > Cc: Jonathan Corbet > Cc: linux-...@vger.kernel.org > Cc: "David S. Miller" > Cc: Jakub Kicinski > Cc: netdev@vger.kernel.org > Cc: linux-...@lists.infradead.org Acked-by: David Howells

[PATCH net] rxrpc: Fix notification call on completion of discarded calls

2020-06-19 Thread David Howells
b fb fb fb fb fb fb == Reported-by: syzbot+d3eccef36ddbd0271...@syzkaller.appspotmail.com Fixes: 5ac0d62226a0 ("rxrpc: Fix missing notification") Signed-off-by: David Howells --- net/rxrpc/call_accept.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/net/rxrpc/call_accept.c b/

Re: net-next test error: KASAN: use-after-free Write in afs_wake_up_async_call

2020-06-19 Thread David Howells
syzbot wrote: > This crash does not have a reproducer. I cannot test it. This should do it: insmod fs/afs/kafs.ko; rmmod kafs David

Re: net-next test error: KASAN: use-after-free Write in afs_wake_up_async_call

2020-06-19 Thread David Howells
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git 559f5964f95ce6096ae0aa858eaee202500ab9ca

Re: bpf test error: KASAN: use-after-free Write in afs_wake_up_async_call

2020-06-19 Thread David Howells
#sys dup: net-next test error: KASAN: use-after-free Write in afs_wake_up_async_call

Re: bpf-next test error: KASAN: use-after-free Write in afs_wake_up_async_call

2020-06-19 Thread David Howells
#syz dup: net-next test error: KASAN: use-after-free Write in afs_wake_up_async_call

Re: net test error: KASAN: use-after-free Write in afs_wake_up_async_call

2020-06-19 Thread David Howells
#syz dup: net-next test error: KASAN: use-after-free Write in afs_wake_up_async_call

[PATCH net 2/3] rxrpc: Fix handling of rwind from an ACK packet

2020-06-18 Thread David Howells
int. Fixes: 702f2ac87a9a ("rxrpc: Wake up the transmitter if Rx window size increases on the peer") Signed-off-by: David Howells --- net/rxrpc/input.c |7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c index 299ac98e9754.

[PATCH net 1/3] rxrpc: Fix trace string

2020-06-18 Thread David Howells
tion in tracing") Signed-off-by: David Howells --- include/trace/events/rxrpc.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/trace/events/rxrpc.h b/include/trace/events/rxrpc.h index ba9efdc848f9..059b6e45a028 100644 --- a/include/trace/events/rxrpc.h +++

[PATCH net 3/3] rxrpc: Fix afs large storage transmission performance drop

2020-06-18 Thread David Howells
the generic/460 xfstest. Fixes: 2ad6691d988c ("rxrpc: Fix race between incoming ACK parser and retransmitter") Signed-off-by: David Howells --- net/rxrpc/call_event.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rxrpc/call_event.c b/net/rxrpc/call_e

[PATCH net 0/3] rxrpc: Performance drop fix and other fixes

2020-06-18 Thread David Howells
git/linux/kernel/git/dhowells/linux-fs.git/log/?h=rxrpc-fixes David --- David Howells (1): rxrpc: Fix afs large storage transmission performance drop include/trace/events/rxrpc.h | 2 +- net/rxrpc/call_event.c | 2 +- net/rxrpc/input.c| 7 +++ 3 files changed, 5 insertions(+), 6 deletions(-)

Re: [PATCH v4 1/3] mm/slab: Use memzero_explicit() in kzfree()

2020-06-16 Thread David Howells
Waiman Long wrote: > The kzfree() function is normally used to clear some sensitive > information, like encryption keys, in the buffer before freeing it back > to the pool. Memset() "memset()" is all lowercase. > is currently used for buffer clearing. However unlikely, there is still a > non-ze

Re: Good idea to rename files in include/uapi/ ?

2020-06-14 Thread David Howells
Alexander A. Klimov wrote: > *Is it a good idea to rename files in include/uapi/ ?* Very likely not. If programs out there are going to be built on a case-sensitive filesystem (which happens all the time), they're going to break if you rename the headers. We're kind of stuck with them. David

[PATCH net] rxrpc: Fix race between incoming ACK parser and retransmitter

2020-06-11 Thread David Howells
the data and ack handling code") Signed-off-by: David Howells --- net/rxrpc/call_event.c | 29 +++-- 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/net/rxrpc/call_event.c b/net/rxrpc/call_event.c index 61a51c251e1b..aa1c8eee6557 100644 --- a/net

[PATCH net 2/2] rxrpc: Fix missing notification

2020-06-08 Thread David Howells
n to avoid taking the call state_lock and disabling softirqs if the call is already in the completed state and remove some now redundant rxrpc_notify_socket() calls. Fixes: f5c17aaeb2ae ("rxrpc: Calls should only have one terminal state") Reported-by: Gerry Seidman Signed-off-by: David Howell

[PATCH net 1/2] rxrpc: Move the call completion handling out of line

2020-06-08 Thread David Howells
Move the handling of call completion out of line so that the next patch can add more code in that area. Signed-off-by: David Howells Reviewed-by: Marc Dionne --- net/rxrpc/ar-internal.h | 119 ++- net/rxrpc/recvmsg.c | 74

[PATCH net 0/2] rxrpc: Fix hang due to missing notification

2020-06-08 Thread David Howells
t/dhowells/linux-fs.git rxrpc-fixes-20200605 and can also be found on the following branch: http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=rxrpc-fixes David --- David Howells (1): rxrpc: Fix missing notification net/rxrpc/ar-intern

Re: [PATCH] conn_client: Add check for rxpc channel

2020-05-31 Thread David Howells
Hi, Note that "conn_client:" isn't a suitable tag for the subject. You should use "rxrpc:" instead. How did you find this by the way? You shouldn't get a NULL pointer there. Either the call is waiting for a channel to be assigned (in which case the condition on: if (!list_empty(&call->

[PATCH net 2/2] rxrpc: Fix a memory leak in rxkad_verify_response() [ver #2]

2020-05-22 Thread David Howells
stack") Signed-off-by: Qiushi Wu Signed-off-by: David Howells cc: Markus Elfring --- net/rxrpc/rxkad.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/rxrpc/rxkad.c b/net/rxrpc/rxkad.c index 098f1f9ec53b..52a24d4ef5d8 100644 --- a/net/rxrpc/rxkad.c +++ b/net/r

[PATCH net 1/2] rxrpc: Fix a warning [ver #2]

2020-05-22 Thread David Howells
3 | printk("[%-6.6s] "FMT"\n", current->comm ,##__VA_ARGS__) | ^~ ../fs/afs/fs_probe.c:35:15: note: 'rtt_us' was declared here Signed-off-by: David Howells --- fs/afs/fs_probe.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/

[PATCH net 0/2] rxrpc: Fix a warning and a leak [ver #2]

2020-05-22 Thread David Howells
Here are a couple of fixes for AF_RXRPC: (1) Fix an uninitialised variable warning. (2) Fix a leak of the ticket on error in rxkad. The patches are tagged here: git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git rxrpc-fixes-20200523-v2 and can also be found

Re: [PATCH net 0/3] rxrpc: Fix retransmission timeout and ACK discard

2020-05-22 Thread David Howells
David Miller wrote: > Pulled, thanks David. Thanks. I'll rebase my two extra patches I've just sent you a pull request for when you've updated the branch. David

Re: [PATCH net 0/3] rxrpc: Fix retransmission timeout and ACK discard [ver #2]

2020-05-22 Thread David Howells
David Howells wrote: > The patches are tagged here: > > git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git > rxrpc-fixes-20200520 Oops. That's the wrong tag. It should be rxrpc-fixes-20200521. David

[PATCH net 0/2] rxrpc: Fix a warning and a leak

2020-05-22 Thread David Howells
Here are a couple of fixes for AF_RXRPC: (1) Fix an uninitialised variable warning. (2) Fix a leak of the ticket on error in rxkad. The patches are tagged here: git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git rxrpc-fixes-20200523 and can also be found on

[PATCH net 1/2] rxrpc: Fix a warning

2020-05-22 Thread David Howells
3 | printk("[%-6.6s] "FMT"\n", current->comm ,##__VA_ARGS__) | ^~ ../fs/afs/fs_probe.c:35:15: note: 'rtt_us' was declared here Signed-off-by: David Howells --- fs/afs/fs_probe.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/

[PATCH net 2/2] A ticket was not released after a call of the function

2020-05-22 Thread David Howells
From: Qiushi Wu "rxkad_decrypt_ticket" failed. Thus replace the jump target "temporary_error_free_resp" by "temporary_error_free_ticket". Fixes: 8c2f826dc3631 ("rxrpc: Don't put crypto buffers on the stack") Signed-off-by: Qiushi Wu Signed-off-by:

Re: [PATCH 29/33] rxrpc: add rxrpc_sock_set_min_security_level

2020-05-21 Thread David Howells
Christoph Hellwig wrote: > Add a helper to directly set the RXRPC_MIN_SECURITY_LEVEL sockopt from > kernel space without going through a fake uaccess. > > Thanks to David Howells for the documentation updates. > > Signed-off-by: Christoph Hellwig Acked-by: David Howells

Re: [PATCH net 0/3] rxrpc: Fix retransmission timeout and ACK discard

2020-05-21 Thread David Howells
I've posted a new version of this with a fixed description for patch 1. David

[PATCH net 3/3] rxrpc: Fix ack discard [ver #2]

2020-05-20 Thread David Howells
n which case it will go outside the window and we should ignore it. Fixes: 1a2391c30c0b ("rxrpc: Fix detection of out of order acks") Reported-by: Dave Botsch Signed-off-by: David Howells --- net/rxrpc/input.c | 30 ++ 1 file changed, 26 insertions(+), 4 deletions

[PATCH net 1/3] rxrpc: Fix the excessive initial retransmission timeout [ver #2]

2020-05-20 Thread David Howells
ond rather than nanoseconds. The (S)RTT and RTO values are displayed in /proc/net/rxrpc/peers. Fixes: 17926a79320a ("[AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both") Signed-off-by: David Howells --- fs/afs/fs_probe.c| 18 +--

[PATCH net 2/3] rxrpc: Trace discarded ACKs [ver #2]

2020-05-20 Thread David Howells
Add a tracepoint to track received ACKs that are discarded due to being outside of the Tx window. Signed-off-by: David Howells --- include/trace/events/rxrpc.h | 35 +++ net/rxrpc/input.c| 12 ++-- 2 files changed, 45 insertions(+), 2

[PATCH net 0/3] rxrpc: Fix retransmission timeout and ACK discard [ver #2]

2020-05-20 Thread David Howells
t rxrpc-fixes-20200520 and can also be found on the following branch: http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=rxrpc-fixes David --- David Howells (1): rxrpc: Fix ack discard fs/afs/fs_probe.c| 18 ++-- fs/afs/vl_probe.c

[PATCH net 3/3] rxrpc: Fix ack discard

2020-05-20 Thread David Howells
n which case it will go outside the window and we should ignore it. Fixes: 1a2391c30c0b ("rxrpc: Fix detection of out of order acks") Reported-by: Dave Botsch Signed-off-by: David Howells --- net/rxrpc/input.c | 30 ++ 1 file changed, 26 insertions(+), 4 deletions

[PATCH net 2/3] rxrpc: Trace discarded ACKs

2020-05-20 Thread David Howells
Add a tracepoint to track received ACKs that are discarded due to being outside of the Tx window. Signed-off-by: David Howells --- include/trace/events/rxrpc.h | 35 +++ net/rxrpc/input.c| 12 ++-- 2 files changed, 45 insertions(+), 2

[PATCH net 1/3] rxrpc: Fix the excessive initial retransmission timeout

2020-05-20 Thread David Howells
ond rather than nanoseconds. The (S)RTT and RTO values are displayed in /proc/net/rxrpc/peers. Fixes: 17926a79320a ([AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both"") Signed-off-by: David Howells --- fs/afs/fs_probe.c| 18 +--

[PATCH net 0/3] rxrpc: Fix retransmission timeout and ACK discard

2020-05-20 Thread David Howells
n the following branch: http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=rxrpc-fixes David --- David Howells (1): rxrpc: Fix ack discard fs/afs/fs_probe.c| 18 ++-- fs/afs/vl_probe.c| 18 ++-- include/net/af_rxrpc.h | 2 +- in

Re: [PATCH] dns: Apply a default TTL to records obtained from getaddrinfo()

2020-05-19 Thread David Howells
Okay, how about this incremental change, then? If fixes the typo, only prints the "READ CONFIG" line in verbose mode, filters escape chars in the config file and reduces the expiration time to 5s. David --- diff --git a/key.dns_resolver.c b/key.dns_resolver.c index c241eda3..7a7ec424 100644 --- a

Re: [PATCH] dns: Apply a default TTL to records obtained from getaddrinfo()

2020-05-19 Thread David Howells
with a .so directive in it. Anyway, how about the attached? David --- commit cbf0457e0fc99aa5beabe54daeda57be70dfdfce Author: David Howells Date: Tue Apr 14 16:07:26 2020 +0100 dns: Apply a default TTL to records obtained from getaddrinfo() Address records obtained from getaddrinfo()

[PATCH] dns: Apply a default TTL to records obtained from getaddrinfo()

2020-05-18 Thread David Howells
DNS, such as an SRV or AFSDB record. Fix this to apply a default TTL of 10mins in the event that we haven't got one. This can be configured in /etc/keyutils/key.dns_resolver.conf by adding the line: default_ttl: to the file. Signed-off-by: David Howells --- Makefile

Re: [PATCH v2] Implement close-on-fork

2020-05-15 Thread David Howells
Karstens, Nate wrote: > > already has a portable solution > > What is the solution? sys_spawn(const char *path, const char **argv, const char **envv, unsigned long clone_flags, unsigned int nfds, int *fds); maybe? David

Re: [PATCH 27/33] sctp: export sctp_setsockopt_bindx

2020-05-15 Thread David Howells
Christoph Hellwig wrote: > > The advantage on using kernel_setsockopt here is that sctp module will > > only be loaded if dlm actually creates a SCTP socket. With this > > change, sctp will be loaded on setups that may not be actually using > > it. It's a quite big module and might expose the sy

Re: [PATCH 21/33] ipv4: add ip_sock_set_mtu_discover

2020-05-15 Thread David Howells
Christoph Hellwig wrote: > > > + ip_sock_set_mtu_discover(conn->params.local->socket->sk, > > > + IP_PMTUDISC_DONT); > > > > Um... The socket in question could be an AF_INET6 socket, not an AF_INET4 > > socket - I presume it will work in that case. If so: > > Ye

Re: [PATCH 29/33] rxrpc_sock_set_min_security_level

2020-05-15 Thread David Howells
Christoph Hellwig wrote: > > Looks good - but you do need to add this to > > Documentation/networking/rxrpc.txt > > also, thanks. > > That file doesn't exist, instead we now have a > cumentation/networking/rxrpc.rst in weird markup. Yeah - that's only in net/next thus far. > Where do you want

Re: [PATCH 06/33] net: add sock_set_timestamps

2020-05-13 Thread David Howells
Christoph Hellwig wrote: > Add a helper to directly set the SO_TIMESTAMP* sockopts from kernel space > without going through a fake uaccess. > > Signed-off-by: Christoph Hellwig Reviewed-by: David Howells

Re: [PATCH 23/33] ipv6: add ip6_sock_set_recverr

2020-05-13 Thread David Howells
Christoph Hellwig wrote: > Add a helper to directly set the IPV6_RECVERR sockopt from kernel space > without going through a fake uaccess. > > Signed-off-by: Christoph Hellwig Reviewed-by: David Howells

Re: [PATCH 20/33] ipv4: add ip_sock_set_recverr

2020-05-13 Thread David Howells
Christoph Hellwig wrote: > Add a helper to directly set the IP_RECVERR sockopt from kernel space > without going through a fake uaccess. It looks like if this is an AF_INET6 socket, it will just pass the message straight through to AF_INET4, so: Reviewed-by: David Howells

Re: [PATCH 21/33] ipv4: add ip_sock_set_mtu_discover

2020-05-13 Thread David Howells
o: Reviewed-by: David Howells [rxrpc bits]

Re: [PATCH 29/33] rxrpc_sock_set_min_security_level

2020-05-13 Thread David Howells
Christoph Hellwig wrote: > +int rxrpc_sock_set_min_security_level(struct sock *sk, unsigned int val); > + Looks good - but you do need to add this to Documentation/networking/rxrpc.txt also, thanks. David

Re: [PATCH net] rxrpc: use rcu protection while reading sk->sk_user_data

2019-10-16 Thread David Howells
Eric Dumazet wrote: > We need to extend the rcu_read_lock() section in rxrpc_error_report() > and use rcu_dereference_sk_user_data() instead of plain access > to sk->sk_user_data to make sure all rules are respected. Should I take it that the caller won't be guaranteed to be holding the RCU read

[PATCH net 1/6] rxrpc: Fix call ref leak

2019-10-07 Thread David Howells
h is pinned by the call). Fix this by releasing the call in the error path. Fixes: 37411cad633f ("rxrpc: Fix potential NULL-pointer exception") Reported-by: syzbot+d850c266e3df14da1...@syzkaller.appspotmail.com Signed-off-by: David Howells --- net/rxrpc/sendmsg.c |1 + 1 f

Re: [PATCH net 0/9] rxrpc: Fix use of skb_cow_data()

2019-08-23 Thread David Howells
David Miller wrote: > Why don't you just do an skb_unshare() at the beginning when you know that > you'll need to do that? I was trying to defer any copying to process context rather than doing it in softirq context to spend less time in softirq context - plus that way I can use GFP_NOIO (kafs)

[PATCH net 2/2] rxrpc: Fix read-after-free in rxrpc_queue_local()

2019-08-14 Thread David Howells
+78e71c5bab4f76a6a...@syzkaller.appspotmail.com Signed-off-by: David Howells --- include/trace/events/rxrpc.h |6 +++--- net/rxrpc/local_object.c | 19 ++- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/include/trace/events/rxrpc.h b/include/trace/ev

<    1   2   3   4   5   6   7   8   9   10   >