09 Nov, 2011

1 commit


25 Aug, 2011

1 commit


17 Jun, 2011

1 commit

  • Unnecessary casts of void * clutter the code.

    These are the remainder casts after several specific
    patches to remove netdev_priv and dev_priv.

    Done via coccinelle script:

    $ cat cast_void_pointer.cocci
    @@
    type T;
    T *pt;
    void *pv;
    @@

    - pt = (T *)pv;
    + pt = pv;

    Signed-off-by: Joe Perches
    Acked-by: Paul Moore
    Signed-off-by: David S. Miller

    Joe Perches
     

02 Jun, 2011

2 commits

  • In this case, the SCTP association transmits an ASCONF packet
    including addition of the new IP address and deletion of the old
    address. This patch implements this functionality.
    In this case, the ASCONF chunk is added to the beginning of the
    queue, because the other chunks cannot be transmitted in this state.

    Signed-off-by: Michio Honda
    Signed-off-by: YOSHIFUJI Hideaki
    Acked-by: Wei Yongjun
    Signed-off-by: David S. Miller

    Michio Honda
     
  • This patch fixes the problem that the original code cannot delete
    the remote address where the corresponding transport is currently
    directed, even when the ASCONF is sent from the other address (this
    situation happens when the single-homed sender transmits ASCONF
    with ADD and DEL.)

    Signed-off-by: Michio Honda
    Signed-off-by: YOSHIFUJI Hideaki
    Acked-by: Wei Yongjun
    Signed-off-by: David S. Miller

    Michio Honda
     

20 Apr, 2011

4 commits

  • Make heartbeat information in sctp_make_heartbeat() instead
    of make it in sctp_sf_heartbeat() directly for common using.

    Signed-off-by: Wei Yongjun
    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Wei Yongjun
     
  • SCTP does not check whether the source address of COOKIE-ECHO
    chunk is the original address of INIT chunk or part of the any
    address parameters saved in COOKIE in CLOSED state. So even if
    the COOKIE-ECHO chunk is from any address but with correct COOKIE,
    the COOKIE-ECHO chunk still be accepted. If the COOKIE is not from
    a valid address, the assoc should not be established.

    Signed-off-by: Wei Yongjun
    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Wei Yongjun
     
  • When processing an ACK for ADD_IP parameter, we only release
    the routes on non-active transports. This can cause a wrong
    source address to be used. We can release the routes and
    cause new route lookups and source address selection so that
    new addresses can be used as source. Additionally, we don't need
    to lookup routes for all transports at the same time. We can let
    the transmit code path update the cached route when the transport
    actually sends something.

    Signed-off-by: Vlad Yasevich
    Signed-off-by: Wei Yongjun
    Signed-off-by: David S. Miller

    Vlad Yasevich
     
  • The 'p' member of struct sctp_paramhdr is common part for
    IPv4 addr parameter and IPv6 addr parameter in union sctp_addr_param.

    For addr-related code, use specified addr parameter.
    Otherwise, use common header to access type/length member.

    Signed-off-by: Shan Wei
    Signed-off-by: Vlad Yasevich
    Signed-off-by: Wei Yongjun
    Signed-off-by: David S. Miller

    Shan Wei
     

02 Apr, 2011

1 commit

  • Sometime the ASCONF_ACK parameters can equal to the fourfold of
    ASCONF parameters, this only happend in some special case:

    ASCONF parameter is :
    Unrecognized Parameter (4 bytes)
    ASCONF_ACK parameter should be:
    Error Cause Indication parameter (8 bytes header)
    + Error Cause (4 bytes header)
    + Unrecognized Parameter (4bytes)

    Four 4bytes Unrecognized Parameters in ASCONF chunk will cause panic.

    Pid: 0, comm: swapper Not tainted 2.6.38-next+ #22 Bochs Bochs
    EIP: 0060:[] EFLAGS: 00010246 CPU: 0
    EIP is at skb_put+0x60/0x70
    EAX: 00000077 EBX: c09060e2 ECX: dec1dc30 EDX: c09469c0
    ESI: 00000000 EDI: de3c8d40 EBP: dec1dc58 ESP: dec1dc2c
    DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
    Process swapper (pid: 0, ti=dec1c000 task=c09aef20 task.ti=c0980000)
    Stack:
    c09469c0 e1894fa4 00000044 00000004 de3c8d00 de3c8d00 de3c8d44 de3c8d40
    c09060e2 de25dd80 de3c8d40 dec1dc7c e1894fa4 dec1dcb0 00000040 00000004
    00000000 00000800 00000004 00000004 dec1dce0 e1895a2b dec1dcb4 de25d960
    Call Trace:
    [] ? sctp_addto_chunk+0x4e/0x89 [sctp]
    [] sctp_addto_chunk+0x4e/0x89 [sctp]
    [] sctp_process_asconf+0x32f/0x3d1 [sctp]
    [] sctp_sf_do_asconf+0xf8/0x173 [sctp]
    [] sctp_do_sm+0xb8/0x159 [sctp]
    [] ? sctp_cname+0x0/0x52 [sctp]
    [] sctp_assoc_bh_rcv+0xac/0xe3 [sctp]
    [] sctp_inq_push+0x2d/0x30 [sctp]
    [] sctp_rcv+0x7a7/0x83d [sctp]
    [] ? ipv4_confirm+0x118/0x125
    [] ? nf_iterate+0x34/0x62
    [] ? ip_local_deliver_finish+0x0/0x194
    [] ? ip_local_deliver_finish+0x0/0x194
    [] ip_local_deliver_finish+0xf5/0x194
    [] ? ip_local_deliver_finish+0x0/0x194
    [] NF_HOOK.clone.1+0x3d/0x44
    [] ip_local_deliver+0x3e/0x44
    [] ? ip_local_deliver_finish+0x0/0x194
    [] ip_rcv_finish+0x29f/0x2c7
    [] ? ip_rcv_finish+0x0/0x2c7
    [] NF_HOOK.clone.1+0x3d/0x44
    [] ip_rcv+0x1f5/0x233
    [] ? ip_rcv_finish+0x0/0x2c7
    [] __netif_receive_skb+0x310/0x336
    [] netif_receive_skb+0x4b/0x51
    [] cp_rx_poll+0x1e7/0x29c [8139cp]
    [] net_rx_action+0x65/0x13a
    [] __do_softirq+0xa1/0x149
    [] ? __do_softirq+0x0/0x149

    [] ? irq_exit+0x37/0x72
    [] ? do_IRQ+0x81/0x95
    [] ? common_interrupt+0x30/0x38
    [] ? native_safe_halt+0xa/0xc
    [] ? default_idle+0x58/0x92
    [] ? cpu_idle+0x96/0xb2
    [] ? rest_init+0x5d/0x5f
    [] ? start_kernel+0x34b/0x350
    [] ? i386_start_kernel+0xba/0xc1

    Signed-off-by: Wei Yongjun
    Signed-off-by: David S. Miller

    Wei Yongjun
     

08 Mar, 2011

1 commit


20 Feb, 2011

1 commit

  • commit 5fa782c2f5ef6c2e4f04d3e228412c9b4a4c8809 re-worked the
    handling of unknown parameters. sctp_init_cause_fixed() can now
    return -ENOSPC if there is not enough tailroom in the error
    chunk skb. When this happens, the error header is not appended to
    the error chunk. In that case, the payload of the unknown parameter
    should not be appended either.

    Signed-off-by: Jiri Bohac
    Acked-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Jiri Bohac
     

27 Aug, 2010

1 commit

  • Change SCTP_DEBUG_PRINTK and SCTP_DEBUG_PRINTK_IPADDR to
    use do { print } while (0) guards.
    Add SCTP_DEBUG_PRINTK_CONT to fix errors in log when
    lines were continued.
    Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
    Add a missing newline in "Failed bind hash alloc"

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     

03 Jun, 2010

1 commit


18 May, 2010

1 commit

  • commit 5fa782c2f5ef6c2e4f04d3e228412c9b4a4c8809
    sctp: Fix skb_over_panic resulting from multiple invalid \
    parameter errors (CVE-2010-1173) (v4)

    cause 'error cause' never be add the the ERROR chunk due to
    some typo when check valid length in sctp_init_cause_fixed().

    Signed-off-by: Wei Yongjun
    Reviewed-by: Neil Horman
    Acked-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Wei Yongjun
     

04 May, 2010

1 commit


01 May, 2010

2 commits

  • The 'resent' bit is used to make sure that we don't update
    rto estimate based on retransmitted chunks. However, we already
    have the 'rto_pending' bit that we test when need to update rto,
    so 'resent' bit is just extra. Additionally, we currently have
    a bug in that we always set a 'resent' bit and thus rto estimate
    is only updated by Heartbeats.

    Signed-off-by: Vlad Yasevich

    Vlad Yasevich
     
  • This assignment isn't needed because we did it earlier already.

    Also another reason to delete the assignment is because it triggers a
    Smatch warning about checking for NULL pointers after a dereference.

    Reported-by: Vlad Yasevich
    Signed-off-by: Dan Carpenter
    Signed-off-by: Vlad Yasevich

    Dan Carpenter
     

29 Apr, 2010

3 commits

  • Ok, version 4

    Change Notes:
    1) Minor cleanups, from Vlads notes

    Summary:

    Hey-
    Recently, it was reported to me that the kernel could oops in the
    following way:

    kernel BUG at net/core/skbuff.c:91!
    invalid operand: 0000 [#1]
    Modules linked in: sctp netconsole nls_utf8 autofs4 sunrpc iptable_filter
    ip_tables cpufreq_powersave parport_pc lp parport vmblock(U) vsock(U) vmci(U)
    vmxnet(U) vmmemctl(U) vmhgfs(U) acpiphp dm_mirror dm_mod button battery ac md5
    ipv6 uhci_hcd ehci_hcd snd_ens1371 snd_rawmidi snd_seq_device snd_pcm_oss
    snd_mixer_oss snd_pcm snd_timer snd_page_alloc snd_ac97_codec snd soundcore
    pcnet32 mii floppy ext3 jbd ata_piix libata mptscsih mptsas mptspi mptscsi
    mptbase sd_mod scsi_mod
    CPU: 0
    EIP: 0060:[] Not tainted VLI
    EFLAGS: 00010216 (2.6.9-89.0.25.EL)
    EIP is at skb_over_panic+0x1f/0x2d
    eax: 0000002c ebx: c033f461 ecx: c0357d96 edx: c040fd44
    esi: c033f461 edi: df653280 ebp: 00000000 esp: c040fd40
    ds: 007b es: 007b ss: 0068
    Process swapper (pid: 0, threadinfo=c040f000 task=c0370be0)
    Stack: c0357d96 e0c29478 00000084 00000004 c033f461 df653280 d7883180
    e0c2947d
    00000000 00000080 df653490 00000004 de4f1ac0 de4f1ac0 00000004
    df653490
    00000001 e0c2877a 08000800 de4f1ac0 df653490 00000000 e0c29d2e
    00000004
    Call Trace:
    [] sctp_addto_chunk+0xb0/0x128 [sctp]
    [] sctp_addto_chunk+0xb5/0x128 [sctp]
    [] sctp_init_cause+0x3f/0x47 [sctp]
    [] sctp_process_unk_param+0xac/0xb8 [sctp]
    [] sctp_verify_init+0xcc/0x134 [sctp]
    [] sctp_sf_do_5_1B_init+0x83/0x28e [sctp]
    [] sctp_do_sm+0x41/0x77 [sctp]
    [] cache_grow+0x140/0x233
    [] sctp_endpoint_bh_rcv+0xc5/0x108 [sctp]
    [] sctp_inq_push+0xe/0x10 [sctp]
    [] sctp_rcv+0x454/0x509 [sctp]
    [] ipt_hook+0x17/0x1c [iptable_filter]
    [] nf_iterate+0x40/0x81
    [] ip_local_deliver_finish+0x0/0x151
    [] ip_local_deliver_finish+0xc6/0x151
    [] nf_hook_slow+0x83/0xb5
    [] ip_local_deliver+0x1a2/0x1a9
    [] ip_local_deliver_finish+0x0/0x151
    [] ip_rcv+0x334/0x3b4
    [] netif_receive_skb+0x320/0x35b
    [] init_stall_timer+0x67/0x6a [uhci_hcd]
    [] process_backlog+0x6c/0xd9
    [] net_rx_action+0xfe/0x1f8
    [] __do_softirq+0x35/0x79
    [] handle_IRQ_event+0x0/0x4f
    [] do_softirq+0x46/0x4d

    Its an skb_over_panic BUG halt that results from processing an init chunk in
    which too many of its variable length parameters are in some way malformed.

    The problem is in sctp_process_unk_param:
    if (NULL == *errp)
    *errp = sctp_make_op_error_space(asoc, chunk,
    ntohs(chunk->chunk_hdr->length));

    if (*errp) {
    sctp_init_cause(*errp, SCTP_ERROR_UNKNOWN_PARAM,
    WORD_ROUND(ntohs(param.p->length)));
    sctp_addto_chunk(*errp,
    WORD_ROUND(ntohs(param.p->length)),
    param.v);

    When we allocate an error chunk, we assume that the worst case scenario requires
    that we have chunk_hdr->length data allocated, which would be correct nominally,
    given that we call sctp_addto_chunk for the violating parameter. Unfortunately,
    we also, in sctp_init_cause insert a sctp_errhdr_t structure into the error
    chunk, so the worst case situation in which all parameters are in violation
    requires chunk_hdr->length+(sizeof(sctp_errhdr_t)*param_count) bytes of data.

    The result of this error is that a deliberately malformed packet sent to a
    listening host can cause a remote DOS, described in CVE-2010-1173:
    http://cve.mitre.org/cgi-bin/cvename.cgi?name=2010-1173

    I've tested the below fix and confirmed that it fixes the issue. We move to a
    strategy whereby we allocate a fixed size error chunk and ignore errors we don't
    have space to report. Tested by me successfully

    Signed-off-by: Neil Horman
    Acked-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Neil Horman
     
  • When we finish processing ASCONF_ACK chunk, we try to send
    the next queued ASCONF. This action runs the sctp state
    machine recursively and it's not prepared to do so.

    kernel BUG at kernel/timer.c:790!
    invalid opcode: 0000 [#1] SMP
    last sysfs file: /sys/module/ipv6/initstate
    Modules linked in: sha256_generic sctp libcrc32c ipv6 dm_multipath
    uinput 8139too i2c_piix4 8139cp mii i2c_core pcspkr virtio_net joydev
    floppy virtio_blk virtio_pci [last unloaded: scsi_wait_scan]

    Pid: 0, comm: swapper Not tainted 2.6.34-rc4 #15 /Bochs
    EIP: 0060:[] EFLAGS: 00010286 CPU: 0
    EIP is at add_timer+0xd/0x1b
    EAX: cecbab14 EBX: 000000f0 ECX: c0957b1c EDX: 03595cf4
    ESI: cecba800 EDI: cf276f00 EBP: c0957aa0 ESP: c0957aa0
    DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
    Process swapper (pid: 0, ti=c0956000 task=c0988ba0 task.ti=c0956000)
    Stack:
    c0957ae0 d1851214 c0ab62e4 c0ab5f26 0500ffff 00000004 00000005 00000004
    00000000 d18694fd 00000004 1666b892 cecba800 cecba800 c0957b14
    00000004
    c0957b94 d1851b11 ceda8b00 cecba800 cf276f00 00000001 c0957b14
    000000d0
    Call Trace:
    [] ? sctp_side_effects+0x607/0xdfc [sctp]
    [] ? sctp_do_sm+0x108/0x159 [sctp]
    [] ? sctp_pname+0x0/0x1d [sctp]
    [] ? sctp_primitive_ASCONF+0x36/0x3b [sctp]
    [] ? sctp_process_asconf_ack+0x2a4/0x2d3 [sctp]
    [] ? sctp_sf_do_asconf_ack+0x1dd/0x2b4 [sctp]
    [] ? sctp_do_sm+0xb8/0x159 [sctp]
    [] ? sctp_cname+0x0/0x52 [sctp]
    [] ? sctp_assoc_bh_rcv+0xac/0xe1 [sctp]
    [] ? sctp_inq_push+0x2d/0x30 [sctp]
    [] ? sctp_rcv+0x797/0x82e [sctp]

    Tested-by: Wei Yongjun
    Signed-off-by: Yuansong Qiao
    Signed-off-by: Shuaijun Zhang
    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Vlad Yasevich
     
  • When calculating the INIT/INIT-ACK chunk length, we should not
    only account the length of parameters, but also the parameters
    zero padding length, such as AUTH HMACS parameter and CHUNKS
    parameter. Without the parameters zero padding length we may get
    following oops.

    skb_over_panic: text:ce2068d2 len:130 put:6 head:cac3fe00 data:cac3fe00 tail:0xcac3fe82 end:0xcac3fe80 dev:
    ------------[ cut here ]------------
    kernel BUG at net/core/skbuff.c:127!
    invalid opcode: 0000 [#2] SMP
    last sysfs file: /sys/module/aes_generic/initstate
    Modules linked in: authenc ......

    Pid: 4102, comm: sctp_darn Tainted: G D 2.6.34-rc2 #6
    EIP: 0060:[] EFLAGS: 00010282 CPU: 0
    EIP is at skb_over_panic+0x37/0x3e
    EAX: 00000078 EBX: c07c024b ECX: c07c02b9 EDX: cb607b78
    ESI: 00000000 EDI: cac3fe7a EBP: 00000002 ESP: cb607b74
    DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
    Process sctp_darn (pid: 4102, ti=cb607000 task=cabdc990 task.ti=cb607000)
    Stack:
    c07c02b9 ce2068d2 00000082 00000006 cac3fe00 cac3fe00 cac3fe82 cac3fe80
    c07c024b cac3fe7c cac3fe7a c0608dec ca986e80 ce2068d2 00000006 0000007a
    cb8120ca ca986e80 cb812000 00000003 cb8120c4 ce208a25 cb8120ca cadd9400
    Call Trace:
    [] ? sctp_addto_chunk+0x45/0x85 [sctp]
    [] ? skb_put+0x2e/0x32
    [] ? sctp_addto_chunk+0x45/0x85 [sctp]
    [] ? sctp_make_init+0x279/0x28c [sctp]
    [] ? apic_timer_interrupt+0x2a/0x30
    [] ? sctp_sf_do_prm_asoc+0x2b/0x7b [sctp]
    [] ? sctp_do_sm+0xa0/0x14a [sctp]
    [] ? sctp_pname+0x0/0x14 [sctp]
    [] ? sctp_primitive_ASSOCIATE+0x2b/0x31 [sctp]
    [] ? sctp_sendmsg+0x7a0/0x9eb [sctp]
    [] ? inet_sendmsg+0x3b/0x43
    [] ? task_tick_fair+0x2d/0xd9
    [] ? sock_sendmsg+0xa7/0xc1
    [] ? smp_apic_timer_interrupt+0x6b/0x75
    [] ? dequeue_task_fair+0x34/0x19b
    [] ? sched_clock_local+0x17/0x11e
    [] ? _copy_from_user+0x2b/0x10c
    [] ? verify_iovec+0x3c/0x6a
    [] ? sys_sendmsg+0x186/0x1e2
    [] ? __wake_up_common+0x34/0x5b
    [] ? __wake_up+0x2c/0x3b
    [] ? tty_wakeup+0x43/0x47
    [] ? remove_wait_queue+0x16/0x24
    [] ? n_tty_read+0x5b8/0x65e
    [] ? default_wake_function+0x0/0x8
    [] ? sys_socketcall+0x17f/0x1cd
    [] ? sysenter_do_call+0x12/0x22
    Code: 0f 45 de 53 ff b0 98 00 00 00 ff b0 94 ......
    EIP: [] skb_over_panic+0x37/0x3e SS:ESP 0068:cb607b74

    To reproduce:

    # modprobe sctp
    # echo 1 > /proc/sys/net/sctp/addip_enable
    # echo 1 > /proc/sys/net/sctp/auth_enable
    # sctp_test -H 3ffe:501:ffff:100:20c:29ff:fe4d:f37e -P 800 -l
    # sctp_darn -H 3ffe:501:ffff:100:20c:29ff:fe4d:f37e -P 900 -h 192.168.0.21 -p 800 -I -s -t
    sctp_darn ready to send...
    3ffe:501:ffff:100:20c:29ff:fe4d:f37e:900-192.168.0.21:800 Interactive mode> bindx-add=192.168.0.21
    3ffe:501:ffff:100:20c:29ff:fe4d:f37e:900-192.168.0.21:800 Interactive mode> bindx-add=192.168.1.21
    3ffe:501:ffff:100:20c:29ff:fe4d:f37e:900-192.168.0.21:800 Interactive mode> snd=10

    ------------------------------------------------------------------
    eth0 has addresses: 3ffe:501:ffff:100:20c:29ff:fe4d:f37e and 192.168.0.21
    eth1 has addresses: 192.168.1.21
    ------------------------------------------------------------------

    Reported-by: George Cheimonidis
    Signed-off-by: Wei Yongjun
    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Wei Yongjun
     

30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

24 Nov, 2009

1 commit


05 Sep, 2009

3 commits


03 Jun, 2009

2 commits

  • Use Unresolvable Address error cause instead of Invalid Mandatory
    Parameter error cause when process ASCONF chunk with invalid address
    since address parameters are not mandatory in the ASCONF chunk.

    Signed-off-by: Wei Yongjun
    Signed-off-by: Vlad Yasevich

    Wei Yongjun
     
  • RFC5061 Section 5.2. Upon Reception of an ASCONF Chunk

    V2) In processing the chunk, the receiver should build a
    response message with the appropriate error TLVs, as
    specified in the Parameter type bits, for any ASCONF
    Parameter it does not understand. To indicate an
    unrecognized parameter, Cause Type 8 should be used as
    defined in the ERROR in Section 3.3.10.8, [RFC4960]. The
    endpoint may also use the response to carry rejections for
    other reasons, such as resource shortages, etc., using the
    Error Cause TLV and an appropriate error condition.

    So we should indicate an unrecognized parameter with error
    SCTP_ERROR_UNKNOWN_PARAM in ACSONF-ACK chunk, not
    SCTP_ERROR_INV_PARAM.

    Signed-off-by: Wei Yongjun
    Signed-off-by: Vlad Yasevich

    Wei Yongjun
     

14 Mar, 2009

2 commits

  • RFC5061 states:

    Each adaptation layer that is defined that wishes
    to use this parameter MUST specify an adaptation code point in an
    appropriate RFC defining its use and meaning.

    If the user has not set one - assume they don't want to sent the param
    with a zero Adaptation Code Point.

    Rationale - Currently the IANA defines zero as reserved - and
    1 as the only valid value - so we consider zero to be unset - to save
    adding a boolean to the socket structure.

    Including this parameter unconditionally causes endpoints that do not
    understand it to report errors unnecessarily.

    Signed-off-by: Malcolm Lashley
    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    malc
     
  • This patch fix to indicate ASCONF support in INIT-ACK only if peer has
    such capable.

    This patch also fix to calc the chunk size if peer has no FWD-TSN
    capable.

    Signed-off-by: Wei Yongjun
    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Wei Yongjun
     

01 Feb, 2009

1 commit


09 Oct, 2008

2 commits

  • The gabs array in the sctp_tsnmap structure is only used
    in one place, sctp_make_sack(). As such, carrying the
    array around in the sctp_tsnmap and thus directly in
    the sctp_association is rather pointless since most
    of the time it's just taking up space. Now, let
    sctp_make_sack create and populate it and then throw
    it away when it's done.

    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Vlad Yasevich
     
  • The tsn map currently use is 4K large and is stuck inside
    the sctp_association structure making memory references REALLY
    expensive. What we really need is at most 4K worth of bits
    so the biggest map we would have is 512 bytes. Also, the
    map is only really usefull when we have gaps to store and
    report. As such, starting with minimal map of say 32 TSNs (bits)
    should be enough for normal low-loss operations. We can grow
    the map by some multiple of 32 along with some extra room any
    time we receive the TSN which would put us outside of the map
    boundry. As we close gaps, we can shift the map to rebase
    it on the latest TSN we've seen. This saves 4088 bytes per
    association just in the map alone along savings from the now
    unnecessary structure members.

    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Vlad Yasevich
     

01 Oct, 2008

2 commits


30 Sep, 2008

1 commit

  • Since call to function sctp_sf_abort_violation() need paramter 'arg' with
    'struct sctp_chunk' type, it will read the chunk type and chunk length from
    the chunk_hdr member of chunk. But call to sctp_sf_violation_paramlen()
    always with 'struct sctp_paramhdr' type's parameter, it will be passed to
    sctp_sf_abort_violation(). This may cause kernel panic.

    sctp_sf_violation_paramlen()
    |-- sctp_sf_abort_violation()
    |-- sctp_make_abort_violation()

    This patch fixed this problem. This patch also fix two place which called
    sctp_sf_violation_paramlen() with wrong paramter type.

    Signed-off-by: Wei Yongjun
    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Wei Yongjun
     

19 Sep, 2008

2 commits

  • If INIT-ACK is received with SupportedExtensions parameter which
    indicates that the peer does not support AUTH, the packet will be
    silently ignore, and sctp_process_init() do cleanup all of the
    transports in the association.
    When T1-Init timer is expires, OOPS happen while we try to choose
    a different init transport.

    The solution is to only clean up the non-active transports, i.e
    the ones that the peer added. However, that introduces a problem
    with sctp_connectx(), because we don't mark the proper state for
    the transports provided by the user. So, we'll simply mark
    user-provided transports as ACTIVE. That will allow INIT
    retransmissions to work properly in the sctp_connectx() context
    and prevent the crash.

    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Vlad Yasevich
     
  • Do not enable peer features like addip and auth, if they
    are administratively disabled localy. If the peer resports
    that he supports something that we don't, neither end can
    use it so enabling it is pointless. This solves a problem
    when talking to a peer that has auth and addip enabled while
    we do not. Found by Andrei Pelinescu-Onciul .

    Signed-off-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Vlad Yasevich
     

19 Jul, 2008

1 commit


14 May, 2008

1 commit

  • Introduced by c4492586 (sctp: Add address type check while process
    paramaters of ASCONF chunk):

    net/sctp/sm_make_chunk.c: In function 'sctp_process_asconf':
    net/sctp/sm_make_chunk.c:2828: warning: 'addr_param' may be used uninitialized in this function
    net/sctp/sm_make_chunk.c:2828: note: 'addr_param' was declared here

    Signed-off-by: Patrick McHardy
    Acked-by: Vlad Yasevich
    Signed-off-by: David S. Miller

    Patrick McHardy