From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754597AbdJJHGS (ORCPT ); Tue, 10 Oct 2017 03:06:18 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:47394 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750950AbdJJHGR (ORCPT ); Tue, 10 Oct 2017 03:06:17 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org D0C6160584 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=psodagud@codeaurora.org From: Prasad Sodagudi To: aryabinin@virtuozzo.com, nicolas.iooss_linux@m4x.org, akpm@linux-foundation.org, mingo@kernel.org Cc: linux-kernel@vger.kernel.org, psodagud@codeaurora.org Subject: [PATCH] UBSAN: Add __ubsan_handle_type_mismatch_v1 handler Date: Tue, 10 Oct 2017 00:06:03 -0700 Message-Id: <1507619163-22943-1-git-send-email-psodagud@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <4ee8e077-feb4-c2ff-5eca-ef06012d34b3@virtuozzo.com> References: <4ee8e077-feb4-c2ff-5eca-ef06012d34b3@virtuozzo.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In LLVM __ubsan_handle_type_mismatch handler is renamed to __ubsan_handle_type_mismatch_v1. Add support for __ubsan_handle_type_mismatch_v1 handler to avoid compilation issues with latest llvm tool chain. Also keeping __ubsan_handle_type_mismatch handler for backward compatibility. Signed-off-by: Prasad Sodagudi --- lib/ubsan.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/ubsan.c b/lib/ubsan.c index fb0409d..9baf17d 100644 --- a/lib/ubsan.c +++ b/lib/ubsan.c @@ -328,6 +328,14 @@ void __ubsan_handle_type_mismatch(struct type_mismatch_data *data, } EXPORT_SYMBOL(__ubsan_handle_type_mismatch); +void __ubsan_handle_type_mismatch_v1(struct type_mismatch_data *data, + unsigned long ptr) +{ + __ubsan_handle_type_mismatch(data, ptr); +} +EXPORT_SYMBOL(__ubsan_handle_type_mismatch_v1); + + void __ubsan_handle_nonnull_return(struct nonnull_return_data *data) { unsigned long flags; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project