From nobody Sun Jun 28 07:37:14 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9D1BC433F5 for ; Thu, 10 Feb 2022 15:50:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243767AbiBJPuf (ORCPT ); Thu, 10 Feb 2022 10:50:35 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:40614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243765AbiBJPua (ORCPT ); Thu, 10 Feb 2022 10:50:30 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED7E5BAF for ; Thu, 10 Feb 2022 07:50:31 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A7F3BB825F5 for ; Thu, 10 Feb 2022 15:50:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2DA3C004E1; Thu, 10 Feb 2022 15:50:28 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="l0XwdyNm" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1644508228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SrmOgRgCaKtuegs/zNMknyUNQ4MANgwqqGhERaYqVE4=; b=l0XwdyNm7+Cgcs4yuMG3uvY18HHyqO8hLPdLj1oIkva4XGRSqb0KdIEgrL1IdyfhOmWOAF byq+SI97D14baqMZYlEq1VHOFdVua04BMoBqc16iEwrj8z/xIaNapxrZfUFuGVQWL6nnDn EbaJpqPCeHNhSlioBNGHNeb3UnrSsLs= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id bdb71592 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Thu, 10 Feb 2022 15:50:27 +0000 (UTC) From: "Jason A. Donenfeld" To: linux-kernel@vger.kernel.org Cc: "Jason A. Donenfeld" , Theodore Ts'o , Dominik Brodowski Subject: [PATCH 1/3] random: remove ifdef'd out interrupt bench Date: Thu, 10 Feb 2022 16:50:10 +0100 Message-Id: <20220210155012.136485-2-Jason@zx2c4.com> In-Reply-To: <20220210155012.136485-1-Jason@zx2c4.com> References: <20220210155012.136485-1-Jason@zx2c4.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" With tools like kbench9000 giving more finegrained responses, and this basically never having been used ever since it was initially added, let's just get rid of this. There *is* still work to be done on the interrupt handler, but this really isn't the way it's being developed. Cc: Theodore Ts'o Cc: Dominik Brodowski Signed-off-by: Jason A. Donenfeld --- drivers/char/random.c | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/drivers/char/random.c b/drivers/char/random.c index 57d36f13e3a6..cf535596d1bc 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -240,8 +240,6 @@ #define CREATE_TRACE_POINTS #include =20 -/* #define ADD_INTERRUPT_BENCH */ - enum { POOL_BITS =3D BLAKE2S_HASH_SIZE * 8, POOL_MIN_BITS =3D POOL_BITS /* No point in settling for less. */ @@ -806,27 +804,6 @@ EXPORT_SYMBOL_GPL(add_input_randomness); =20 static DEFINE_PER_CPU(struct fast_pool, irq_randomness); =20 -#ifdef ADD_INTERRUPT_BENCH -static unsigned long avg_cycles, avg_deviation; - -#define AVG_SHIFT 8 /* Exponential average factor k=3D1/256 */ -#define FIXED_1_2 (1 << (AVG_SHIFT - 1)) - -static void add_interrupt_bench(cycles_t start) -{ - long delta =3D random_get_entropy() - start; - - /* Use a weighted moving average */ - delta =3D delta - ((avg_cycles + FIXED_1_2) >> AVG_SHIFT); - avg_cycles +=3D delta; - /* And average deviation */ - delta =3D abs(delta) - ((avg_deviation + FIXED_1_2) >> AVG_SHIFT); - avg_deviation +=3D delta; -} -#else -#define add_interrupt_bench(x) -#endif - static u32 get_reg(struct fast_pool *f, struct pt_regs *regs) { u32 *ptr =3D (u32 *)regs; @@ -885,7 +862,6 @@ void add_interrupt_randomness(int irq) (sizeof(ip) > 4) ? ip >> 32 : get_reg(fast_pool, regs); =20 fast_mix(fast_pool); - add_interrupt_bench(cycles); new_count =3D ++fast_pool->count; =20 if (unlikely(crng_init =3D=3D 0)) { @@ -1595,22 +1571,6 @@ static struct ctl_table random_table[] =3D { .mode =3D 0444, .proc_handler =3D proc_do_uuid, }, -#ifdef ADD_INTERRUPT_BENCH - { - .procname =3D "add_interrupt_avg_cycles", - .data =3D &avg_cycles, - .maxlen =3D sizeof(avg_cycles), - .mode =3D 0444, - .proc_handler =3D proc_doulongvec_minmax, - }, - { - .procname =3D "add_interrupt_avg_deviation", - .data =3D &avg_deviation, - .maxlen =3D sizeof(avg_deviation), - .mode =3D 0444, - .proc_handler =3D proc_doulongvec_minmax, - }, -#endif { } }; =20 --=20 2.35.0 From nobody Sun Jun 28 07:37:14 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC81EC433EF for ; Thu, 10 Feb 2022 15:50:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243785AbiBJPug (ORCPT ); Thu, 10 Feb 2022 10:50:36 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:40666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243772AbiBJPud (ORCPT ); Thu, 10 Feb 2022 10:50:33 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EBB7BB3 for ; Thu, 10 Feb 2022 07:50:34 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8925861CA4 for ; Thu, 10 Feb 2022 15:50:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9D27FC004E1; Thu, 10 Feb 2022 15:50:32 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="Pe8AtVnt" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1644508231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rcgCZkugrNJ4pcB0eRUnVhwg1dN/LIR8pqidSg1+e/M=; b=Pe8AtVnttvYcK6cRHB9WwnQ1PT25F4faWoNFxH699o0qxxK0lqaB7QJcv0df57bmJc9WQq lIyUDQAzRIpovObJbpwWEwsPk6iXJoEQaO+5a+SRJMMu9IGoKdp94JsCqSfW+tfPVCeCyh 2zua57/TGJ0WZXls+jUTy22pznUpFUo= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 7098b324 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Thu, 10 Feb 2022 15:50:31 +0000 (UTC) From: "Jason A. Donenfeld" To: linux-kernel@vger.kernel.org Cc: "Jason A. Donenfeld" , Theodore Ts'o , Dominik Brodowski Subject: [PATCH 2/3] random: remove unused tracepoints Date: Thu, 10 Feb 2022 16:50:11 +0100 Message-Id: <20220210155012.136485-3-Jason@zx2c4.com> In-Reply-To: <20220210155012.136485-1-Jason@zx2c4.com> References: <20220210155012.136485-1-Jason@zx2c4.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" These explicit tracepoints aren't really used and show sign of aging. It's work to keep these up to date, and before I attempted to keep them up to date, they weren't up to date, which indicates that they're not really used. These days there are better ways of introspecting anyway. Cc: Theodore Ts'o Cc: Dominik Brodowski Signed-off-by: Jason A. Donenfeld Reviewed-by: Eric Biggers --- drivers/char/random.c | 30 +---- include/trace/events/random.h | 206 ---------------------------------- lib/random32.c | 2 - 3 files changed, 3 insertions(+), 235 deletions(-) delete mode 100644 include/trace/events/random.h diff --git a/drivers/char/random.c b/drivers/char/random.c index cf535596d1bc..30a3c0717e3e 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -237,9 +237,6 @@ #include #include =20 -#define CREATE_TRACE_POINTS -#include - enum { POOL_BITS =3D BLAKE2S_HASH_SIZE * 8, POOL_MIN_BITS =3D POOL_BITS /* No point in settling for less. */ @@ -315,7 +312,6 @@ static void mix_pool_bytes(const void *in, size_t nbyte= s) { unsigned long flags; =20 - trace_mix_pool_bytes(nbytes, _RET_IP_); spin_lock_irqsave(&input_pool.lock, flags); _mix_pool_bytes(in, nbytes); spin_unlock_irqrestore(&input_pool.lock, flags); @@ -390,8 +386,6 @@ static void credit_entropy_bits(size_t nbits) entropy_count =3D min_t(unsigned int, POOL_BITS, orig + add); } while (cmpxchg(&input_pool.entropy_count, orig, entropy_count) !=3D ori= g); =20 - trace_credit_entropy_bits(nbits, entropy_count, _RET_IP_); - if (crng_init < 2 && entropy_count >=3D POOL_MIN_BITS) crng_reseed(); } @@ -719,7 +713,6 @@ void add_device_randomness(const void *buf, size_t size) if (!crng_ready() && size) crng_slow_load(buf, size); =20 - trace_add_device_randomness(size, _RET_IP_); spin_lock_irqsave(&input_pool.lock, flags); _mix_pool_bytes(buf, size); _mix_pool_bytes(&time, sizeof(time)); @@ -798,7 +791,6 @@ void add_input_randomness(unsigned int type, unsigned i= nt code, last_value =3D value; add_timer_randomness(&input_timer_state, (type << 4) ^ code ^ (code >> 4) ^ value); - trace_add_input_randomness(input_pool.entropy_count); } EXPORT_SYMBOL_GPL(add_input_randomness); =20 @@ -900,7 +892,6 @@ void add_disk_randomness(struct gendisk *disk) return; /* first major is 1, so we get >=3D 0x200 here */ add_timer_randomness(disk->random, 0x100 + disk_devt(disk)); - trace_add_disk_randomness(disk_devt(disk), input_pool.entropy_count); } EXPORT_SYMBOL_GPL(add_disk_randomness); #endif @@ -925,8 +916,6 @@ static void extract_entropy(void *buf, size_t nbytes) } block; size_t i; =20 - trace_extract_entropy(nbytes, input_pool.entropy_count); - for (i =3D 0; i < ARRAY_SIZE(block.rdseed); ++i) { if (!arch_get_random_seed_long(&block.rdseed[i]) && !arch_get_random_long(&block.rdseed[i])) @@ -998,8 +987,6 @@ static void _get_random_bytes(void *buf, size_t nbytes) u8 tmp[CHACHA_BLOCK_SIZE]; size_t len; =20 - trace_get_random_bytes(nbytes, _RET_IP_); - if (!nbytes) return; =20 @@ -1197,7 +1184,6 @@ size_t __must_check get_random_bytes_arch(void *buf, = size_t nbytes) size_t left =3D nbytes; u8 *p =3D buf; =20 - trace_get_random_bytes_arch(left, _RET_IP_); while (left) { unsigned long v; size_t chunk =3D min_t(size_t, left, sizeof(unsigned long)); @@ -1281,16 +1267,6 @@ void rand_initialize_disk(struct gendisk *disk) } #endif =20 -static ssize_t urandom_read_nowarn(struct file *file, char __user *buf, - size_t nbytes, loff_t *ppos) -{ - ssize_t ret; - - ret =3D get_random_bytes_user(buf, nbytes); - trace_urandom_read(nbytes, input_pool.entropy_count); - return ret; -} - static ssize_t urandom_read(struct file *file, char __user *buf, size_t nb= ytes, loff_t *ppos) { @@ -1303,7 +1279,7 @@ static ssize_t urandom_read(struct file *file, char _= _user *buf, size_t nbytes, current->comm, nbytes); } =20 - return urandom_read_nowarn(file, buf, nbytes, ppos); + return get_random_bytes_user(buf, nbytes); } =20 static ssize_t random_read(struct file *file, char __user *buf, size_t nby= tes, @@ -1314,7 +1290,7 @@ static ssize_t random_read(struct file *file, char __= user *buf, size_t nbytes, ret =3D wait_for_random_bytes(); if (ret !=3D 0) return ret; - return urandom_read_nowarn(file, buf, nbytes, ppos); + return get_random_bytes_user(buf, nbytes); } =20 static __poll_t random_poll(struct file *file, poll_table *wait) @@ -1475,7 +1451,7 @@ SYSCALL_DEFINE3(getrandom, char __user *, buf, size_t= , count, unsigned int, if (unlikely(ret)) return ret; } - return urandom_read_nowarn(NULL, buf, count, NULL); + return get_random_bytes_user(buf, count); } =20 /******************************************************************** diff --git a/include/trace/events/random.h b/include/trace/events/random.h deleted file mode 100644 index dd6e154f9f75..000000000000 --- a/include/trace/events/random.h +++ /dev/null @@ -1,206 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM random - -#if !defined(_TRACE_RANDOM_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_RANDOM_H - -#include -#include - -TRACE_EVENT(add_device_randomness, - TP_PROTO(size_t bytes, unsigned long IP), - - TP_ARGS(bytes, IP), - - TP_STRUCT__entry( - __field(size_t, bytes ) - __field(unsigned long, IP ) - ), - - TP_fast_assign( - __entry->bytes =3D bytes; - __entry->IP =3D IP; - ), - - TP_printk("bytes %zu caller %pS", - __entry->bytes, (void *)__entry->IP) -); - -DECLARE_EVENT_CLASS(random__mix_pool_bytes, - TP_PROTO(size_t bytes, unsigned long IP), - - TP_ARGS(bytes, IP), - - TP_STRUCT__entry( - __field(size_t, bytes ) - __field(unsigned long, IP ) - ), - - TP_fast_assign( - __entry->bytes =3D bytes; - __entry->IP =3D IP; - ), - - TP_printk("input pool: bytes %zu caller %pS", - __entry->bytes, (void *)__entry->IP) -); - -DEFINE_EVENT(random__mix_pool_bytes, mix_pool_bytes, - TP_PROTO(size_t bytes, unsigned long IP), - - TP_ARGS(bytes, IP) -); - -TRACE_EVENT(credit_entropy_bits, - TP_PROTO(size_t bits, size_t entropy_count, unsigned long IP), - - TP_ARGS(bits, entropy_count, IP), - - TP_STRUCT__entry( - __field(size_t, bits ) - __field(size_t, entropy_count ) - __field(unsigned long, IP ) - ), - - TP_fast_assign( - __entry->bits =3D bits; - __entry->entropy_count =3D entropy_count; - __entry->IP =3D IP; - ), - - TP_printk("input pool: bits %zu entropy_count %zu caller %pS", - __entry->bits, __entry->entropy_count, (void *)__entry->IP) -); - -TRACE_EVENT(add_input_randomness, - TP_PROTO(size_t input_bits), - - TP_ARGS(input_bits), - - TP_STRUCT__entry( - __field(size_t, input_bits ) - ), - - TP_fast_assign( - __entry->input_bits =3D input_bits; - ), - - TP_printk("input_pool_bits %zu", __entry->input_bits) -); - -TRACE_EVENT(add_disk_randomness, - TP_PROTO(dev_t dev, size_t input_bits), - - TP_ARGS(dev, input_bits), - - TP_STRUCT__entry( - __field(dev_t, dev ) - __field(size_t, input_bits ) - ), - - TP_fast_assign( - __entry->dev =3D dev; - __entry->input_bits =3D input_bits; - ), - - TP_printk("dev %d,%d input_pool_bits %zu", MAJOR(__entry->dev), - MINOR(__entry->dev), __entry->input_bits) -); - -DECLARE_EVENT_CLASS(random__get_random_bytes, - TP_PROTO(size_t nbytes, unsigned long IP), - - TP_ARGS(nbytes, IP), - - TP_STRUCT__entry( - __field(size_t, nbytes ) - __field(unsigned long, IP ) - ), - - TP_fast_assign( - __entry->nbytes =3D nbytes; - __entry->IP =3D IP; - ), - - TP_printk("nbytes %zu caller %pS", __entry->nbytes, (void *)__entry->IP) -); - -DEFINE_EVENT(random__get_random_bytes, get_random_bytes, - TP_PROTO(size_t nbytes, unsigned long IP), - - TP_ARGS(nbytes, IP) -); - -DEFINE_EVENT(random__get_random_bytes, get_random_bytes_arch, - TP_PROTO(size_t nbytes, unsigned long IP), - - TP_ARGS(nbytes, IP) -); - -DECLARE_EVENT_CLASS(random__extract_entropy, - TP_PROTO(size_t nbytes, size_t entropy_count), - - TP_ARGS(nbytes, entropy_count), - - TP_STRUCT__entry( - __field( size_t, nbytes ) - __field( size_t, entropy_count ) - ), - - TP_fast_assign( - __entry->nbytes =3D nbytes; - __entry->entropy_count =3D entropy_count; - ), - - TP_printk("input pool: nbytes %zu entropy_count %zu", - __entry->nbytes, __entry->entropy_count) -); - - -DEFINE_EVENT(random__extract_entropy, extract_entropy, - TP_PROTO(size_t nbytes, size_t entropy_count), - - TP_ARGS(nbytes, entropy_count) -); - -TRACE_EVENT(urandom_read, - TP_PROTO(size_t nbytes, size_t entropy_count), - - TP_ARGS(nbytes, entropy_count), - - TP_STRUCT__entry( - __field( size_t, nbytes ) - __field( size_t, entropy_count ) - ), - - TP_fast_assign( - __entry->nbytes =3D nbytes; - __entry->entropy_count =3D entropy_count; - ), - - TP_printk("reading: nbytes %zu entropy_count %zu", - __entry->nbytes, __entry->entropy_count) -); - -TRACE_EVENT(prandom_u32, - - TP_PROTO(unsigned int ret), - - TP_ARGS(ret), - - TP_STRUCT__entry( - __field( unsigned int, ret) - ), - - TP_fast_assign( - __entry->ret =3D ret; - ), - - TP_printk("ret=3D%u" , __entry->ret) -); - -#endif /* _TRACE_RANDOM_H */ - -/* This part must be outside protection */ -#include diff --git a/lib/random32.c b/lib/random32.c index a57a0e18819d..3c19820796d0 100644 --- a/lib/random32.c +++ b/lib/random32.c @@ -41,7 +41,6 @@ #include #include #include -#include =20 /** * prandom_u32_state - seeded pseudo-random number generator. @@ -387,7 +386,6 @@ u32 prandom_u32(void) struct siprand_state *state =3D get_cpu_ptr(&net_rand_state); u32 res =3D siprand_u32(state); =20 - trace_prandom_u32(res); put_cpu_ptr(&net_rand_state); return res; } --=20 2.35.0 From nobody Sun Jun 28 07:37:14 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 615F6C433EF for ; Thu, 10 Feb 2022 15:50:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243797AbiBJPum (ORCPT ); Thu, 10 Feb 2022 10:50:42 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:40814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243795AbiBJPuk (ORCPT ); Thu, 10 Feb 2022 10:50:40 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F38DBBB for ; Thu, 10 Feb 2022 07:50:40 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 070ABB825F3 for ; Thu, 10 Feb 2022 15:50:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 401A7C004E1; Thu, 10 Feb 2022 15:50:37 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="Ho1WIj4O" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1644508236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=K/RHUZEvXyNjDfIiWAS3xY4kT8bsmMQ7c0HlOTCYWeI=; b=Ho1WIj4OHG0dirWre1KLLILAvtnshu3XT9qiMDU4UXNdSthwjONxnAX67BYlCBmUBRLccb MikCmeGOQYrt46bokX4oE9w41sbQMTjZYP+zRWy6gODf1ZuWUItswIKGGsfE7CZzxl6Lu/ zmIUBVjbFETs6c8Z22GR3f+YGcDWKFQ= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 8e7b944a (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Thu, 10 Feb 2022 15:50:35 +0000 (UTC) From: "Jason A. Donenfeld" To: linux-kernel@vger.kernel.org Cc: "Jason A. Donenfeld" , Greg Kroah-Hartman , Theodore Ts'o , Dominik Brodowski Subject: [PATCH 3/3] random: add proper SPDX header Date: Thu, 10 Feb 2022 16:50:12 +0100 Message-Id: <20220210155012.136485-4-Jason@zx2c4.com> In-Reply-To: <20220210155012.136485-1-Jason@zx2c4.com> References: <20220210155012.136485-1-Jason@zx2c4.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Somehow this file missed the SPDXification efforts several years ago. Cc: Greg Kroah-Hartman Cc: Theodore Ts'o Cc: Dominik Brodowski Signed-off-by: Jason A. Donenfeld --- drivers/char/random.c | 40 ++-------------------------------------- include/linux/random.h | 5 ----- 2 files changed, 2 insertions(+), 43 deletions(-) diff --git a/drivers/char/random.c b/drivers/char/random.c index 30a3c0717e3e..77131f7b0f06 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -1,44 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0 /* - * random.c -- A strong random number generator - * * Copyright (C) 2017-2022 Jason A. Donenfeld . All Right= s Reserved. - * * Copyright Matt Mackall , 2003, 2004, 2005 - * - * Copyright Theodore Ts'o, 1994, 1995, 1996, 1997, 1998, 1999. All - * rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, and the entire permission notice in its entirety, - * including the disclaimer of warranties. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote - * products derived from this software without specific prior - * written permission. - * - * ALTERNATIVELY, this product may be distributed under the terms of - * the GNU General Public License, in which case the provisions of the GPL= are - * required INSTEAD OF the above restrictions. (This clause is - * necessary due to a potential bad interaction between the GPL and - * the restrictions contained in a BSD-style copyright.) - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF - * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE - * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. + * Copyright Theodore Ts'o, 1994, 1995, 1996, 1997, 1998, 1999. All right= s reserved. */ =20 /* diff --git a/include/linux/random.h b/include/linux/random.h index e92efb39779c..1a6861aa1277 100644 --- a/include/linux/random.h +++ b/include/linux/random.h @@ -1,9 +1,4 @@ /* SPDX-License-Identifier: GPL-2.0 */ -/* - * include/linux/random.h - * - * Include file for the random number generator. - */ #ifndef _LINUX_RANDOM_H #define _LINUX_RANDOM_H =20 --=20 2.35.0