Message ID | 20241025134233.2839659-3-koichiro.den@canonical.com |
---|---|
State | New |
Headers | show
Return-Path: <kernel-team-bounces@lists.ubuntu.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XZkWP1n0jz1xwy for <incoming@patchwork.ozlabs.org>; Sat, 26 Oct 2024 00:43:13 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from <kernel-team-bounces@lists.ubuntu.com>) id 1t4Kam-0000O1-SS; Fri, 25 Oct 2024 13:43:04 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from <koichiro.den@canonical.com>) id 1t4Kal-0000NI-QL for kernel-team@lists.ubuntu.com; Fri, 25 Oct 2024 13:43:03 +0000 Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 14E4640F90 for <kernel-team@lists.ubuntu.com>; Fri, 25 Oct 2024 13:43:03 +0000 (UTC) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-2e3ce03a701so2131537a91.0 for <kernel-team@lists.ubuntu.com>; Fri, 25 Oct 2024 06:43:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729863781; x=1730468581; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kyWYdulo+5Wnop/otlAvZ9hUIt7udwwe5mn2YjrAI3I=; b=rOy0VG9aRKJGy3MswF0VnrvB07DsmkCY5USBD3lf7COFaPoDhMk4lDJLRV+D6ioDXg T8K5ZdZi7Si1hJtGyfr5Zl8nTpr9K0dj0l5b1JYWb9o3TevK4s6Jrv1QlE6wbqhIjyOl vLfiDvnMF+pxqeLmmqQ5Y34SOfoD2PMVbTrGhaigtuDGaRWlJJmpTsBwcvCi/ljPNDAE NEYTH6M2D/I1qt8k0H/+dRxXyNr4wYaWlS/PRxU4NHSP6NBU0IEmAFHRaTTtT8mfkOoE ZAq1GfGaFi7tvlrppEChi8G6yIH9PnAjKfVoAvIQpgyhXfS6YN3ozUDLsNb009WSNBEK oqLw== X-Gm-Message-State: AOJu0YzlPlysCs6btgErBsYNVXdHqnH2O1fHhxkB+tJFFpIqdZ6FaNlj 7ejHzvibIYMmfirbMSMTa+RoqLBzbcgV6icOT6u6E+DcieBMnfBchppZjaa/9GnpiqqsauqMRZr 5ZGRGA+teUPSIMizEWH5c0e6PHdtGs11Rd30VpJcM3qsb4Fh6TV6bO1RtYQe/XvfE8BTNM8Iua+ 1VZ/5Ewfiy3w== X-Received: by 2002:a17:90b:3c43:b0:2e2:a8dd:9bb5 with SMTP id 98e67ed59e1d1-2e76b5d922bmr9607504a91.12.1729863781425; Fri, 25 Oct 2024 06:43:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG6FDqKSoBUVkL3GDxrFHzEXmT1FJnR+O6N5o854JTsVaZITwaLcIuo9U55r+ajOQUDWCkt/w== X-Received: by 2002:a17:90b:3c43:b0:2e2:a8dd:9bb5 with SMTP id 98e67ed59e1d1-2e76b5d922bmr9607484a91.12.1729863781012; Fri, 25 Oct 2024 06:43:01 -0700 (PDT) Received: from localhost.localdomain ([240f:74:7be:1:9b52:57a4:8bdb:99d3]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e8e3572efbsm1418828a91.22.2024.10.25.06.43.00 for <kernel-team@lists.ubuntu.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 06:43:00 -0700 (PDT) From: Koichiro Den <koichiro.den@canonical.com> To: kernel-team@lists.ubuntu.com Subject: [SRU][F][PATCH v2 2/3] ftrace: Return the first found result in lookup_rec() Date: Fri, 25 Oct 2024 22:42:29 +0900 Message-ID: <20241025134233.2839659-3-koichiro.den@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241025134233.2839659-1-koichiro.den@canonical.com> References: <20241025134233.2839659-1-koichiro.den@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions <kernel-team.lists.ubuntu.com> List-Unsubscribe: <https://lists.ubuntu.com/mailman/options/kernel-team>, <mailto:kernel-team-request@lists.ubuntu.com?subject=unsubscribe> List-Archive: <https://lists.ubuntu.com/archives/kernel-team> List-Post: <mailto:kernel-team@lists.ubuntu.com> List-Help: <mailto:kernel-team-request@lists.ubuntu.com?subject=help> List-Subscribe: <https://lists.ubuntu.com/mailman/listinfo/kernel-team>, <mailto:kernel-team-request@lists.ubuntu.com?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" <kernel-team-bounces@lists.ubuntu.com> |
Series |
CVE-2024-38588
|
expand
|
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index d9992fef7287..e40bbd18bc99 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -1552,6 +1552,8 @@ static struct dyn_ftrace *lookup_rec(unsigned long start, unsigned long end) rec = bsearch(&key, pg->records, pg->index, sizeof(struct dyn_ftrace), ftrace_cmp_recs); + if (rec) + break; } return rec; }