Skip to content

Commit c63d352

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2 parents 862b3d2 + bc3913a commit c63d352

58 files changed

Lines changed: 303 additions & 147 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Makefile‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
VERSION = 4
22
PATCHLEVEL = 9
33
SUBLEVEL = 0
4-
EXTRAVERSION = -rc7
4+
EXTRAVERSION = -rc8
55
NAME = Psychotic Stoned Sheep
66

77
# *DOCUMENTATION*
@@ -607,6 +607,13 @@ else
607607
include/config/auto.conf: ;
608608
endif # $(dot-config)
609609

610+
# For the kernel to actually contain only the needed exported symbols,
611+
# we have to build modules as well to determine what those symbols are.
612+
# (this can be evaluated only once include/config/auto.conf has been included)
613+
ifdef CONFIG_TRIM_UNUSED_KSYMS
614+
KBUILD_MODULES := 1
615+
endif
616+
610617
# The all: target is the default when no target is given on the
611618
# command line.
612619
# This allow a user to issue only 'make' to build a kernel including modules
@@ -944,7 +951,7 @@ ifdef CONFIG_GDB_SCRIPTS
944951
endif
945952
ifdef CONFIG_TRIM_UNUSED_KSYMS
946953
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/adjust_autoksyms.sh \
947-
"$(MAKE) KBUILD_MODULES=1 -f $(srctree)/Makefile vmlinux_prereq"
954+
"$(MAKE) -f $(srctree)/Makefile vmlinux"
948955
endif
949956

950957
# standalone target for easier testing

‎arch/powerpc/boot/Makefile‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ src-wlib-y := string.S crt0.S crtsavres.S stdio.c decompress.c main.c \
100100
ns16550.c serial.c simple_alloc.c div64.S util.S \
101101
elf_util.c $(zlib-y) devtree.c stdlib.c \
102102
oflib.c ofconsole.c cuboot.c mpsc.c cpm-serial.c \
103-
uartlite.c mpc52xx-psc.c opal.c opal-calls.S
103+
uartlite.c mpc52xx-psc.c opal.c
104+
src-wlib-$(CONFIG_PPC64_BOOT_WRAPPER) += opal-calls.S
104105
src-wlib-$(CONFIG_40x) += 4xx.c planetcore.c
105106
src-wlib-$(CONFIG_44x) += 4xx.c ebony.c bamboo.c
106107
src-wlib-$(CONFIG_8xx) += mpc8xx.c planetcore.c fsl-soc.c

‎arch/powerpc/boot/opal.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <libfdt.h>
1414
#include "../include/asm/opal-api.h"
1515

16-
#ifdef __powerpc64__
16+
#ifdef CONFIG_PPC64_BOOT_WRAPPER
1717

1818
/* Global OPAL struct used by opal-call.S */
1919
struct opal {

‎arch/powerpc/kernel/eeh_driver.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,8 +671,10 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus,
671671

672672
/* Clear frozen state */
673673
rc = eeh_clear_pe_frozen_state(pe, false);
674-
if (rc)
674+
if (rc) {
675+
pci_unlock_rescan_remove();
675676
return rc;
677+
}
676678

677679
/* Give the system 5 seconds to finish running the user-space
678680
* hotplug shutdown scripts, e.g. ifdown for ethernet. Yes,

‎arch/powerpc/kernel/vmlinux.lds.S‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,17 @@ SECTIONS
9494
* detected, and will result in a crash at boot due to offsets being
9595
* wrong.
9696
*/
97+
#ifdef CONFIG_PPC64
98+
/*
99+
* BLOCK(0) overrides the default output section alignment because
100+
* this needs to start right after .head.text in order for fixed
101+
* section placement to work.
102+
*/
103+
.text BLOCK(0) : AT(ADDR(.text) - LOAD_OFFSET) {
104+
#else
97105
.text : AT(ADDR(.text) - LOAD_OFFSET) {
98106
ALIGN_FUNCTION();
107+
#endif
99108
/* careful! __ftr_alt_* sections need to be close to .text */
100109
*(.text .fixup __ftr_alt_* .ref.text)
101110
SCHED_TEXT

‎arch/powerpc/mm/hash64_4k.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ int __hash_page_4K(unsigned long ea, unsigned long access, unsigned long vsid,
5555
*/
5656
rflags = htab_convert_pte_flags(new_pte);
5757

58-
if (!cpu_has_feature(CPU_FTR_NOEXECUTE) &&
58+
if (cpu_has_feature(CPU_FTR_NOEXECUTE) &&
5959
!cpu_has_feature(CPU_FTR_COHERENT_ICACHE))
6060
rflags = hash_page_do_lazy_icache(rflags, __pte(old_pte), trap);
6161

‎arch/powerpc/mm/hash64_64k.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ int __hash_page_4K(unsigned long ea, unsigned long access, unsigned long vsid,
8787
subpg_pte = new_pte & ~subpg_prot;
8888
rflags = htab_convert_pte_flags(subpg_pte);
8989

90-
if (!cpu_has_feature(CPU_FTR_NOEXECUTE) &&
90+
if (cpu_has_feature(CPU_FTR_NOEXECUTE) &&
9191
!cpu_has_feature(CPU_FTR_COHERENT_ICACHE)) {
9292

9393
/*
@@ -258,7 +258,7 @@ int __hash_page_64K(unsigned long ea, unsigned long access,
258258

259259
rflags = htab_convert_pte_flags(new_pte);
260260

261-
if (!cpu_has_feature(CPU_FTR_NOEXECUTE) &&
261+
if (cpu_has_feature(CPU_FTR_NOEXECUTE) &&
262262
!cpu_has_feature(CPU_FTR_COHERENT_ICACHE))
263263
rflags = hash_page_do_lazy_icache(rflags, __pte(old_pte), trap);
264264

‎crypto/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ obj-$(CONFIG_CRYPTO_ECDH) += ecdh_generic.o
4040

4141
$(obj)/rsapubkey-asn1.o: $(obj)/rsapubkey-asn1.c $(obj)/rsapubkey-asn1.h
4242
$(obj)/rsaprivkey-asn1.o: $(obj)/rsaprivkey-asn1.c $(obj)/rsaprivkey-asn1.h
43+
$(obj)/rsa_helper.o: $(obj)/rsapubkey-asn1.h $(obj)/rsaprivkey-asn1.h
4344
clean-files += rsapubkey-asn1.c rsapubkey-asn1.h
4445
clean-files += rsaprivkey-asn1.c rsaprivkey-asn1.h
4546

‎crypto/drbg.c‎

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ static int drbg_kcapi_sym_ctr(struct drbg_state *drbg,
262262
u8 *inbuf, u32 inbuflen,
263263
u8 *outbuf, u32 outlen);
264264
#define DRBG_CTR_NULL_LEN 128
265+
#define DRBG_OUTSCRATCHLEN DRBG_CTR_NULL_LEN
265266

266267
/* BCC function for CTR DRBG as defined in 10.4.3 */
267268
static int drbg_ctr_bcc(struct drbg_state *drbg,
@@ -1644,6 +1645,9 @@ static int drbg_fini_sym_kernel(struct drbg_state *drbg)
16441645
kfree(drbg->ctr_null_value_buf);
16451646
drbg->ctr_null_value = NULL;
16461647

1648+
kfree(drbg->outscratchpadbuf);
1649+
drbg->outscratchpadbuf = NULL;
1650+
16471651
return 0;
16481652
}
16491653

@@ -1708,6 +1712,15 @@ static int drbg_init_sym_kernel(struct drbg_state *drbg)
17081712
drbg->ctr_null_value = (u8 *)PTR_ALIGN(drbg->ctr_null_value_buf,
17091713
alignmask + 1);
17101714

1715+
drbg->outscratchpadbuf = kmalloc(DRBG_OUTSCRATCHLEN + alignmask,
1716+
GFP_KERNEL);
1717+
if (!drbg->outscratchpadbuf) {
1718+
drbg_fini_sym_kernel(drbg);
1719+
return -ENOMEM;
1720+
}
1721+
drbg->outscratchpad = (u8 *)PTR_ALIGN(drbg->outscratchpadbuf,
1722+
alignmask + 1);
1723+
17111724
return alignmask;
17121725
}
17131726

@@ -1737,15 +1750,16 @@ static int drbg_kcapi_sym_ctr(struct drbg_state *drbg,
17371750
u8 *outbuf, u32 outlen)
17381751
{
17391752
struct scatterlist sg_in;
1753+
int ret;
17401754

17411755
sg_init_one(&sg_in, inbuf, inlen);
17421756

17431757
while (outlen) {
1744-
u32 cryptlen = min_t(u32, inlen, outlen);
1758+
u32 cryptlen = min3(inlen, outlen, (u32)DRBG_OUTSCRATCHLEN);
17451759
struct scatterlist sg_out;
1746-
int ret;
17471760

1748-
sg_init_one(&sg_out, outbuf, cryptlen);
1761+
/* Output buffer may not be valid for SGL, use scratchpad */
1762+
sg_init_one(&sg_out, drbg->outscratchpad, cryptlen);
17491763
skcipher_request_set_crypt(drbg->ctr_req, &sg_in, &sg_out,
17501764
cryptlen, drbg->V);
17511765
ret = crypto_skcipher_encrypt(drbg->ctr_req);
@@ -1761,14 +1775,19 @@ static int drbg_kcapi_sym_ctr(struct drbg_state *drbg,
17611775
break;
17621776
}
17631777
default:
1764-
return ret;
1778+
goto out;
17651779
}
17661780
init_completion(&drbg->ctr_completion);
17671781

1782+
memcpy(outbuf, drbg->outscratchpad, cryptlen);
1783+
17681784
outlen -= cryptlen;
17691785
}
1786+
ret = 0;
17701787

1771-
return 0;
1788+
out:
1789+
memzero_explicit(drbg->outscratchpad, DRBG_OUTSCRATCHLEN);
1790+
return ret;
17721791
}
17731792
#endif /* CONFIG_CRYPTO_DRBG_CTR */
17741793

‎drivers/atm/eni.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1727,7 +1727,7 @@ static int eni_do_init(struct atm_dev *dev)
17271727
printk("\n");
17281728
printk(KERN_ERR DEV_LABEL "(itf %d): can't set up page "
17291729
"mapping\n",dev->number);
1730-
return error;
1730+
return -ENOMEM;
17311731
}
17321732
eni_dev->ioaddr = base;
17331733
eni_dev->base_diff = real_base - (unsigned long) base;

0 commit comments

Comments
 (0)