Skip to content
This repository was archived by the owner on Sep 24, 2020. It is now read-only.

Commit d74ce2b

Browse files
authored
Merge pull request #257 from dm0-/v4.18.10-coreos
Rebase 4.18.9 patches onto 4.18.10
2 parents 1833484 + f3334a2 commit d74ce2b

File tree

5 files changed

+17
-21
lines changed

5 files changed

+17
-21
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ $(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make
143143

144144
# Invoke a second make in the output directory, passing relevant variables
145145
sub-make:
146-
$(Q)$(MAKE) -C $(KBUILD_OUTPUT) KBUILD_SRC=$(CURDIR) \
146+
$(Q)$(MAKE) -C $(KBUILD_OUTPUT) \
147+
KBUILD_SRC=$(shell realpath --relative-to=$(KBUILD_OUTPUT) $(CURDIR)) \
147148
-f $(CURDIR)/Makefile $(filter-out _all sub-make,$(MAKECMDGOALS))
148149

149150
# Leave processing to above invocation of make

arch/x86/boot/compressed/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,16 @@ KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
4242
GCOV_PROFILE := n
4343
UBSAN_SANITIZE :=n
4444

45-
LDFLAGS := -m elf_$(UTS_MACHINE)
45+
override LDFLAGS := -m elf_$(UTS_MACHINE)
4646
# Compressed kernel should be built as PIE since it may be loaded at any
4747
# address by the bootloader.
4848
ifeq ($(CONFIG_X86_32),y)
49-
LDFLAGS += $(call ld-option, -pie) $(call ld-option, --no-dynamic-linker)
49+
override LDFLAGS += $(call ld-option, -pie) $(call ld-option, --no-dynamic-linker)
5050
else
5151
# To build 64-bit compressed kernel as PIE, we disable relocation
5252
# overflow check to avoid relocation overflow error with a new linker
5353
# command-line option, -z noreloc-overflow.
54-
LDFLAGS += $(shell $(LD) --help 2>&1 | grep -q "\-z noreloc-overflow" \
54+
override LDFLAGS += $(shell $(LD) --help 2>&1 | grep -q "\-z noreloc-overflow" \
5555
&& echo "-z noreloc-overflow -pie --no-dynamic-linker")
5656
endif
5757
LDFLAGS_vmlinux := -T

include/net/ipv6.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,8 @@ static inline bool ipv6_accept_ra(struct inet6_dev *idev)
373373
idev->cnf.accept_ra;
374374
}
375375

376-
#define IPV6_FRAG_HIGH_THRESH (4 * 1024*1024) /* 4194304 */
377-
#define IPV6_FRAG_LOW_THRESH (3 * 1024*1024) /* 3145728 */
376+
#define IPV6_FRAG_HIGH_THRESH (256 * 1024) /* 262144 */
377+
#define IPV6_FRAG_LOW_THRESH (192 * 1024) /* 196608 */
378378
#define IPV6_FRAG_TIMEOUT (60 * HZ) /* 60 seconds */
379379

380380
int __ipv6_addr_type(const struct in6_addr *addr);

net/ipv4/ip_fragment.c

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -788,22 +788,14 @@ static int __net_init ipv4_frags_init_net(struct net *net)
788788
{
789789
int res;
790790

791-
/* Fragment cache limits.
792-
*
793-
* The fragment memory accounting code, (tries to) account for
794-
* the real memory usage, by measuring both the size of frag
795-
* queue struct (inet_frag_queue (ipv4:ipq/ipv6:frag_queue))
796-
* and the SKB's truesize.
797-
*
798-
* A 64K fragment consumes 129736 bytes (44*2944)+200
799-
* (1500 truesize == 2944, sizeof(struct ipq) == 200)
800-
*
801-
* We will commit 4MB at one time. Should we cross that limit
802-
* we will prune down to 3MB, making room for approx 8 big 64K
803-
* fragments 8x128k.
791+
/*
792+
* Fragment cache limits. We will commit 256K at one time. Should we
793+
* cross that limit we will prune down to 192K. This should cope with
794+
* even the most extreme cases without allowing an attacker to
795+
* measurably harm machine performance.
804796
*/
805-
net->ipv4.frags.high_thresh = 4 * 1024 * 1024;
806-
net->ipv4.frags.low_thresh = 3 * 1024 * 1024;
797+
net->ipv4.frags.high_thresh = 256 * 1024;
798+
net->ipv4.frags.low_thresh = 192 * 1024;
807799
/*
808800
* Important NOTE! Fragment queue must be destroyed before MSL expires.
809801
* RFC791 is wrong proposing to prolongate timer each fragment arrival

tools/lib/subcmd/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ ifneq ($(WERROR),0)
3333
CFLAGS += -Werror
3434
endif
3535

36+
# Don't fail on fallthrough with newer GCCs.
37+
CFLAGS += -Wno-error=implicit-fallthrough
38+
3639
CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
3740

3841
CFLAGS += -I$(srctree)/tools/include/

0 commit comments

Comments
 (0)