Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1929402lql; Wed, 13 Mar 2024 12:08:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXECYvSaSnrm7fgEqBS746gGmi/p+DG9WG1HKAZGsxZs1vlPlJNQEA/X936rT3xFcBj7u/rtI8M/WcqwSqjYWUBH1l7CCNLIO9zhZirzg== X-Google-Smtp-Source: AGHT+IEiCU3NmWyzNTgyJojRtUhtjlfSpQu+y2JxwaFZTU/5lH3pdzcqWHunBzwwf5mDdNeEO7n3 X-Received: by 2002:a50:9b17:0:b0:563:c54e:f1 with SMTP id o23-20020a509b17000000b00563c54e00f1mr9585168edi.2.1710356890563; Wed, 13 Mar 2024 12:08:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710356890; cv=pass; d=google.com; s=arc-20160816; b=r2tDJIfKF3eAKuQmGZOFrYEHJSgb5K8Ov5LuBw5/vK4ncYyLrtpzA6DwK3+DiSLZaf sojB9+hZU3VEbwTOnCoVlIt8LzaZy2fm1qR/Rc7zO3MNS9MLuU2TN0D/366CmwsEOlnC Z8nRTPejvX2bBZif/xx2L9ueCw8gyzUpgIC30g3thSuN/3h0xJJOAY4ooIry6m/rl9TO g1Papn1nwdJwG9uhx/j+i+Hp+pXk0Ogc4kQ4XDu8DlpGQw+k4cAIUNaYid5MEI0g0P+Q bjKNKjRtyBgVJrz5FQI4srqFQXW90r0jMExU1mX6H8hwk2ZHTGMY8xb33TOtNI6oYN2t lAew== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=NwvnBQtlcUyRAyfwaWKEGU4GgQpA6zLF0Jl2IAoI3iM=; fh=Omygkfiqy6HW2i0azbZRCmYkBT29NfFscqwQKqPi03k=; b=dPc/qIDhLLyjeNgwiHLPo+z0F09qOPjRce5DnPR/iFi525Iy9gXDMe97iS0F1lvys5 Uv+tP8PRKNwCvPo8ckRtwef9DrflimgCvLzA7MznHyTnFCJrPMXP2SM20JUwGZrI3866 piTYWgQZQ/0+veL0+8HXedvwPCsNVxQv2/myM4ArgeDoxKjK3AIyDIacqg7nv5D1Q0PI XJAoRtzey3iEaTuBB05gVTGKBn7k5gRZEeZmsqV5jOiwJrXkY1+DCeMIbGvk5cz9DUw3 Bt16EQZOGy5JFCYtnZGGXk2HzdvkJ7Mdi24Yb97FUE3wfcqewdP3ISpWsdLzKS1RyV1m TvDA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=1ZmY8SJs; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-102351-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102351-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id p14-20020a05640243ce00b00568793a46b7si1631063edc.143.2024.03.13.12.08.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 12:08:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-102351-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=1ZmY8SJs; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-102351-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102351-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 7B8801F28869 for ; Wed, 13 Mar 2024 19:07:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DFF9760ED3; Wed, 13 Mar 2024 18:20:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="1ZmY8SJs" Received: from mail-vk1-f179.google.com (mail-vk1-f179.google.com [209.85.221.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A2AE6F506 for ; Wed, 13 Mar 2024 18:20:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710354005; cv=none; b=EluPEqlaBv8cnnoxSwTO9vq/CSLJbxwCFAAsu5USeYZfbNHZsQ+qRNTXKD1pDMPJcLO214DphqXjY6aUuOJ2dkCmMSO18DBLXPEYtjQSKHdaTS79ogqmfGisEURqmad1zzZTIcrlSpUBzTSXdHidLL89cxNT+6401odB1yeOHJ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710354005; c=relaxed/simple; bh=L0TUJUEe3F3S4BPPtNOK8X+sljmeLdwYmEqhwB1kg0E=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=aeY4ue+muf9qKGgdu7AzMLKe3onKjQLKP1uGCzLCrGdNCHUpiPo5JL0W8M0jmBlGcLDd/rLT+RkOHCk0g066XwyCEOXChadMN/1bAQVObf+558yzFM3oBE0NRn2a9IuJLbXvB9Vpw8miobSIIeJVybl83CQk7v0dHYI3/Zo2Ny4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=1ZmY8SJs; arc=none smtp.client-ip=209.85.221.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-vk1-f179.google.com with SMTP id 71dfb90a1353d-4d3634a8015so18524e0c.1 for ; Wed, 13 Mar 2024 11:20:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1710354002; x=1710958802; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=NwvnBQtlcUyRAyfwaWKEGU4GgQpA6zLF0Jl2IAoI3iM=; b=1ZmY8SJsSlw3bxJHMmmrKmIbgDEq6dfanv9pWRN/crzc0VD2LEXH6IejUMaYG3qJU5 byVKPfNX9HqJHPXkK2p/CHIR3JwLYNm9fNv/lkzE9X3b4cN21vAGCV4mZPSqtdvctpMb bHJBe1y3h3mv+itxwBmPzOTWBlKLoiRpHaxFwk6V5ZjRvpal9nb/LMIFDjw+/vZPnYIT snkXGVYLRPN3r84UNqfDqh9FAwsJGacIWF8XtVet9cV7P83/1VgxqFtIt00ABiXrU0zS Zm+xN/ONLXRhcv+blDEr8f6GsAHKVVfcLPNCPIXpILw00R7MjrFMINR0yoQHJVtPFo/Y h9aQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710354002; x=1710958802; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NwvnBQtlcUyRAyfwaWKEGU4GgQpA6zLF0Jl2IAoI3iM=; b=BcBwDSEfgkchxvEK+gVCFQWZUDRUOQohGb8s72bIc6I8QA4RK5iLPdZwkWVVPw6Sc/ qYcHRiCeeMS3qDAEcWQGDVQiOYoBflMKnIfzLl+22aIyUUf6ygZb1yo0mHB202hhhQog PE3CCBiOoEqIWSENJWGTAMXdKDa4xtPL/hpE9NUi8arRAzADMO1gyQ2tUlEdmCuyKvSG LKhU5ZSMqr4NIacuMW4QPJfmkbt5LQqhFsunTDt+CVlaT6gDTDoBU0jeJJlK/PeDdAg1 HOb5xCobBT1tc268XiNRG0OYjcGTz0AoTt57SfKrHOZGnQ3ceY5NGhGzz/pYM60EVe6t DH3A== X-Forwarded-Encrypted: i=1; AJvYcCU5VwmTpXF4DevGEMN4yVd1hdjbZtycyFitaGKF9Lz3mUV2Isy0eKRB/ZfKOdRqqkCbgY2A++EFQnfbVnVGpE3xkDYTgZpRwqyqOjiV X-Gm-Message-State: AOJu0Yxh24cMuRK4yAFcYuOV/QuyDeXVnhaShIeKbJ/i7rLGOUJPuqo0 9S4kh4Djlx2aU3xFPxWN8o/2BIwfp+3qTov09nHmzmomsNGp886HX3CEmjZULcVKwaJbkrvV8a9 EcZeK4NDa46VSzSbVH4tK2KSBWu2IhDvQ5sRc X-Received: by 2002:a05:6122:3d13:b0:4d4:5b5:5287 with SMTP id ga19-20020a0561223d1300b004d405b55287mr977068vkb.7.1710354002256; Wed, 13 Mar 2024 11:20:02 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240313181217.work.263-kees@kernel.org> In-Reply-To: <20240313181217.work.263-kees@kernel.org> From: Marco Elver Date: Wed, 13 Mar 2024 19:19:23 +0100 Message-ID: Subject: Re: [PATCH] ubsan: Disable signed integer overflow sanitizer on GCC < 8 To: Kees Cook Cc: kernel test robot , Andrey Konovalov , Andrey Ryabinin , kasan-dev@googlegroups.com, linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" On Wed, 13 Mar 2024 at 19:12, Kees Cook wrote: > > For opting functions out of sanitizer coverage, the "no_sanitize" > attribute is used, but in GCC this wasn't introduced until GCC 8. > Disable the sanitizer unless we're not using GCC, or it is GCC > version 8 or higher. > > Reported-by: kernel test robot > Closes: https://lore.kernel.org/oe-kbuild-all/202403110643.27JXEVCI-lkp@intel.com/ > Signed-off-by: Kees Cook Looks reasonable: Reviewed-by: Marco Elver Thanks, -- Marco > --- > Cc: Marco Elver > Cc: Andrey Konovalov > Cc: Andrey Ryabinin > Cc: kasan-dev@googlegroups.com > Cc: linux-hardening@vger.kernel.org > --- > lib/Kconfig.ubsan | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/lib/Kconfig.ubsan b/lib/Kconfig.ubsan > index 48a67058f84e..e81e1ac4a919 100644 > --- a/lib/Kconfig.ubsan > +++ b/lib/Kconfig.ubsan > @@ -119,6 +119,8 @@ config UBSAN_SIGNED_WRAP > bool "Perform checking for signed arithmetic wrap-around" > default UBSAN > depends on !COMPILE_TEST > + # The no_sanitize attribute was introduced in GCC with version 8. > + depends on !CC_IS_GCC || GCC_VERSION >= 80000 > depends on $(cc-option,-fsanitize=signed-integer-overflow) > help > This option enables -fsanitize=signed-integer-overflow which checks > -- > 2.34.1 > > -- > You received this message because you are subscribed to the Google Groups "kasan-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an email to kasan-dev+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/kasan-dev/20240313181217.work.263-kees%40kernel.org.