Re: [PATCH 24/24] net: pass a sockptr_t into ->setsockopt

2020-07-20 Thread Stefan Schmidt
) + sockptr_t optval, unsigned int optlen) { struct dgram_sock *ro = dgram_sk(sk); struct net *net = sock_net(sk); @@ -882,7 +882,7 @@ static int dgram_setsockopt(struct sock *sk, int level, int optname, if (optlen < sizeof(int)) return -EINVAL; - if (get_user(val, (int __user *)optval)) + if (copy_from_sockptr(&val, optval, sizeof(int))) return -EFAULT; For the ieee802154 part: Acked-by: Stefan Schmidt regards Stefan Schmidt

Re: [PATCH 17/26] mac802154: Use skcipher

2016-01-26 Thread Stefan Schmidt
lsec.h @@ -19,7 +19,6 @@ #include #include -#include #include #include #include @@ -30,7 +29,7 @@ struct mac802154_llsec_key { /* one tfm for each authsize (4/8/16) */ struct crypto_aead *tfm[3]; - struct crypto_blkcipher *tfm0; + struct crypto_skcipher *tfm0;