1. 16 12月, 2016 13 次提交
  2. 10 12月, 2016 3 次提交
  3. 09 12月, 2016 7 次提交
  4. 08 12月, 2016 7 次提交
  5. 07 12月, 2016 10 次提交
    • H
      crypto: caam - fix pointer size for AArch64 boot loader, AArch32 kernel · 39eaf759
      Horia Geantă 提交于
      Start with a clean slate before dealing with bit 16 (pointer size)
      of Master Configuration Register.
      This fixes the case of AArch64 boot loader + AArch32 kernel, when
      the boot loader might set MCFGR[PS] and kernel would fail to clear it.
      
      Cc: <stable@vger.kernel.org>
      Reported-by: NAlison Wang <alison.wang@nxp.com>
      Signed-off-by: NHoria Geantă <horia.geanta@nxp.com>
      Reviewed-By: NAlison Wang <Alison.wang@nxp.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      39eaf759
    • R
      crypto: marvell - Don't corrupt state of an STD req for re-stepped ahash · 9e5f7a14
      Romain Perier 提交于
      mv_cesa_hash_std_step() copies the creq->state into the SRAM at each
      step, but this is only required on the first one. By doing that, we
      overwrite the engine state, and get erroneous results when the crypto
      request is split in several chunks to fit in the internal SRAM.
      
      This commit changes the function to copy the state only on the first
      step.
      
      Fixes: commit 2786cee8 ("crypto: marvell - Move SRAM I/O op...")
      Signed-off-by: NRomain Perier <romain.perier@free-electrons.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      9e5f7a14
    • R
      crypto: marvell - Don't copy hash operation twice into the SRAM · 68c7f8c1
      Romain Perier 提交于
      No need to copy the template of an hash operation twice into the SRAM
      from the step function.
      
      Fixes: commit 85030c51 ("crypto: marvell - Add support for chai...")
      Signed-off-by: NRomain Perier <romain.perier@free-electrons.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      68c7f8c1
    • D
      device-dax: fix private mapping restriction, permit read-only · 325896ff
      Dan Williams 提交于
      Hugh notes in response to commit 4cb19355 "device-dax: fail all
      private mapping attempts":
      
        "I think that is more restrictive than you intended: haven't tried, but I
        believe it rejects a PROT_READ, MAP_SHARED, O_RDONLY fd mmap, leaving no
        way to mmap /dev/dax without write permission to it."
      
      Indeed it does restrict read-only mappings, switch to checking
      VM_MAYSHARE, not VM_SHARED.
      
      Cc: <stable@vger.kernel.org>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Pawel Lebioda <pawel.lebioda@intel.com>
      Fixes: 4cb19355 ("device-dax: fail all private mapping attempts")
      Reported-by: NHugh Dickins <hughd@google.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      325896ff
    • D
      tools/testing/nvdimm: unit test acpi_nfit_ctl() · a7de92da
      Dan Williams 提交于
      A recent flurry of bug discoveries in the nfit driver's DSM marshalling
      routine has highlighted the fact that we do not have unit test coverage
      for this routine. Add a self-test of acpi_nfit_ctl() routine before
      probing the "nfit_test.0" device. This mocks stimulus to acpi_nfit_ctl()
      and if any of the tests fail "nfit_test.0" will be unavailable causing
      the rest of the tests to not run / fail.
      
      This unit test will also be a place to land reproductions of quirky BIOS
      behavior discovered in the field and ensure the kernel does not regress
      against implementations it has seen in practice.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      a7de92da
    • D
      acpi, nfit: fix bus vs dimm confusion in xlat_status · d6eb270c
      Dan Williams 提交于
      Given dimms and bus commands share the same command number space we need
      to be careful that we are translating status in the correct context.
      Otherwise we can, for example, fail an ND_CMD_GET_CONFIG_SIZE command
      because max_xfer is zero. It fails because that condition erroneously
      correlates with the 'cleared == 0' failure of ND_CMD_CLEAR_ERROR.
      
      Cc: <stable@vger.kernel.org>
      Fixes: aef25338 ("libnvdimm, nfit: centralize command status translation")
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      d6eb270c
    • D
      acpi, nfit: validate ars_status output buffer size · 82aa37cf
      Dan Williams 提交于
      If an ARS Status command returns truncated output, do not process
      partial records or otherwise consume non-status fields.
      
      Cc: <stable@vger.kernel.org>
      Fixes: 0caeef63 ("libnvdimm: Add a poison list and export badblocks")
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      82aa37cf
    • D
      acpi, nfit, libnvdimm: fix / harden ars_status output length handling · efda1b5d
      Dan Williams 提交于
      Given ambiguities in the ACPI 6.1 definition of the "Output (Size)"
      field of the ARS (Address Range Scrub) Status command, a firmware
      implementation may in practice return 0, 4, or 8 to indicate that there
      is no output payload to process.
      
      The specification states "Size of Output Buffer in bytes, including this
      field.". However, 'Output Buffer' is also the name of the entire
      payload, and earlier in the specification it states "Max Query ARS
      Status Output Buffer Size: Maximum size of buffer (including the Status
      and Extended Status fields)".
      
      Without this fix if the BIOS happens to return 0 it causes memory
      corruption as evidenced by this result from the acpi_nfit_ctl() unit
      test.
      
       ars_status00000000: 00020000 00000000                    ........
       BUG: stack guard page was hit at ffffc90001750000 (stack is ffffc9000174c000..ffffc9000174ffff)
       kernel stack overflow (page fault): 0000 [#1] SMP DEBUG_PAGEALLOC
       task: ffff8803332d2ec0 task.stack: ffffc9000174c000
       RIP: 0010:[<ffffffff814cfe72>]  [<ffffffff814cfe72>] __memcpy+0x12/0x20
       RSP: 0018:ffffc9000174f9a8  EFLAGS: 00010246
       RAX: ffffc9000174fab8 RBX: 0000000000000000 RCX: 000000001fffff56
       RDX: 0000000000000000 RSI: ffff8803231f5a08 RDI: ffffc90001750000
       RBP: ffffc9000174fa88 R08: ffffc9000174fab0 R09: ffff8803231f54b8
       R10: 0000000000000008 R11: 0000000000000001 R12: 0000000000000000
       R13: 0000000000000000 R14: 0000000000000003 R15: ffff8803231f54a0
       FS:  00007f3a611af640(0000) GS:ffff88033ed00000(0000) knlGS:0000000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
       CR2: ffffc90001750000 CR3: 0000000325b20000 CR4: 00000000000406e0
       Stack:
        ffffffffa00bc60d 0000000000000008 ffffc90000000001 ffffc9000174faac
        0000000000000292 ffffffffa00c24e4 ffffffffa00c2914 0000000000000000
        0000000000000000 ffffffff00000003 ffff880331ae8ad0 0000000800000246
       Call Trace:
        [<ffffffffa00bc60d>] ? acpi_nfit_ctl+0x49d/0x750 [nfit]
        [<ffffffffa01f4fe0>] nfit_test_probe+0x670/0xb1b [nfit_test]
      
      Cc: <stable@vger.kernel.org>
      Fixes: 747ffe11 ("libnvdimm, tools/testing/nvdimm: fix 'ars_status' output buffer sizing")
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      efda1b5d
    • V
      acpi, nfit: fix extended status translations for ACPI DSMs · 9a901f54
      Vishal Verma 提交于
      ACPI DSMs can have an 'extended' status which can be non-zero to convey
      additional information about the command. In the xlat_status routine,
      where we translate the command statuses, we were returning an error for
      a non-zero extended status, even if the primary status indicated success.
      
      Return from each command's 'case' once we have verified both its status
      and extend status are good.
      
      Cc: <stable@vger.kernel.org>
      Fixes: 11294d63 ("nfit: fail DSMs that return non-zero status by default")
      Signed-off-by: NVishal Verma <vishal.l.verma@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      9a901f54
    • M
      net/mlx5e: Change the SQ/RQ operational state to positive logic · c0f1147d
      Mohamad Haj Yahia 提交于
      When using the negative logic (i.e. FLUSH state), after the RQ/SQ reopen
      we will have a time interval that the RQ/SQ is not really ready and the
      state indicates that its not in FLUSH state because the initial SQ/RQ struct
      memory starts as zeros.
      Now we changed the state to indicate if the SQ/RQ is opened and we will
      set the READY state after finishing preparing all the SQ/RQ resources.
      
      Fixes: 6e8dd6d6 ("net/mlx5e: Don't wait for SQ completions on close")
      Fixes: f2fde18c ("net/mlx5e: Don't wait for RQ completions on close")
      Signed-off-by: NMohamad Haj Yahia <mohamad@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c0f1147d