Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp833306pxb; Fri, 22 Apr 2022 12:09:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzeWmsLH4K34wOPuZzx/UqQW6GPHNTu1+wRlSZ8Y6MfqPFFlZ26VpmLaFD3ez8Jq8Ut14ST X-Received: by 2002:a05:6870:6085:b0:e6:1315:624e with SMTP id t5-20020a056870608500b000e61315624emr2662441oae.256.1650654582262; Fri, 22 Apr 2022 12:09:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650654582; cv=none; d=google.com; s=arc-20160816; b=eWwX+KZBs4OrZmXhxZQaD0e6J1aonge6S7dg1QBLm2VhuawdIbu6jkYINKyJ5q3UAA ee31buaqL275Vkr6XpI+wHlqArhUH+xceLpac0SCe6wbcuxsUJa4SGLGaxUyqQ0Mje1Q a9jHesqm8R4jpqii6UCMuZHEhOfFQuEXFH0thou4ztTTHWN08KY0COlOjZi8omIgKpbd h7Tc+BlI164aRgdD24FpU9YcfM8WMlm40aB5fVGMMFYwo3nXEL614kaTbio9r9nFUFGT 3bKe130KckmJeRQON/v7a5dGXr/SAXqmuIiMX8QMPD2CXz7TK+XDjCh9Fh8WfgesCCqM XObQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=ZiuTe736S/g8bz8JecqlNfPJ4fy14sOPXIbM7FpJ/4w=; b=uj2p2mqgiVFClt6154H54KvJh16CaUoBkyUnKXfw1h2jGLyHtV2DilkoZYOIFABZwc bc9lF3H/8iotit6gWHbp6jVsFG1ivIgSBGsHgRbXg8k0FYUmujRViREPBqe6U86kwcnR A7SBaAbr3ndpARahRkKlOgJDSSsInfh06lOzQcymTVq3Y3pW3/yDdLkX44vcfoyMm8VD 4HUsvp+6+PYgFsPYisSnSL6/P7NnTEtvKkQ5dKjrgBgpfMRPsNMkqYAfKxT0qTHGnyKm tzyf+Rap0wt+E+vHpC0ORYhYds46CUnk5OnhSBUSj10BK1/NwUzRAXdMRzaby0ceyu3Y qn4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=rmQ2ActS; dkim=neutral (no key) header.i=@linutronix.de header.b=2nGAyhpY; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id bf19-20020a056808191300b00322b4311c44si6048839oib.106.2022.04.22.12.09.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 12:09:42 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=rmQ2ActS; dkim=neutral (no key) header.i=@linutronix.de header.b=2nGAyhpY; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D9591C3EA6; Fri, 22 Apr 2022 11:28:00 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351289AbiDSUML (ORCPT + 99 others); Tue, 19 Apr 2022 16:12:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244421AbiDSUL3 (ORCPT ); Tue, 19 Apr 2022 16:11:29 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EFB63D1C0; Tue, 19 Apr 2022 13:08:46 -0700 (PDT) Date: Tue, 19 Apr 2022 20:08:44 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1650398925; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZiuTe736S/g8bz8JecqlNfPJ4fy14sOPXIbM7FpJ/4w=; b=rmQ2ActScofUKooJ9CRJO4q+u6ynPUNMSDiBB9DhU0weD1BCNKnTs04G3Ic60y/Afm/azz 5h3Nno1d0srrn4U7wDWZdZlF9uMtqTvjgpzbjS91yfnb337Ni0TIYBjRA2t9s0fON+8+Ee lltz/27AYWUYpzNXIyJrgaxbhJFhLb8rmvabzvyJyEN7ItSHWB+lURTmYbhWE1GGfNOe77 zsAo9+WlLFg5WYKcaJ6hzwWPKCuEbPkAN/Ek+pRlHNVKmJsF28KeOLBL6uDjw8dBT0eR2p +4UMj3ahtURltqiSiCgxmotSWTgb1YMrVBneHblfz2iDAcd25K/yFjhDXixDcw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1650398925; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZiuTe736S/g8bz8JecqlNfPJ4fy14sOPXIbM7FpJ/4w=; b=2nGAyhpYIfjKiopOUphLXmGJpuGq3rYjgXGCCkXkBbhiF6P/shXv+jtgobbci76NxiIDs3 ucrUMrwscWteYXCA== From: "tip-bot2 for Peter Zijlstra" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/urgent] lib/strn*,objtool: Enforce user_access_begin() rules Cc: Thomas Gleixner , "Peter Zijlstra (Intel)" , Josh Poimboeuf , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20220408094718.262932488@infradead.org> References: <20220408094718.262932488@infradead.org> MIME-Version: 1.0 Message-ID: <165039892407.4207.8696896474032855966.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 226d44acf6dfe71c9df5804b82364e93cf908b53 Gitweb: https://git.kernel.org/tip/226d44acf6dfe71c9df5804b82364e93cf908b53 Author: Peter Zijlstra AuthorDate: Fri, 08 Apr 2022 11:45:53 +02:00 Committer: Peter Zijlstra CommitterDate: Tue, 19 Apr 2022 21:58:47 +02:00 lib/strn*,objtool: Enforce user_access_begin() rules Apparently GCC can fail to inline a 'static inline' single caller function: lib/strnlen_user.o: warning: objtool: strnlen_user()+0x33: call to do_strnlen_user() with UACCESS enabled lib/strncpy_from_user.o: warning: objtool: strncpy_from_user()+0x33: call to do_strncpy_from_user() with UACCESS enabled Reported-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Acked-by: Josh Poimboeuf Link: https://lore.kernel.org/r/20220408094718.262932488@infradead.org --- lib/strncpy_from_user.c | 2 +- lib/strnlen_user.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/strncpy_from_user.c b/lib/strncpy_from_user.c index 08fc72d..6432b8c 100644 --- a/lib/strncpy_from_user.c +++ b/lib/strncpy_from_user.c @@ -25,7 +25,7 @@ * hit it), 'max' is the address space maximum (and we return * -EFAULT if we hit it). */ -static inline long do_strncpy_from_user(char *dst, const char __user *src, +static __always_inline long do_strncpy_from_user(char *dst, const char __user *src, unsigned long count, unsigned long max) { const struct word_at_a_time constants = WORD_AT_A_TIME_CONSTANTS; diff --git a/lib/strnlen_user.c b/lib/strnlen_user.c index bffa0eb..feeb935 100644 --- a/lib/strnlen_user.c +++ b/lib/strnlen_user.c @@ -20,7 +20,7 @@ * if it fits in a aligned 'long'. The caller needs to check * the return value against "> max". */ -static inline long do_strnlen_user(const char __user *src, unsigned long count, unsigned long max) +static __always_inline long do_strnlen_user(const char __user *src, unsigned long count, unsigned long max) { const struct word_at_a_time constants = WORD_AT_A_TIME_CONSTANTS; unsigned long align, res = 0;