summaryrefslogtreecommitdiffstats
path: root/drivers/net/ppp
AgeCommit message (Expand)Author
2017-11-14ppp: exit_net cleanup checks addedVasily Averin
2017-11-04Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman
2017-11-01ppp: Destroy the mutex when cleanupGao Feng
2017-10-29ppp: allow usage in namespacesMatteo Croce
2017-10-22drivers, net, ppp: convert syncppp.refcnt from atomic_t to refcount_tElena Reshetova
2017-10-22drivers, net, ppp: convert ppp_file.refcnt from atomic_t to refcount_tElena Reshetova
2017-10-22drivers, net, ppp: convert asyncppp.refcnt from atomic_t to refcount_tElena Reshetova
2017-10-06ppp: fix race in ppp device destructionGuillaume Nault
2017-10-01ppp: fix __percpu annotationGuillaume Nault
2017-08-08ppp: fix xmit recursion detection on ppp channelsGuillaume Nault
2017-07-31ppp: Fix a scheduling-while-atomic bug in del_chanGao Feng
2017-07-18ppp: Fix false xmit recursion detect with two ppp devicesGao Feng
2017-06-26net: add netlink_ext_ack argument to rtnl_link_ops.validateMatthias Schiffer
2017-06-26net: add netlink_ext_ack argument to rtnl_link_ops.newlinkMatthias Schiffer
2017-06-20net: manual clean code which call skb_put_[data:zero]yuan linyu
2017-06-18pptp: Remove unused variable in pptp_release()Christos Gkekas
2017-06-16networking: make skb_push & __skb_push return void pointersJohannes Berg
2017-06-16networking: make skb_put & friends return void pointersJohannes Berg
2017-06-16networking: introduce and use skb_put_data()Johannes Berg
2017-06-06ppp: mppe: Use vsnprintf extension %phNJoe Perches
2017-06-01ppp: remove unnecessary bh disable in xmit pathGao Feng
2017-03-02sched/headers: Prepare to move signal wakeup & sigpending methods from <linux...Ingo Molnar
2017-01-08net: make ndo_get_stats64 a void functionstephen hemminger
2016-12-24Replace <asm/uaccess.h> with <linux/uaccess.h> globallyLinus Torvalds
2016-11-18netns: make struct pernet_operations::id unsigned intAlexey Dobriyan
2016-08-31ppp: declare PPP devices as LLTXGuillaume Nault
2016-08-31ppp: avoid dealock on recursive xmitGuillaume Nault
pre { line-height: 125%; } td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Litera
2016-01-27ppp_mppe: Use skcipher and ahashHerbert Xu
2016-01-24pptp: fix illegal memory access caused by multiple bind()sHannes Frederic Sowa
2015-12-17Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
2015-12-15pptp: verify sockaddr_len in pptp_bind() and pptp_connect()WANG Cong
RYPT Stream * Cipher Project. It is designed by Daniel J. Bernstein <djb@cr.yp.to>. * More information about eSTREAM and Salsa20 can be found here: * http://www.ecrypt.eu.org/stream/ * http://cr.yp.to/snuffle.html * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * */ #include <asm/unaligned.h> #include <crypto/internal/skcipher.h> #include <linux/module.h> #define SALSA20_IV_SIZE 8 #define SALSA20_MIN_KEY_SIZE 16 #define SALSA20_MAX_KEY_SIZE 32 #define SALSA20_BLOCK_SIZE 64 struct salsa20_ctx { u32 initial_state[16]; }; static void salsa20_block(u32 *state, __le32 *stream) { u32 x[16]; int i; memcpy(x, state, sizeof(x)); for (i = 0; i < 20; i += 2) { x[ 4] ^= rol32((x[ 0] + x[12]), 7); x[ 8] ^= rol32((x[ 4] + x[ 0]), 9); x[12] ^= rol32((x[ 8] + x[ 4]), 13); x[ 0] ^= rol32((x[12] + x[ 8]), 18); x[ 9] ^= rol32((x[ 5] + x[ 1]), 7); x[13] ^= rol32((x[ 9] + x[ 5]), 9); x[ 1] ^= rol32((x[13] + x[ 9]), 13); x[ 5] ^= rol32((x[ 1] + x[13]), 18); x[14] ^= rol32((x[10] + x[ 6]), 7); x[ 2] ^= rol32((x[14] + x[10]), 9); x[ 6] ^= rol32((x[ 2] + x[14]), 13); x[10] ^= rol32((x[ 6] + x[ 2]), 18); x[ 3] ^= rol32((x[15] + x[11]), 7); x[ 7] ^= rol32((x[ 3] + x[15]), 9); x[11] ^= rol32((x[ 7] + x[ 3]), 13); x[15] ^= rol32((x[11] + x[ 7]), 18); x[ 1] ^= rol32((x[ 0] + x[ 3]), 7); x[ 2] ^= rol32((x[ 1] + x[ 0]), 9); x[ 3] ^= rol32((x[ 2] + x[ 1]), 13); x[ 0] ^= rol32((x[ 3] + x[ 2]), 18); x[ 6] ^= rol32((x[ 5] + x[ 4]), 7); x[ 7] ^= rol32((x[ 6] + x[ 5]), 9); x[ 4] ^= rol32((x[ 7] + x[ 6]), 13); x[ 5] ^= rol32((x[ 4] + x[ 7]), 18); x[11] ^= rol32((x[10] + x[ 9]), 7); x[ 8] ^= rol32((x[11] + x[10]), 9); x[ 9] ^= rol32((x[ 8] + x[11]), 13); x[10] ^= rol32((x[ 9] + x[ 8]), 18); x[12] ^= rol32((x[15] + x[14]), 7); x[13] ^= rol32((x[12] + x[15]), 9); x[14] ^= rol32((x[13] + x[12]), 13); x[15] ^= rol32((x[14] + x[13]), 18); } for (i = 0; i < 16; i++) stream[i] = cpu_to_le32(x[i] + state[i]); if (++state[8] == 0) state[9]++; } static void salsa20_docrypt(u32 *state, u8 *dst, const u8 *src, unsigned int bytes) { __le32 stream[SALSA20_BLOCK_SIZE / sizeof(__le32)]; while (bytes >= SALSA20_BLOCK_SIZE) { salsa20_block(state, stream); crypto_xor_cpy(dst, src, (const u8 *)stream, SALSA20_BLOCK_SIZE); bytes -= SALSA20_BLOCK_SIZE; dst += SALSA20_BLOCK_SIZE; src += SALSA20_BLOCK_SIZE; } if (bytes) { salsa20_block(state, stream); crypto_xor_cpy(dst, src, (const u8 *)stream, bytes); } } static void salsa20_init(u32 *state, const struct salsa20_ctx *ctx, const u8 *iv) { memcpy(state, ctx->initial_state, sizeof(ctx->initial_state)); state[6] = get_unaligned_le32(iv + 0); state[7] = get_unaligned_le32(iv + 4); } static int salsa20_setkey(struct crypto_skcipher *tfm, const u8 *key, unsigned int keysize) { static const char sigma[16] = "expand 32-byte k"; static const char tau[16] = "expand 16-byte k"; struct salsa20_ctx *ctx = crypto_skcipher_ctx(tfm); const char *constants; if (keysize != SALSA20_MIN_KEY_SIZE && keysize != SALSA20_MAX_KEY_SIZE) return -EINVAL; ctx->initial_state[1] = get_unaligned_le32(key + 0); ctx->initial_state[2] = get_unaligned_le32(key + 4); ctx->initial_state[3] = get_unaligned_le32(key + 8); ctx->initial_state[4] = get_unaligned_le32(key + 12); if (keysize == 32) { /* recommended */ key += 16; constants = sigma; } else { /* keysize == 16 */ constants = tau; } ctx->initial_state[11] = get_unaligned_le32(key + 0); ctx->initial_state[12] = get_unaligned_le32(key + 4); ctx->initial_state[13] = get_unaligned_le32(key + 8); ctx->initial_state[14] = get_unaligned_le32(key + 12); ctx->initial_state[0] = get_unaligned_le32(constants + 0); ctx->initial_state[5] = get_unaligned_le32(constants + 4); ctx->initial_state[10] = get_unaligned_le32(constants + 8); ctx->initial_state[15] = get_unaligned_le32(constants + 12); /* space for the nonce; it will be overridden for each request */ ctx->initial_state[6] = 0; ctx->initial_state[7] = 0; /* initial block number */ ctx->initial_state[8] = 0; ctx->initial_state[9] = 0; return 0; } static int salsa20_crypt(struct skcipher_request *req) { struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); const struct salsa20_ctx *ctx = crypto_skcipher_ctx(tfm); struct skcipher_walk walk; u32 state[16]; int err; err = skcipher_walk_virt(&walk, req, false); salsa20_init(state, ctx, req->iv); while (walk.nbytes > 0) { unsigned int nbytes = walk.nbytes; if (nbytes < walk.total) nbytes = round_down(nbytes, walk.stride); salsa20_docrypt(state, walk.dst.virt.addr, walk.src.virt.addr, nbytes); err = skcipher_walk_done(&walk, walk.nbytes - nbytes); } return err; } static struct skcipher_alg alg = { .base.cra_name = "salsa20", .base.cra_driver_name = "salsa20-generic", .base.cra_priority = 100, .base.cra_blocksize = 1, .base</