1. 22 10月, 2007 1 次提交
    • M
      [Bluetooth] Switch from OGF+OCF to using only opcodes · a9de9248
      Marcel Holtmann 提交于
      The Bluetooth HCI commands are divided into logical OGF groups for
      easier identification of their purposes. While this still makes sense
      for the written specification, its makes the code only more complex
      and harder to read. So instead of using separate OGF and OCF values
      to identify the commands, use a common 16-bit opcode that combines
      both values. As a side effect this also reduces the complexity of
      OGF and OCF calculations during command header parsing.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      a9de9248
  2. 20 10月, 2007 3 次提交
  3. 18 10月, 2007 17 次提交
    • H
      [IPSEC]: Rename mode to outer_mode and add inner_mode · 13996378
      Herbert Xu 提交于
      This patch adds a new field to xfrm states called inner_mode.  The existing
      mode object is renamed to outer_mode.
      
      This is the first part of an attempt to fix inter-family transforms.  As it
      is we always use the outer family when determining which mode to use.  As a
      result we may end up shoving IPv4 packets into netfilter6 and vice versa.
      
      What we really want is to use the inner family for the first part of outbound
      processing and the outer family for the second part.  For inbound processing
      we'd use the opposite pairing.
      
      I've also added a check to prevent silly combinations such as transport mode
      with inter-family transforms.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      13996378
    • H
      [IPSEC]: Store afinfo pointer in xfrm_mode · 17c2a42a
      Herbert Xu 提交于
      It is convenient to have a pointer from xfrm_state to address-specific
      functions such as the output function for a family.  Currently the
      address-specific policy code calls out to the xfrm state code to get
      those pointers when we could get it in an easier way via the state
      itself.
      
      This patch adds an xfrm_state_afinfo to xfrm_mode (since they're
      address-specific) and changes the policy code to use it.  I've also
      added an owner field to do reference counting on the module providing
      the afinfo even though it isn't strictly necessary today since IPv6
      can't be unloaded yet.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      17c2a42a
    • H
      [IPSEC]: Add missing BEET checks · 1bfcb10f
      Herbert Xu 提交于
      Currently BEET mode does not reinject the packet back into the stack
      like tunnel mode does.  Since BEET should behave just like tunnel mode
      this is incorrect.
      
      This patch fixes this by introducing a flags field to xfrm_mode that
      tells the IPsec code whether it should terminate and reinject the packet
      back into the stack.
      
      It then sets the flag for BEET and tunnel mode.
      
      I've also added a number of missing BEET checks elsewhere where we check
      whether a given mode is a tunnel or not.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1bfcb10f
    • H
      [IPSEC]: Move type and mode map into xfrm_state.c · aa5d62cc
      Herbert Xu 提交于
      The type and mode maps are only used by SAs, not policies.  So it makes
      sense to move them from xfrm_policy.c into xfrm_state.c.  This also allows
      us to mark xfrm_get_type/xfrm_put_type/xfrm_get_mode/xfrm_put_mode as
      static.
      
      The only other change I've made in the move is to get rid of the casts
      on the request_module call for types.  They're unnecessary because C
      will promote them to ints anyway.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      aa5d62cc
    • H
      [IPSEC]: Get nexthdr from caller in xfrm6_rcv_spi · 33b5ecb8
      Herbert Xu 提交于
      Currently xfrm6_rcv_spi gets the nexthdr value itself from the packet.
      This means that we need to fix up the value in case we have a 4-on-6
      tunnel.  Moving this logic into the caller simplifies things and allows
      us to merge the code with IPv4.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      33b5ecb8
    • H
      [IPSEC]: Move tunnel parsing for IPv4 out of xfrm4_input · c4541b41
      Herbert Xu 提交于
      This patch moves the tunnel parsing for IPv4 out of xfrm4_input and into
      xfrm4_tunnel.  This change is in line with what IPv6 does and will allow
      us to merge the two input functions.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c4541b41
    • P
      [NET]: Fix the race between sk_filter_(de|at)tach and sk_clone() · 47e958ea
      Pavel Emelyanov 提交于
      The proposed fix is to delay the reference counter decrement
      until the quiescent state pass. This will give sk_clone() a
      chance to get the reference on the cloned filter.
      
      Regular sk_filter_uncharge can happen from the sk_free() only
      and there's no need in delaying the put - the socket is dead
      anyway and is to be release itself.
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      47e958ea
    • P
      [NET]: Move the filter releasing into a separate call · 309dd5fc
      Pavel Emelyanov 提交于
      This is done merely as a preparation for the fix.
      
      The sk_filter_uncharge() unaccounts the filter memory and calls
      the sk_filter_release(), which in turn decrements the refcount
      anf frees the filter.
      
      The latter function will be required separately.
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      309dd5fc
    • P
      [INET]: Remove no longer needed ->equal callback · 48d60056
      Pavel Emelyanov 提交于
      Since this callback is used to check for conflicts in
      hashtable when inserting a newly created frag queue, we can
      do the same by checking for matching the queue with the 
      argument, used to create one.
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      48d60056
    • P
      [INET]: Consolidate xxx_find() in fragment management · abd6523d
      Pavel Emelyanov 提交于
      Here we need another callback ->match to check whether the
      entry found in hash matches the key passed. The key used 
      is the same as the creation argument for inet_frag_create.
      
      Yet again, this ->match is the same for netfilter and ipv6.
      Running a frew steps forward - this callback will later
      replace the ->equal one.
      
      Since the inet_frag_find() uses the already consolidated
      inet_frag_create() remove the xxx_frag_create from protocol
      codes.
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      abd6523d
    • P
      [INET]: Consolidate xxx_frag_create() · c6fda282
      Pavel Emelyanov 提交于
      This one uses the xxx_frag_intern() and xxx_frag_alloc()
      routines, which are already consolidated, so remove them
      from protocol code (as promised).
      
      The ->constructor callback is used to init the rest of
      the frag queue and it is the same for netfilter and ipv6.
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c6fda282
    • P
      [INET]: Consolidate xxx_frag_alloc() · e521db9d
      Pavel Emelyanov 提交于
      Just perform the kzalloc() allocation and setup common
      fields in the inet_frag_queue(). Then return the result
      to the caller to initialize the rest.
      
      The inet_frag_alloc() may return NULL, so check the 
      return value before doing the container_of(). This looks 
      ugly, but the xxx_frag_alloc() will be removed soon.
      
      The xxx_expire() timer callbacks are patches, 
      because the argument is now the inet_frag_queue, not 
      the protocol specific queue.
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e521db9d
    • P
      [INET]: Consolidate xxx_frag_intern · 2588fe1d
      Pavel Emelyanov 提交于
      This routine checks for the existence of a given entry
      in the hash table and inserts the new one if needed.
      
      The ->equal callback is used to compare two frag_queue-s
      together, but this one is temporary and will be removed
      later. The netfilter code and the ipv6 one use the same
      routine to compare frags.
      
      The inet_frag_intern() always returns non-NULL pointer,
      so convert the inet_frag_queue into protocol specific
      one (with the container_of) without any checks.
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2588fe1d
    • E
      9p: remove sysctl · 982c37cf
      Eric Van Hensbergen 提交于
      A sysctl method was added to enable and disable debugging levels.  After
      further review, it was decided that there are better approaches to doing this
      and the sysctl methodology isn't really desirable.  This patch removes the
      sysctl code from 9p.
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
        
      982c37cf
    • E
      9p: fix bad kconfig cross-dependency · fb0466c3
      Eric Van Hensbergen 提交于
      This patch moves transport dynamic registration and matching to the net
      module to prevent a bad Kconfig dependency between the net and fs 9p modules.
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      fb0466c3
    • L
      9p: attach-per-user · ba17674f
      Latchesar Ionkov 提交于
      The 9P2000 protocol requires the authentication and permission checks to be
      done in the file server. For that reason every user that accesses the file
      server tree has to authenticate and attach to the server separately.
      Multiple users can share the same connection to the server.
      
      Currently v9fs does a single attach and executes all I/O operations as a
      single user. This makes using v9fs in multiuser environment unsafe as it
      depends on the client doing the permission checking.
      
      This patch improves the 9P2000 support by allowing every user to attach
      separately. The patch defines three modes of access (new mount option
      'access'):
      
      - attach-per-user (access=user) (default mode for 9P2000.u)
       If a user tries to access a file served by v9fs for the first time, v9fs
       sends an attach command to the server (Tattach) specifying the user. If
       the attach succeeds, the user can access the v9fs tree.
       As there is no uname->uid (string->integer) mapping yet, this mode works
       only with the 9P2000.u dialect.
      
      - allow only one user to access the tree (access=<uid>)
       Only the user with uid can access the v9fs tree. Other users that attempt
       to access it will get EPERM error.
      
      - do all operations as a single user (access=any) (default for 9P2000)
       V9fs does a single attach and all operations are done as a single user.
       If this mode is selected, the v9fs behavior is identical with the current
       one.
      Signed-off-by: NLatchesar Ionkov <lucho@ionkov.net>
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      ba17674f
    • E
      9p: Make transports dynamic · a80d923e
      Eric Van Hensbergen 提交于
      This patch abstracts out the interfaces to underlying transports so that
      new transports can be added as modules.  This should also allow kernel
      configuration of transports without ifdef-hell.
      Signed-off-by: NEric Van Hensbergen <ericvh@gmail.com>
      a80d923e
  4. 16 10月, 2007 12 次提交
  5. 11 10月, 2007 7 次提交