From patchwork Fri Feb 23 16:59:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 205543 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp727260dyb; Fri, 23 Feb 2024 09:20:47 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXEgbXUpmaenUtKWsgpSqvBlh2jzHxCnZfXaryB3w03BmCFLCp/ZDwvz2mQnuUTMMt22EzBwcQq50miay33uJywPEJpzg== X-Google-Smtp-Source: AGHT+IESbBK0kWi3juYk4LqWc3o8KtWlojlPcHGd+tqppg4EOTybz2B35utatz6Fea08jKkZBgwx X-Received: by 2002:a05:6a00:6caa:b0:6e3:806f:1ef2 with SMTP id jc42-20020a056a006caa00b006e3806f1ef2mr473510pfb.25.1708708847205; Fri, 23 Feb 2024 09:20:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708708847; cv=pass; d=google.com; s=arc-20160816; b=LybH6KRuM2I8eog+WV9i4xO3EY1quKlux5FWEZ0jLPIPtxBZkFpWEyF/K/NBzFThBi JrXzgivx8ywlD/AXm9+hQlBDGiLEPSk8s6+tntTPlpEvLU/62bQWYxfBMBUsXPlqSokL pQhgIDQGCmfCWTM3L9cUfuxVsK0BRHu35C1ufqGqu2H1wD9kbCFYi+mmZe+D5OzKCHXu XWBdcDYZQu/Ys/O0g+cPJASaAk0+lJdnB5lzQ/9d8zEhha4wdQJkrwN6/fiVa4UpRdIc R0cYU+CpFPZ+hbzX6TK5bX6FnuTTYEMkwu1qtbLSl480RvhYXJENCa+9ASvyFVDZvX9v JhSw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=FDMzDk/lBMFwiZnh7jtuEycU3dW7wec2i4CrQjkGJo4=; fh=iBh9Lv2rDD3hvsUkGKgDnTxnYp74I9X0NBvs67ezjQ4=; b=WhQIKINmq3qYBvWTaK9wZvCfBMU4+uK+L1RwHDZq/Wrqkgt+mRqg6Ofp1P0QLFfv0O D8BfYuuULjxqjyGSwJirhM6+njAXTvybTv2zZUKebxyuG+bBRg1ujw+bq2a2OEZzVDYj d+Z7jizKnBwciw8gEV7FynudDRhQKPTB76bq6Ga0oDyMjhTaX+oglVbr81DKAa34CrlX 4SDRDeyEVZtqvswZ9dow3MQOc7QYgbEzYyfqAJEa/T8+vsSon/2V2HyzhufZVSmrS6kK mTfj65LfJ5jCDYfUxrqI6vALphpwZijWdvjSPuLALSuv1Gf9AGF/cjqoLcEufBqE1HXH E/YA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=nitAuW0n; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-78768-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78768-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id fd24-20020a056a002e9800b006e0949b2543si12930997pfb.342.2024.02.23.09.20.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 09:20:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78768-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=nitAuW0n; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-78768-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78768-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 70970B22277 for ; Fri, 23 Feb 2024 17:00:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E3F4012B168; Fri, 23 Feb 2024 16:59:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="nitAuW0n" Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.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 CBAB9128397 for ; Fri, 23 Feb 2024 16:59:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708707590; cv=none; b=j/L7fiD+j9CACOO5mFr1GyTdAyTHbs7XzMqcCh38ZDh17XfZVp0cbDAuJuSMx1Guid3mtbQMTsBU/zpYzZMIhSOqPQtpm0K1a94ErL8mRH51kzN8lkK9QukL1qz0MmyuAFSsdztjRYB4s5EQmVP0wfh0/KZsO7r6t3PPzsVT3sk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708707590; c=relaxed/simple; bh=GFnd+uRgcZ5JE6+yaYSUeEigjBZZ5ehiRJbCdQFjMSg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=ozekoIdvCTY2azSc2/ucZPKKWjmewyAOwP6c0RJ53waWnFutXRPQDkCiOLDFwaCSlFrKzI0IWHG2WQQEyj0eJbtpu3Sl2SFE6rNfnHB6ufIv9muiBoZPo8M9BtqfmFWD2l7Y7MY+hGpbxM+u0OAljmklIQvWisKF09T5xyJV4W4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=nitAuW0n; arc=none smtp.client-ip=209.85.210.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-6e4ca46ab04so363461b3a.3 for ; Fri, 23 Feb 2024 08:59:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1708707588; x=1709312388; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=FDMzDk/lBMFwiZnh7jtuEycU3dW7wec2i4CrQjkGJo4=; b=nitAuW0nEJXqcuwrvok8CkVkbfn2pnfOCTGqhqgni0qOUhvTAhltyrpkmRwSRrbh0B 98mW8FxQhTkRddbNuvjY1OlR4EehYdeL0eARCJG8gW0y3gsHiuUVmVyOiDl/jLh1TF5D j58bfHK882zi2L5G6JAhTPLzgzIjkBqHE0PuQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708707588; x=1709312388; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FDMzDk/lBMFwiZnh7jtuEycU3dW7wec2i4CrQjkGJo4=; b=evv99R0qFf5590B6m7HlF2L8yvJIqLPNzOphe7lyp1BKAsUKuRLvtIYei9UWOa3e0a DlRbCTtrsPoVk22VLe0TNpvY17uj79Ta49NV72UKsObXcW2c66Wog8FjTWuUgxfQO59V 7ljc18t8xwf+CS5x736ZIPDVYv/zghGeE4u19svlJ2RL4gulPexsfb1Gcuc0pRRP3jFO fJ+WMiLAr+WhcvegbkYIXTEaNYsd76ntRwO2YyrzIQAF4A4oA9EZ6yBDovMfzfJ42ABR gC96UAPdb15EcZLmBMpuXVk4EobqfdFU2F5I0C+alVz1s3DnndAN6bUwJavA1qaeQA2I g5Jg== X-Forwarded-Encrypted: i=1; AJvYcCXqHc2CeWiGX+skA72TRQ19pdYX5vf4uG3iAtgMghtd+fsYBW+D4hv9zAerxxGGMTophApGVQTm0ONmglNe+BCOzIHUKaQk4FBbi+8M X-Gm-Message-State: AOJu0YzAc3Q8JiJJTtRO/zeiCoxqrthbxcRq0ct+1riGgELEKQCS9P6H yGKLrDmBPU/iGxk7LKR2W9A26kI/Zf8l9b4PBCMBIgjOTcPME+P1N7nkSgrAzA== X-Received: by 2002:aa7:9d82:0:b0:6e3:636b:dd99 with SMTP id f2-20020aa79d82000000b006e3636bdd99mr331864pfq.24.1708707588228; Fri, 23 Feb 2024 08:59:48 -0800 (PST) Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id o74-20020a62cd4d000000b006e3f09fd6a7sm11865200pfg.85.2024.02.23.08.59.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 08:59:47 -0800 (PST) From: Kees Cook To: "David S. Miller" Cc: Kees Cook , Andreas Larsson , Masahiro Yamada , Sam Ravnborg , Helge Deller , Guo Ren , sparclinux@vger.kernel.org, Catalin Marinas , "Russell King (Oracle)" , linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: [PATCH] sparc: vdso: Disable UBSAN instrumentation Date: Fri, 23 Feb 2024 08:59:45 -0800 Message-Id: <20240223165942.work.950-kees@kernel.org> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=997; i=keescook@chromium.org; h=from:subject:message-id; bh=GFnd+uRgcZ5JE6+yaYSUeEigjBZZ5ehiRJbCdQFjMSg=; b=owEBbQKS/ZANAwAKAYly9N/cbcAmAcsmYgBl2M8BVTkPTYzeAtIdjSlijqw9uZvhDwrdnLvn9 blIHXwVpeGJAjMEAAEKAB0WIQSlw/aPIp3WD3I+bhOJcvTf3G3AJgUCZdjPAQAKCRCJcvTf3G3A JoCwEACKVFAmUO4no0Qaxq8qbED2OYobHjEx8UJ+OGsvTvGLxdH8D7zH1Jm07MIB5qteNWszAPW mmeZi2C8ojqf8QZCcqjRXQJWlCBUm6nET1lK20B7bHNNenRsAU3f+oq4vdh143ne09ThQL0vycD GkDx6xhb0cdwF/fuoUugrYKfxI242MeUa/lIkLQMoxXyJ+uQvBLKYtshUKKs/AdBkdZ56fsAR6W WK/+Q26n6BKUSxtMnNvhGt+AiOe0ElsbAbAPLSAf/+ACWu34JMXSe6b3o6WbemF7w6zZSFfxx3L aiWCjVpYB49at5XwwkPh4ZiViM11V4RJIIV8Wq2Lj3Wn2SfL+xAfohSXysGvuiAxtXG7wgnWXCl YkaEHux6vs5pt1/gsv6WKr+/UpXZvWQJkqpYBmRJY502AnAbYg00exgRnJoCpHC2bgyAS+cb9Zu YqnvktgImg3XSAhBvOhxXMf/40ggBFstPwm6YOucNM1IdW4aKRktYWll8E0i3M54hNRCm8eREdF 7CUN7Wo3pISsoJ5iWpsP3QdnuKVtUTXyu7XI5CcS33ZzxMMFpWTwMH1yZcEwM7e5+h4a4tSFsuK jSEdGEu1KEwGh3gepDThUCJTuVkHMRQLz80mbbn4/SrwStrx23fql2KEfgBMP0h30pfMsV78289 Q67U30eW 2zupgVA== X-Developer-Key: i=keescook@chromium.org; a=openpgp; fpr=A5C3F68F229DD60F723E6E138972F4DFDC6DC026 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791711088348920574 X-GMAIL-MSGID: 1791711088348920574 The UBSAN instrumentation cannot work in the vDSO since it is executing in userspace, so disable it in the Makefile. Fixes the build failures such as: arch/sparc/vdso/vclock_gettime.c:217: undefined reference to `__ubsan_handle_shift_out_of_bounds' Signed-off-by: Kees Cook Acked-by: Sam Ravnborg --- Cc: "David S. Miller" Cc: Andreas Larsson Cc: Masahiro Yamada Cc: Sam Ravnborg Cc: Helge Deller Cc: Guo Ren Cc: sparclinux@vger.kernel.org --- arch/sparc/vdso/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/sparc/vdso/Makefile b/arch/sparc/vdso/Makefile index 7f5eedf1f5e0..e8aef2c8ae99 100644 --- a/arch/sparc/vdso/Makefile +++ b/arch/sparc/vdso/Makefile @@ -2,6 +2,7 @@ # # Building vDSO images for sparc. # +UBSAN_SANITIZE := n # files to link into the vdso vobjs-y := vdso-note.o vclock_gettime.o