Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4452932pxk; Wed, 30 Sep 2020 03:26:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfWqV0Z/RJQOrEOSN/3faHFEsuQgxKKFHgb3xY89qpnWSm7ZwL1Wo/iMYs/9AVv+K4yMe4 X-Received: by 2002:a17:906:4046:: with SMTP id y6mr2193912ejj.148.1601461582610; Wed, 30 Sep 2020 03:26:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601461582; cv=none; d=google.com; s=arc-20160816; b=rStq/JjMahry2J7HnQRZLJ5iX28ODDSsL7onnCHcENiYfnWc/tCLA8mpBf6Ck0ys9H WDSQ0rVyLEiD3gR3GxOJZ2eZzB15EyXG82IfO0zbc53RGCH1yehm+CH/Q/nBnTvG5TfZ yBhC9Zgx6OTbw9rYKycfGRpkKtCicoUFH3BrXRr14QCRSADarpESDmTqkQ2yPtkKI9hh boVhKMX3i0oNRnWONs7seNvfshqz0WSL0YhricL11zbdsZFFnSBuA81178LzRJXH/ZZj Lw3NRWgF608qmPvbO97mwxXe9JuDXQRRVQiq3XQlVbsI7MqvizsUZtotcAXZF0Mcy+K4 zcWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=gKnkuO8al5P4LoWzeLQveTlvMQw18ZxOIr1o+kYlmtc=; b=L8y6BEkOGebZYik9Kp53VQs0CV7FHimKSdOk6qwjuhmK3lRcV0uuX4QwlkoqO6caSO Az3h7wZF2s/ncluZRXQ4L9fpEndaYR6ITClBMjWBpS1smZqOzv7YAoyQHrGCFaHEZQX2 99q5ykn2B7GUvvaVvBwad87/3USI55+dgq/JhYjeYSdcFXoOrhoPvk6EljOSsXxJrZ70 TwJqSsy/74OwaHTqzRW+y4rL64NNMcBLonpzkEzX7RvlGaMWMvjmkvjzdyIOkcItcF11 UAL2utZScanMbhnfbiHNFHoPGy0Hn98TI6G7j+xNXj69iMw3D39nzHo93ngDiCUhuLnl DJhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=pV+Nhret; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l8si689708edr.396.2020.09.30.03.26.00; Wed, 30 Sep 2020 03:26:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=pV+Nhret; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729018AbgI3KYx (ORCPT + 99 others); Wed, 30 Sep 2020 06:24:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728235AbgI3KYw (ORCPT ); Wed, 30 Sep 2020 06:24:52 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A07EFC061755 for ; Wed, 30 Sep 2020 03:24:52 -0700 (PDT) From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1601461491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gKnkuO8al5P4LoWzeLQveTlvMQw18ZxOIr1o+kYlmtc=; b=pV+NhretosWvlPSntcohS9342jI6wQ3lO+LllvYpf7nbV5fI4Ujd+nsHkOSsw3IQhEe3Dd WI2zC4ZsxHGHYRbxgM10clyTpHkqm0F5ZOKbWsdjfBwnhqiQ1/KtNRM6Xroe6/Qo/Tk8L5 IQ40+2b5uY0bYBlPOwr0FKGjDFmySR0UvSNo3dprVBIO/e9o0SjeXa0mSUbp5rojWzxfwV QODCVIv7fsvtzbwveVo7+4LD+MVVZzeD6n0ygpNttA1kbkSdktYRhW26CJgHKn8AMHXUbz Iyy3s6TafEG0UCF9xxAXBW3L3QLv17D8Y0kBqYEhg3CH+7kld48R/NgSnl4Chg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1601461491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gKnkuO8al5P4LoWzeLQveTlvMQw18ZxOIr1o+kYlmtc=; b=ihpvh3Xd80g8wEwiOtdPxyf/5yP+VA9PCAkAKSgbWPX3AQ2kO5gaTDbIL1DQa9pymaLW72 CQj4K9pubrMNvcDQ== To: Sergey Senozhatsky Cc: Petr Mladek , Sergey Senozhatsky , Sergey Senozhatsky , Steven Rostedt , Linus Torvalds , Greg Kroah-Hartman , Thomas Gleixner , Marek Szyprowski , linux-kernel@vger.kernel.org Subject: Re: [PATCH next v2 1/2] printk: avoid and/or handle record truncation In-Reply-To: <20200930094316.GB987@jagdpanzerIV.localdomain> References: <20200930090134.8723-1-john.ogness@linutronix.de> <20200930090134.8723-2-john.ogness@linutronix.de> <20200930094316.GB987@jagdpanzerIV.localdomain> Date: Wed, 30 Sep 2020 12:30:50 +0206 Message-ID: <87imbv1s0d.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-09-30, Sergey Senozhatsky wrote: > On (20/09/30 11:07), John Ogness wrote: >> bool prb_reserve_in_last(struct prb_reserved_entry *e, struct printk_ringbuffer *rb, >> - struct printk_record *r, u32 caller_id); >> + struct printk_record *r, u32 caller_id, unsigned int max_size); > > Isn't `max_size' always LOG_LINE_MAX? Yes. But I still think it makes sense that it is an argument of the function. It is quite an important setting and hard-coding it within the ringbuffer code might lead to hidden problems later. John Ogness