# # Example config for cross compiling # # In this config, it is expected that the tool chains from: # # http://kernel.org/pub/tools/crosstool/files/bin/x86_64/ # # running on a x86_64 system have been downloaded and installed into: # # /usr/local/ # # such that the compiler binaries are something like: # # /usr/local/gcc-4.5.2-nolibc/mips-linux/bin/mips-linux-gcc # # Some of the archs will use gcc-4.5.1 instead of gcc-4.5.2 # this config uses variables to differentiate them. # # Comments describe some of the options, but full descriptions of # options are described in the samples.conf file. # ${PWD} is defined by ktest.pl to be the directory that the user # was in when they executed ktest.pl. It may be better to hardcode the # path name here. THIS_DIR is the variable used through out the config file # in case you want to change it. THIS_DIR := ${PWD} # Update the BUILD_DIR option to the location of your git repo you want to test. BUILD_DIR = ${THIS_DIR}/linux.git # The build will go into this directory. It will be created when you run the test. OUTPUT_DIR = ${THIS_DIR}/cross-compile # The build will be compiled with -j8 BUILD_OPTIONS = -j8 # The test will not stop when it hits a failure. DIE_ON_FAILURE = 0 # If you want to have ktest.pl store the failure somewhere, uncomment this option # and change the directory where ktest should store the failures. #STORE_FAILURES = ${THIS_DIR}/failures # The log file is stored in the OUTPUT_DIR called cross.log # If you enable this, you need to create the OUTPUT_DIR. It wont be created for you. LOG_FILE = ${OUTPUT_DIR}/cross.log # The log file will be cleared each time you run ktest. CLEAR_LOG = 1 # As some archs do not build with the defconfig, they have been marked # to be ignored. If you want to test them anyway, change DO_FAILED to 1. # If a test that has been marked as DO_FAILED passes, then you should change # that test to be DO_DEFAULT DO_FAILED := 0 DO_DEFAULT := 1 # By setting both DO_FAILED and DO_DEFAULT to zero, you can pick a single # arch that you want to test. (uncomment RUN and chose your arch) #RUN := m32r # At the bottom of the config file exists a bisect test. You can update that # test and set DO_FAILED and DO_DEFAULT to zero, and uncomment this variable # to run the bisect on the arch. #RUN := bisect # By default all tests will be running gcc 4.5.2. Some tests are using 4.5.1 # and they select that in the test. # Note: GCC_VER is declared as on option and not a variable ('=' instead of ':=') # This is important. A variable is used only in the config file and if it is set # it stays that way for the rest of the config file until it is change again. # Here we want GCC_VER to remain persistent and change for each test, as it is used in # the MAKE_CMD. By using '=' instead of ':=' we achieve our goal. GCC_VER = 4.5.2 MAKE_CMD = PATH=/usr/local/gcc-${GCC_VER}-nolibc/${CROSS}/bin:$PATH CROSS_COMPILE=${CROSS}- make ARCH=${ARCH} # all tests are only doing builds. TEST_TYPE = build # If you want to add configs on top of the defconfig, you can add those configs into # the add-config file and uncomment this option. This is useful if you want to test # all cross compiles with PREEMPT set, or TRACING on, etc. #ADD_CONFIG = ${THIS_DIR}/add-config # All tests are using defconfig BUILD_TYPE = defconfig # The test names will have the arch and cross compiler used. This will be shown in # the results. TEST_NAME = ${ARCH} ${CROSS} # alpha TEST_START IF ${RUN} == alpha || ${DO_DEFAULT} # Notice that CROSS and ARCH are also options and not variables (again '=' instead # of ':='). This is because TEST_NAME and MAKE_CMD wil use them for each test. # Only options are available during runs. Variables are only present in parsing the # config file. CROSS = alpha-linux ARCH = alpha # arm TEST_START IF ${RUN} == arm || ${DO_DEFAULT} CROSS = arm-unknown-linux-gnueabi ARCH = arm # black fin TEST_START IF ${RUN} == bfin || ${DO_DEFAULT} CROSS = bfin-uclinux ARCH = blackfin BUILD_OPTIONS = -j8 vmlinux # cris - FAILS? TEST_START IF ${RUN} == cris || ${RUN} == cris64 || ${DO_FAILED} CROSS = cris-linux ARCH = cris # cris32 - not right arch? TEST_START IF ${RUN} == cris || ${RUN} == cris32 || ${DO_FAILED} CROSS = crisv32-linux ARCH = cris # ia64 TEST_START IF ${RUN} == ia64 || ${DO_DEFAULT} CROSS = ia64-linux ARCH = ia64 # frv TEST_START IF ${RUN} == frv || ${DO_FAILED} CROSS = frv-linux ARCH = frv GCC_VER = 4.5.1 # m68k fails with error? TEST_START IF ${RUN} == m68k || ${DO_DEFAULT} CROSS = m68k-linux ARCH = m68k # mips64 TEST_START IF ${RUN} == mips || ${RUN} == mips64 || ${DO_DEFAULT} CROSS = mips64-linux ARCH = mips # mips32 TEST_START IF ${RUN} == mips || ${RUN} == mips32 || ${DO_DEFAULT} CROSS = mips-linux ARCH = mips # m32r TEST_START IF ${RUN} == m32r || ${DO_FAILED} CROSS = m32r-linux ARCH = m32r GCC_VER = 4.5.1 BUILD_OPTIONS = -j8 vmlinux # parisc64 failed? TEST_START IF ${RUN} == hppa || ${RUN} == hppa64 || ${DO_FAILED} CROSS = hppa64-linux ARCH = parisc # parisc TEST_START IF ${RUN} == hppa || ${RUN} == hppa32 || ${DO_FAILED} CROSS = hppa-linux ARCH = parisc # ppc TEST_START IF ${RUN} == ppc || ${RUN} == ppc32 || ${DO_DEFAULT} CROSS = powerpc-linux ARCH = powerpc # ppc64 TEST_START IF ${RUN} == ppc || ${RUN} == ppc64 || ${DO_DEFAULT} CROSS = powerpc64-linux ARCH = powerpc # s390 TEST_START IF ${RUN} == s390 || ${DO_DEFAULT} CROSS = s390x-linux ARCH = s390 # sh TEST_START IF ${RUN} == sh || ${DO_DEFAULT} CROSS = sh4-linux ARCH = sh # sparc64 TEST_START IF ${RUN} == sparc || ${RUN} == sparc64 || ${DO_DEFAULT} CROSS = sparc64-linux ARCH = sparc64 # sparc TEST_START IF ${RUN} == sparc || ${RUN} == sparc32 || ${DO_DEFAULT} CROSS = sparc-linux ARCH = sparc # xtensa failed TEST_START IF ${RUN} == xtensa || ${DO_FAILED} CROSS = xtensa-linux ARCH = xtensa # UML TEST_START IF ${RUN} == uml || ${DO_DEFAULT} MAKE_CMD = make ARCH=um SUBARCH=x86_64 ARCH = uml CROSS = TEST_START IF ${RUN} == x86 || ${RUN} == i386 || ${DO_DEFAULT} MAKE_CMD = make ARCH=i386 ARCH = i386 CROSS = TEST_START IF ${RUN} == x86 || ${RUN} == x86_64 || ${DO_DEFAULT} MAKE_CMD = make ARCH=x86_64 ARCH = x86_64 CROSS = ################################# # This is a bisect if needed. You need to give it a MIN_CONFIG that # will be the config file it uses. Basically, just copy the created defconfig # for the arch someplace and point MIN_CONFIG to it. TEST_START IF ${RUN} == bisect MIN_CONFIG = ${THIS_DIR}/min-config CROSS = s390x-linux ARCH = s390 TEST_TYPE = bisect BISECT_TYPE = build BISECT_GOOD = v3.1 BISECT_BAD = v3.2 CHECKOUT = v3.2 ################################# # These defaults are needed to keep ktest.pl from complaining. They are # ignored because the test does not go pass the build. No install or # booting of the target images. DEFAULTS MACHINE = crosstest SSH_USER = root BUILD_TARGET = cross TARGET_IMAGE = image POWER_CYCLE = cycle CONSOLE = console LOCALVERSION = version GRUB_MENU = grub REBOOT_ON_ERROR = 0 POWEROFF_ON_ERROR = 0 POWEROFF_ON_SUCCESS = 0 REBOOT_ON_SUCCESS = 0 e reason. It seems the better way to address this problem is to clear pfmemalloc in the TCP transmit path. pfmemalloc strict control really makes sense on the receive path. Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Josef Bacik <jbacik@fb.com> Signed-off-by: David S. Miller <davem@davemloft.net> 2017-02-03tcp: add tcp_mss_clamp() helperEric Dumazet3-19/+7 Small cleanup factorizing code doing the TCP_MAXSEG clamping. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> 2017-02-02net: add LINUX_MIB_PFMEMALLOCDROP counterEric Dumazet1-0/+1 Debugging issues caused by pfmemalloc is often tedious. Add a new SNMP counter to more easily diagnose these problems. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Josef Bacik <jbacik@fb.com> Acked-by: Josef Bacik <jbacik@fb.com> Signed-off-by: David S. Miller <davem@davemloft.net> 2017-02-02net: ipv4: remove fib_lookup.h from devinet.c include listDavid Ahern1-2/+0 nothing in devinet.c relies on fib_lookup.h; remove it from the includes Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net> 2017-02-02Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-2/+4 All merge conflicts were simple overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net> 2017-02-02netfilter: allow logging from non-init namespacesMichal Kubeček2-2/+2 Commit 69b34fb996b2 ("netfilter: xt_LOG: add net namespace support for xt_LOG") disabled logging packets using the LOG target from non-init namespaces. The motivation was to prevent containers from flooding kernel log of the host. The plan was to keep it that way until syslog namespace implementation allows containers to log in a safe way. However, the work on syslog namespace seems to have hit a dead end somewhere in 2013 and there are users who want to use xt_LOG in all network namespaces. This patch allows to do so by setting /proc/sys/net/netfilter/nf_log_all_netns to a nonzero value. This sysctl is only accessible from init_net so that one cannot switch the behaviour from inside a container. Signed-off-by: Michal Kubecek <mkubecek@suse.cz> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> 2017-02-02netfilter: add and use nf_ct_set helperFlorian Westphal3-6/+3 Add a helper to assign a nf_conn entry and the ctinfo bits to an sk_buff. This avoids changing code in followup patch that merges skb->nfct and skb->nfctinfo into skb->_nfct. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> 2017-02-02skbuff: add and use skb_nfct helperFlorian Westphal4-8/+8 Followup patch renames skb->nfct and changes its type so add a helper to avoid intrusive rename change later. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> 2017-02-02netfilter: reset netfilter state when duplicating packetFlorian Westphal1-1/+1 We should also toss nf_bridge_info, if any -- packet is leaving via ip_local_out, also, this skb isn't bridged -- it is a locally generated copy. Also this avoids the need to touch this later when skb->nfct is replaced with 'unsigned long _nfct' in followup patch. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> 2017-02-02netfilter: conntrack: no need to pass ctinfo to error handlerFlorian Westphal1-6/+6 It is never accessed for reading and the only places that write to it are the icmp(6) handlers, which also set skb->nfct (and skb->nfctinfo). The conntrack core specifically checks for attached skb->nfct after ->error() invocation and returns early in this case. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>