From patchwork Mon Aug 5 13:02:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 170542 Delivered-To: patch@linaro.org Received: by 2002:ac9:2daa:0:0:0:0:0 with SMTP id g42csp4158886oce; Mon, 5 Aug 2019 06:27:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqxo5dqBI8Nas6ngjiAUxeT73b7ZHi3YvH/NXJknSJw4BmD21A89TZqrD1m/pvTbmAeld+qE X-Received: by 2002:a17:90a:22c6:: with SMTP id s64mr18623265pjc.5.1565011652198; Mon, 05 Aug 2019 06:27:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565011652; cv=none; d=google.com; s=arc-20160816; b=UEGYvJdSD/ap55ERmzYKrRgWw9rBo2uumEhWfOusG0rjjMq9kT1cXIVJqggP+6JBja fhDqOi6rRDvnLUaETExCRq8dOlAVGNfCrrC+Gw97wVQnyBGK98nzSh4Rm3Pf1UjxpBVy hpFYqR/cQSQL9EdcF/oIAQLN/AHWNvLXrmFpGJPV78u818zV/BcXPVZ0X9Bt2DThcYoO 6t3N97bXJwV9FXvQSOJUjw309x4C3GU0xNbkqw4+EaAdJkYJTA2k9KXnbRyJiyXlHBem Q8zm2v5cIy3HH2JEz0FxOpLT2Qvcn4Nwisg0BSyh6jXIIJNhFvnaOOq37mo9jqFv20rs QyeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SSuyDlE4URHlQ+/syLBpvXmtFlPge9d9mrwJrssh5Wo=; b=vfXCMEaGagKjHvE3b1ZA+75tzOIk3W5oykpSSU7tnh87wGoGCZnfm5rABtCIGak4+a IoPXHkHRFQm4oyIWrLVlSwaAPCJaVrXp7PKihRPCbglCYpBr5f0Xk5DvFnfR2vPyzW4f M9OxQqpJaZU1m+w0CvfLYktccy/qxtehKrxeH63pH3L1h62kQcFXXmKgCiv6+KoXU0Xc 6KokWe8SgGnhKPYcrCtmXavzM8ap5toa1qW1J9RUZ7nKr+QJrEv1vK8xofIW+bpkmFPU fOMPLvId6or7txcm6INGNcCUtioHBL6mWHR11oUgH5+zxHd9JbxBdOKOvXuqf4qyl6M0 JrQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=npwbM9z+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p17si44533385plq.138.2019.08.05.06.27.31; Mon, 05 Aug 2019 06:27:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=npwbM9z+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730763AbfHENYo (ORCPT + 29 others); Mon, 5 Aug 2019 09:24:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:33178 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731055AbfHENYj (ORCPT ); Mon, 5 Aug 2019 09:24:39 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 82FE120651; Mon, 5 Aug 2019 13:24:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565011479; bh=yqDscHPa/fiMt6yGAlf9JVuAFonzA6QS9rUXGTVI+Uk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=npwbM9z+R2F3BYZkJGoVjwAYNWxxt8zxuVo0cMblXTdrfP2fXlP7tkaKnqVQE/B38 hnB6qgNlVKQsLthy2Mk0AS5JNgADubNrVRevQ8uZ9HhjzuJMyp0ELzU0v3t90N9q9u 5myvdssaBFZoLX0eWgB8mTMmfJYQU67DBDx4wuWM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masahiro Yamada , Nathan Chancellor , Nick Desaulniers Subject: [PATCH 5.2 076/131] kbuild: initialize CLANG_FLAGS correctly in the top Makefile Date: Mon, 5 Aug 2019 15:02:43 +0200 Message-Id: <20190805124956.848367443@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190805124951.453337465@linuxfoundation.org> References: <20190805124951.453337465@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Masahiro Yamada commit 5241ab4cf42d3a93b933b55d3d53f43049081fa1 upstream. CLANG_FLAGS is initialized by the following line: CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE:%-=%)) ..., which is run only when CROSS_COMPILE is set. Some build targets (bindeb-pkg etc.) recurse to the top Makefile. When you build the kernel with Clang but without CROSS_COMPILE, the same compiler flags such as -no-integrated-as are accumulated into CLANG_FLAGS. If you run 'make CC=clang' and then 'make CC=clang bindeb-pkg', Kbuild will recompile everything needlessly due to the build command change. Fix this by correctly initializing CLANG_FLAGS. Fixes: 238bcbc4e07f ("kbuild: consolidate Clang compiler flags") Cc: # v5.0+ Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor Acked-by: Nick Desaulniers Signed-off-by: Greg Kroah-Hartman --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/Makefile +++ b/Makefile @@ -467,6 +467,7 @@ KBUILD_CFLAGS_MODULE := -DMODULE KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds KBUILD_LDFLAGS := GCC_PLUGINS_CFLAGS := +CLANG_FLAGS := export ARCH SRCARCH CONFIG_SHELL HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC export CPP AR NM STRIP OBJCOPY OBJDUMP PAHOLE KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS @@ -519,7 +520,7 @@ endif ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),) ifneq ($(CROSS_COMPILE),) -CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE:%-=%)) +CLANG_FLAGS += --target=$(notdir $(CROSS_COMPILE:%-=%)) GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit)) CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR) GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..) From patchwork Mon Aug 5 13:02:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 170540 Delivered-To: patch@linaro.org Received: by 2002:ac9:2daa:0:0:0:0:0 with SMTP id g42csp4156041oce; Mon, 5 Aug 2019 06:24:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqzF1oa2hmmzTZJFVF1bX4BGY/h9uQwvMsUVzteWK7AJYaaRXRKCDhUOHdo8F75F1qVgMwgL X-Received: by 2002:a65:64cf:: with SMTP id t15mr132508781pgv.88.1565011488350; Mon, 05 Aug 2019 06:24:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565011488; cv=none; d=google.com; s=arc-20160816; b=PkiWI6Eir19M9l7H4w/UCKz5s/LlA7Gg8DbCzbFUd8aDXO6wCi4uQAt3O1sNuDN7BB ea6GECCSfYM45TgystTdu8AWJVga8rQvjf5sGNhMIND8ktI2vbWVWVaDhpBcTerDuh38 6xU/CffznlAZjIwA7HX0xP2+fS9huMUsYCORAugMEegPMJk1qNPbWZyBoV0N8ankjJr7 nhKx5vEAHH9EL0BvsRVq8ZkmWXBUZ1ZDsh0WQpJpj0YkkO9EOALe1oZOT5lytW9adDlz Q6YXqPRxDHJFuj7WkiaMqkQ1C0j0NPDRYzgSBY+k4JoiUj+ihBEAHuWTQwq/n1CX2fCe 6wQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MzHeWpXSAanHppALLE5qlVSDJMnWMe0ILaa4kPO+/Fg=; b=zftXpkN0lhWmC7eAJ/qiOwV/b6FhGSykkYI6e2Ug8ll2xChdB/v3fTpL1a0iGywUXO Q2/wHVdum3pSRkW8UZjTljulf27P2OcPyjl42l+S8BxbwBM5jvzGkaXRM3Dqrb6iJ+E2 2mqjVgHs8oTixzOWZSbfn8d4eFticgM1D4PtAockkRmu9bH2mlAO5x/Rp3aougb2qjd0 tZm/ObILvK+XZ6OnqPOPQaRfMxT3woUmdxgNnYNT2Um7PEbI2pEzBn4jigB6JAyqmSnQ HcbIcEbpPBJOYBjZfujFIVUNbHWnrH7sAlkKb50z/i3MQPthacfScZEwPzwaQgb9XVtn HNCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GNwHLwoj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l102si12325487pje.78.2019.08.05.06.24.48; Mon, 05 Aug 2019 06:24:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GNwHLwoj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731078AbfHENYq (ORCPT + 29 others); Mon, 5 Aug 2019 09:24:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:33230 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731062AbfHENYm (ORCPT ); Mon, 5 Aug 2019 09:24:42 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2C50720644; Mon, 5 Aug 2019 13:24:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565011481; bh=AuWFkT9W+50KDlr1VVDi4qrZYNDIOBbFQEldeM0PpMg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GNwHLwojgd6+e3FcF+UHZFXpcKxloDMmzVC2oZAiksPw8zLkLasGeXt/tr/2YgA2M VngJCGnppFu0T8wpK6Yn0MAxAN1I99kXttZjI93bBjrmFfk+JPATWtQOn7qsnxIXD+ QrYCbwQVuKtb33TTHzW6HNztKQGSrubfi7JgUl7Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masahiro Yamada Subject: [PATCH 5.2 077/131] kbuild: modpost: include .*.cmd files only when targets exist Date: Mon, 5 Aug 2019 15:02:44 +0200 Message-Id: <20190805124956.954506004@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190805124951.453337465@linuxfoundation.org> References: <20190805124951.453337465@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Masahiro Yamada commit 944cfe9be1fbbec73bab2f7e77fe2e8f9c72970f upstream. If a build rule fails, the .DELETE_ON_ERROR special target removes the target, but does nothing for the .*.cmd file, which might be corrupted. So, .*.cmd files should be included only when the corresponding targets exist. Commit 392885ee82d3 ("kbuild: let fixdep directly write to .*.cmd files") missed to fix up this file. Fixes: 392885ee82d3 ("kbuild: let fixdep directly write to .*.cmd") Cc: # v5.0+ Signed-off-by: Masahiro Yamada Signed-off-by: Greg Kroah-Hartman --- scripts/Makefile.modpost | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost @@ -142,10 +142,8 @@ FORCE: # optimization, we don't need to read them if the target does not # exist, we will rebuild anyway in that case. -cmd_files := $(wildcard $(foreach f,$(sort $(targets)),$(dir $(f)).$(notdir $(f)).cmd)) +existing-targets := $(wildcard $(sort $(targets))) -ifneq ($(cmd_files),) - include $(cmd_files) -endif +-include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd) .PHONY: $(PHONY) From patchwork Mon Aug 5 13:03:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 170541 Delivered-To: patch@linaro.org Received: by 2002:ac9:2daa:0:0:0:0:0 with SMTP id g42csp4157862oce; Mon, 5 Aug 2019 06:26:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzOVysr/qJvCqYUbWStfPZB0hSfGwTAB4uakfRICl4ohXLlS9rco8uIJRQj+EZY7zjTf0CZ X-Received: by 2002:a63:ff20:: with SMTP id k32mr136889286pgi.445.1565011590263; Mon, 05 Aug 2019 06:26:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565011590; cv=none; d=google.com; s=arc-20160816; b=iXfajnuRI6rq6sH3y016RupYjEyMXm0Y76hQ0G5hI94JttjUzc/oTDUDa4B0c+LfUb bcTYntCVpplNLqlnwdVDE84NAS9kifr8NT+rmDdYiAsfZl8F0oR1wTLWG2XY2m8dG9xt V8uiMQEEv4fjyP0fCvUadP9xWt4cfhHdu5Lx7RXYiqTCvASKS421XB9JQ7ZAsXVFUNQr A3lGt6N8EcQML9/TRXR51iPHEzHY9gaZ3ho6RFIe9Y4aZ8O++bmYU5xgXkOMFKdrtvF0 ifiESQyEKSArWBffYKc1xX2GlIxb0sxN6NTLLW/YEgXIO02gYWvCyLPF8OMI5+1ImY0A 9kfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vb4chBgUHTvtJQ+Wcg0s6t0bW85VBo6vmvig217Jpu4=; b=UKZCXqHJSsSe5f+oIf8zixP4etZl5cdEEMrEZbgrNdlI5Dse/FX/G3qcbCGldOI6/1 fdSnkIrR6ShRdnTWQr32KxfhE5iuL54XeUwjJAE0NsUrza3VqnQPzu5n9ZjiHvjF3I5F JMWIXuNsWAAfI9oajyGoAtp0nZKvP0OFshx54miP6OElMrl9xDknqWa8I1/ULNz/o3S3 +2hLuz0UgSCr4e4gQhRzix1GbVsRzIP7O5bhEM1F/DDXKhmuvWJLKYN/4MhMASD15j5M 1rrj3n580S3GECJA2r1sBQ9V4Rbt/csWRCLjNoLiy/XcjDa8MOQoacPPh1PEB0UJmMhk a1XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tOMGCRdv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t19si44572273pfe.94.2019.08.05.06.26.30; Mon, 05 Aug 2019 06:26:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tOMGCRdv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731153AbfHEN02 (ORCPT + 29 others); Mon, 5 Aug 2019 09:26:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:34786 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731412AbfHEN0N (ORCPT ); Mon, 5 Aug 2019 09:26:13 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3232620644; Mon, 5 Aug 2019 13:26:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565011572; bh=g/aiK7KHlJwpW7n5tGJSO+VFCcemY6f1VKZdH/9n0VQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tOMGCRdv8xYsmAPsJZdmk/DEHF//yMGrOLwKavtPMUad+ih6KAql+fM2j8RbCQysx yV/6pal4hKOi+i537aY61hqabHQ39Ta4/Vf7le5NRDdo2cJ2ssZskJgvr3U5ZWFlEw IQBFmrV4G4y7qL9GlP1E7n96drd7g5T+E+jmH/gE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Andrey Ryabinin , Josh Poimboeuf , Peter Zijlstra , Borislav Petkov , Dmitry Vyukov , Thomas Gleixner , Ingo Molnar , Kees Cook , Matthew Wilcox , Ard Biesheuvel , Andy Shevchenko , Andrew Morton , Linus Torvalds Subject: [PATCH 5.2 103/131] ubsan: build ubsan.c more conservatively Date: Mon, 5 Aug 2019 15:03:10 +0200 Message-Id: <20190805124958.858669410@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190805124951.453337465@linuxfoundation.org> References: <20190805124951.453337465@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann commit af700eaed0564d5d3963a7a51cb0843629d7fe3d upstream. objtool points out several conditions that it does not like, depending on the combination with other configuration options and compiler variants: stack protector: lib/ubsan.o: warning: objtool: __ubsan_handle_type_mismatch()+0xbf: call to __stack_chk_fail() with UACCESS enabled lib/ubsan.o: warning: objtool: __ubsan_handle_type_mismatch_v1()+0xbe: call to __stack_chk_fail() with UACCESS enabled stackleak plugin: lib/ubsan.o: warning: objtool: __ubsan_handle_type_mismatch()+0x4a: call to stackleak_track_stack() with UACCESS enabled lib/ubsan.o: warning: objtool: __ubsan_handle_type_mismatch_v1()+0x4a: call to stackleak_track_stack() with UACCESS enabled kasan: lib/ubsan.o: warning: objtool: __ubsan_handle_type_mismatch()+0x25: call to memcpy() with UACCESS enabled lib/ubsan.o: warning: objtool: __ubsan_handle_type_mismatch_v1()+0x25: call to memcpy() with UACCESS enabled The stackleak and kasan options just need to be disabled for this file as we do for other files already. For the stack protector, we already attempt to disable it, but this fails on clang because the check is mixed with the gcc specific -fno-conserve-stack option. According to Andrey Ryabinin, that option is not even needed, dropping it here fixes the stackprotector issue. Link: http://lkml.kernel.org/r/20190722125139.1335385-1-arnd@arndb.de Link: https://lore.kernel.org/lkml/20190617123109.667090-1-arnd@arndb.de/t/ Link: https://lore.kernel.org/lkml/20190722091050.2188664-1-arnd@arndb.de/t/ Fixes: d08965a27e84 ("x86/uaccess, ubsan: Fix UBSAN vs. SMAP") Signed-off-by: Arnd Bergmann Reviewed-by: Andrey Ryabinin Cc: Josh Poimboeuf Cc: Peter Zijlstra Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Dmitry Vyukov Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Kees Cook Cc: Matthew Wilcox Cc: Ard Biesheuvel Cc: Andy Shevchenko Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- lib/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/lib/Makefile +++ b/lib/Makefile @@ -278,7 +278,8 @@ obj-$(CONFIG_UCS2_STRING) += ucs2_string obj-$(CONFIG_UBSAN) += ubsan.o UBSAN_SANITIZE_ubsan.o := n -CFLAGS_ubsan.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) +KASAN_SANITIZE_ubsan.o := n +CFLAGS_ubsan.o := $(call cc-option, -fno-stack-protector) $(DISABLE_STACKLEAK_PLUGIN) obj-$(CONFIG_SBITMAP) += sbitmap.o