From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A05EC433DB for ; Wed, 13 Jan 2021 01:41:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CA78A2251F for ; Wed, 13 Jan 2021 01:41:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727385AbhAMBkv (ORCPT ); Tue, 12 Jan 2021 20:40:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726382AbhAMBku (ORCPT ); Tue, 12 Jan 2021 20:40:50 -0500 Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 590A3C061575 for ; Tue, 12 Jan 2021 17:40:10 -0800 (PST) Received: by mail-pg1-x531.google.com with SMTP id c22so417492pgg.13 for ; Tue, 12 Jan 2021 17:40:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=I0c6HHoktXki3GZbMqs3WroLaVoqrCxFNA0EKtNCuyI=; b=bmfJtT5Ab3iuEMPkkGQIC6QXCxOJRTnNRr15T3O0NkEyhaOqKve4fLbPntIVv6Y9f9 NWRIQH6dswLJYLp6XA7ztbbGjZhcUgdS/OOhHo2zpVJroaWxcnqcU2YEwX75RnPO1/ii k2pQLuOXd+yjpPP6EnndoEhHu39lgQE0AtjrYXpZvJkR7CJO+bN06vHoRTtqd68wN/qk LN+8w3ZdRLcLaYWvwqhODiNZmlVmaMgczsMsUF2WT17oK5jb2Nv00cn+fDStkxdCTK1a kLqfYGvizIgy+Dg55HlIYMPBdc1mDflB68VMAtZ3GBTlE+Pi51t6U8rCKkEqCIhoTL2Y 4fhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=I0c6HHoktXki3GZbMqs3WroLaVoqrCxFNA0EKtNCuyI=; b=HMjqv1H0iKNSEgvBX8Mwgz1C5gnJMtYsbIHce70k/RSpIXK2WvSkdJbyanvyoCTFji IiUn4fXj7JJHFjmMJGupB3RpYdFAMjSmSeADxQYTfXyZiWCIjDbFEr2eEKa6Jh9V/Gjg 6NvSHplvdUm1eq4gGjmfhkrhgrRonFkJQkWqzRF8xJDkRI19+CIR4haJ9zZD6mP0EPN8 7B5CZHtF+tgY/SoUFZq6g/vX0tTM+wN/7YqyTSD/BSnjXyvuzW/g3TIUZTTS18pJ0VtN V7oY8yu0SQ8ArGyVTGkeBaasZhxFytMiarEN/3t3REw2VOSsqspOOJ05KTm/yNySkMP9 1PqA== X-Gm-Message-State: AOAM530ZAaFBjCI1Vd9EHnfHJPsUc6Ho+7w53eGqMWTqRWH1qYMIQBAM uWXhVzZpIJTlTUBhC6Dz5yZVGoZ0x62nVaxnqY22SQ== X-Google-Smtp-Source: ABdhPJyw6Mz+MPpx9tD2Z77Xsr6+ygudw61mE7415SNo1Ix7CMwzPxpla3/gtO13mI9AMuHLfPL8nqGo/ir2++CbxhI= X-Received: by 2002:a63:1142:: with SMTP id 2mr1905914pgr.263.1610502009086; Tue, 12 Jan 2021 17:40:09 -0800 (PST) MIME-Version: 1.0 References: <20210112205542.1375847-1-natechancellor@gmail.com> <202101130859.JSORPQUn-lkp@intel.com> <20210113013130.GA3446359@ubuntu-m3-large-x86> In-Reply-To: <20210113013130.GA3446359@ubuntu-m3-large-x86> From: Nick Desaulniers Date: Tue, 12 Jan 2021 17:39:57 -0800 Message-ID: Subject: Re: [PATCH] ubsan: Implement __ubsan_handle_alignment_assumption To: Nathan Chancellor Cc: kernel test robot , Kees Cook , Andrew Morton , kbuild-all@lists.01.org, clang-built-linux , Linux Memory Management List , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 12, 2021 at 5:31 PM Nathan Chancellor wrote: > > On Wed, Jan 13, 2021 at 08:39:52AM +0800, kernel test robot wrote: > > Hi Nathan, > > > > I love your patch! Perhaps something to improve: > > > > [auto build test WARNING on 7c53f6b671f4aba70ff15e1b05148b10d58c2837] > > > > url: https://github.com/0day-ci/linux/commits/Nathan-Chancellor/ubsan-Implement-__ubsan_handle_alignment_assumption/20210113-055714 > > base: 7c53f6b671f4aba70ff15e1b05148b10d58c2837 > > config: arm64-randconfig-r031-20210112 (attached as .config) > > compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 32bcfcda4e28375e5a85268d2acfabcfcc011abf) > > reproduce (this is a W=1 build): > > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > > chmod +x ~/bin/make.cross > > # install arm64 cross compiling tool for clang build > > # apt-get install binutils-aarch64-linux-gnu > > # https://github.com/0day-ci/linux/commit/775adad26a60878926c0ee6cd460a1375bbe51e6 > > git remote add linux-review https://github.com/0day-ci/linux > > git fetch --no-tags linux-review Nathan-Chancellor/ubsan-Implement-__ubsan_handle_alignment_assumption/20210113-055714 > > git checkout 775adad26a60878926c0ee6cd460a1375bbe51e6 > > # save the attached .config to linux build tree > > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 > > > > If you fix the issue, kindly add following tag as appropriate > > Reported-by: kernel test robot > > > > All warnings (new ones prefixed by >>): > > > > lib/ubsan.c:192:6: warning: no previous prototype for function '__ubsan_handle_add_overflow' [-Wmissing-prototypes] > > void __ubsan_handle_add_overflow(void *data, > > ^ > > lib/ubsan.c:192:1: note: declare 'static' if the function is not intended to be used outside of this translation unit > > void __ubsan_handle_add_overflow(void *data, > > ^ > > static > > lib/ubsan.c:200:6: warning: no previous prototype for function '__ubsan_handle_sub_overflow' [-Wmissing-prototypes] > > void __ubsan_handle_sub_overflow(void *data, > > ^ > > lib/ubsan.c:200:1: note: declare 'static' if the function is not intended to be used outside of this translation unit > > void __ubsan_handle_sub_overflow(void *data, > > ^ > > Given that these are compiler inserted functions, there is not much of a > point to having prototypes to them. If people feel shutting these > warnings up is worthwhile, we can just add the prototypes right above > the function definition in a follow up patch. Same as stpcpy; it would be nice though. ;) -- Thanks, ~Nick Desaulniers From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C07EC433E0 for ; Wed, 13 Jan 2021 01:40:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DBDC622B37 for ; Wed, 13 Jan 2021 01:40:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DBDC622B37 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 413CD6B0104; Tue, 12 Jan 2021 20:40:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3C3318D0008; Tue, 12 Jan 2021 20:40:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2D99E8D0007; Tue, 12 Jan 2021 20:40:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0160.hostedemail.com [216.40.44.160]) by kanga.kvack.org (Postfix) with ESMTP id 177876B0104 for ; Tue, 12 Jan 2021 20:40:11 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id D1864362C for ; Wed, 13 Jan 2021 01:40:10 +0000 (UTC) X-FDA: 77699046180.14.rail21_530ff112751a Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id B632518229835 for ; Wed, 13 Jan 2021 01:40:10 +0000 (UTC) X-HE-Tag: rail21_530ff112751a X-Filterd-Recvd-Size: 5729 Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) by imf36.hostedemail.com (Postfix) with ESMTP for ; Wed, 13 Jan 2021 01:40:10 +0000 (UTC) Received: by mail-pg1-f171.google.com with SMTP id n10so432247pgl.10 for ; Tue, 12 Jan 2021 17:40:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=I0c6HHoktXki3GZbMqs3WroLaVoqrCxFNA0EKtNCuyI=; b=bmfJtT5Ab3iuEMPkkGQIC6QXCxOJRTnNRr15T3O0NkEyhaOqKve4fLbPntIVv6Y9f9 NWRIQH6dswLJYLp6XA7ztbbGjZhcUgdS/OOhHo2zpVJroaWxcnqcU2YEwX75RnPO1/ii k2pQLuOXd+yjpPP6EnndoEhHu39lgQE0AtjrYXpZvJkR7CJO+bN06vHoRTtqd68wN/qk LN+8w3ZdRLcLaYWvwqhODiNZmlVmaMgczsMsUF2WT17oK5jb2Nv00cn+fDStkxdCTK1a kLqfYGvizIgy+Dg55HlIYMPBdc1mDflB68VMAtZ3GBTlE+Pi51t6U8rCKkEqCIhoTL2Y 4fhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=I0c6HHoktXki3GZbMqs3WroLaVoqrCxFNA0EKtNCuyI=; b=p65tGBq4ReTyC22MWA+hWif2g5A8H+CpVKSOKXHZcY9NTZW7NfvZEgw8imj8/Gv7U5 s+SHEew8Lm5/5LPrp6gSMl28dk0OfyBEYOnX33+0zeLq87qYjJ8Q1quJb6Q7ywHiaYZo 3n+IKb+zp6rY17IcDngF/s6yM/K0OzEzCi3IGXTpQUaCBV0MdYz3s4+YZYNjBrgMaBK1 7P6FFd3/jt6HrQNHbMU++Cih1jRQwRtmklPn+vz3ihgmpHE+iOD8FlXJubBhHhxAKQTm IX2k/Td11KkwejY7iCzhSzWjNk0OReriMIs0Eb8uoy3H29zp+SLwy6oc8bLwnyxxD/8M llxw== X-Gm-Message-State: AOAM5327HV4lO6YpnTbi7VdcSN0VggH0zj3kXhlboG7/Bi6ymynL8hRb YkZyR746o7tOAScS87P5V+HEyXhfFsFMexgXgqZyaA== X-Google-Smtp-Source: ABdhPJyw6Mz+MPpx9tD2Z77Xsr6+ygudw61mE7415SNo1Ix7CMwzPxpla3/gtO13mI9AMuHLfPL8nqGo/ir2++CbxhI= X-Received: by 2002:a63:1142:: with SMTP id 2mr1905914pgr.263.1610502009086; Tue, 12 Jan 2021 17:40:09 -0800 (PST) MIME-Version: 1.0 References: <20210112205542.1375847-1-natechancellor@gmail.com> <202101130859.JSORPQUn-lkp@intel.com> <20210113013130.GA3446359@ubuntu-m3-large-x86> In-Reply-To: <20210113013130.GA3446359@ubuntu-m3-large-x86> From: Nick Desaulniers Date: Tue, 12 Jan 2021 17:39:57 -0800 Message-ID: Subject: Re: [PATCH] ubsan: Implement __ubsan_handle_alignment_assumption To: Nathan Chancellor Cc: kernel test robot , Kees Cook , Andrew Morton , kbuild-all@lists.01.org, clang-built-linux , Linux Memory Management List , LKML Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Jan 12, 2021 at 5:31 PM Nathan Chancellor wrote: > > On Wed, Jan 13, 2021 at 08:39:52AM +0800, kernel test robot wrote: > > Hi Nathan, > > > > I love your patch! Perhaps something to improve: > > > > [auto build test WARNING on 7c53f6b671f4aba70ff15e1b05148b10d58c2837] > > > > url: https://github.com/0day-ci/linux/commits/Nathan-Chancellor/ubsan-Implement-__ubsan_handle_alignment_assumption/20210113-055714 > > base: 7c53f6b671f4aba70ff15e1b05148b10d58c2837 > > config: arm64-randconfig-r031-20210112 (attached as .config) > > compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 32bcfcda4e28375e5a85268d2acfabcfcc011abf) > > reproduce (this is a W=1 build): > > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > > chmod +x ~/bin/make.cross > > # install arm64 cross compiling tool for clang build > > # apt-get install binutils-aarch64-linux-gnu > > # https://github.com/0day-ci/linux/commit/775adad26a60878926c0ee6cd460a1375bbe51e6 > > git remote add linux-review https://github.com/0day-ci/linux > > git fetch --no-tags linux-review Nathan-Chancellor/ubsan-Implement-__ubsan_handle_alignment_assumption/20210113-055714 > > git checkout 775adad26a60878926c0ee6cd460a1375bbe51e6 > > # save the attached .config to linux build tree > > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 > > > > If you fix the issue, kindly add following tag as appropriate > > Reported-by: kernel test robot > > > > All warnings (new ones prefixed by >>): > > > > lib/ubsan.c:192:6: warning: no previous prototype for function '__ubsan_handle_add_overflow' [-Wmissing-prototypes] > > void __ubsan_handle_add_overflow(void *data, > > ^ > > lib/ubsan.c:192:1: note: declare 'static' if the function is not intended to be used outside of this translation unit > > void __ubsan_handle_add_overflow(void *data, > > ^ > > static > > lib/ubsan.c:200:6: warning: no previous prototype for function '__ubsan_handle_sub_overflow' [-Wmissing-prototypes] > > void __ubsan_handle_sub_overflow(void *data, > > ^ > > lib/ubsan.c:200:1: note: declare 'static' if the function is not intended to be used outside of this translation unit > > void __ubsan_handle_sub_overflow(void *data, > > ^ > > Given that these are compiler inserted functions, there is not much of a > point to having prototypes to them. If people feel shutting these > warnings up is worthwhile, we can just add the prototypes right above > the function definition in a follow up patch. Same as stpcpy; it would be nice though. ;) -- Thanks, ~Nick Desaulniers From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============3023859408015309214==" MIME-Version: 1.0 From: Nick Desaulniers To: kbuild-all@lists.01.org Subject: Re: [PATCH] ubsan: Implement __ubsan_handle_alignment_assumption Date: Tue, 12 Jan 2021 17:39:57 -0800 Message-ID: In-Reply-To: <20210113013130.GA3446359@ubuntu-m3-large-x86> List-Id: --===============3023859408015309214== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Tue, Jan 12, 2021 at 5:31 PM Nathan Chancellor wrote: > > On Wed, Jan 13, 2021 at 08:39:52AM +0800, kernel test robot wrote: > > Hi Nathan, > > > > I love your patch! Perhaps something to improve: > > > > [auto build test WARNING on 7c53f6b671f4aba70ff15e1b05148b10d58c2837] > > > > url: https://github.com/0day-ci/linux/commits/Nathan-Chancellor/ubsa= n-Implement-__ubsan_handle_alignment_assumption/20210113-055714 > > base: 7c53f6b671f4aba70ff15e1b05148b10d58c2837 > > config: arm64-randconfig-r031-20210112 (attached as .config) > > compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 32= bcfcda4e28375e5a85268d2acfabcfcc011abf) > > reproduce (this is a W=3D1 build): > > wget https://raw.githubusercontent.com/intel/lkp-tests/master/s= bin/make.cross -O ~/bin/make.cross > > chmod +x ~/bin/make.cross > > # install arm64 cross compiling tool for clang build > > # apt-get install binutils-aarch64-linux-gnu > > # https://github.com/0day-ci/linux/commit/775adad26a60878926c0e= e6cd460a1375bbe51e6 > > git remote add linux-review https://github.com/0day-ci/linux > > git fetch --no-tags linux-review Nathan-Chancellor/ubsan-Implem= ent-__ubsan_handle_alignment_assumption/20210113-055714 > > git checkout 775adad26a60878926c0ee6cd460a1375bbe51e6 > > # save the attached .config to linux build tree > > COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dclang make.cross = ARCH=3Darm64 > > > > If you fix the issue, kindly add following tag as appropriate > > Reported-by: kernel test robot > > > > All warnings (new ones prefixed by >>): > > > > lib/ubsan.c:192:6: warning: no previous prototype for function '__ub= san_handle_add_overflow' [-Wmissing-prototypes] > > void __ubsan_handle_add_overflow(void *data, > > ^ > > lib/ubsan.c:192:1: note: declare 'static' if the function is not int= ended to be used outside of this translation unit > > void __ubsan_handle_add_overflow(void *data, > > ^ > > static > > lib/ubsan.c:200:6: warning: no previous prototype for function '__ub= san_handle_sub_overflow' [-Wmissing-prototypes] > > void __ubsan_handle_sub_overflow(void *data, > > ^ > > lib/ubsan.c:200:1: note: declare 'static' if the function is not int= ended to be used outside of this translation unit > > void __ubsan_handle_sub_overflow(void *data, > > ^ > > Given that these are compiler inserted functions, there is not much of a > point to having prototypes to them. If people feel shutting these > warnings up is worthwhile, we can just add the prototypes right above > the function definition in a follow up patch. Same as stpcpy; it would be nice though. ;) -- = Thanks, ~Nick Desaulniers --===============3023859408015309214==--