[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87pom3egw7.fsf@intel.com>
Date: Thu, 10 Nov 2016 13:03:20 +0200
From: Jani Nikula <jani.nikula@...el.com>
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc: Eric Engestrom <eric.engestrom@...tec.com>,
Daniel Vetter <daniel@...ll.ch>,
Eric Engestrom <eric@...estrom.ch>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
David Airlie <airlied@...ux.ie>,
dri-devel <dri-devel@...ts.freedesktop.org>,
Wei Yongjun <yongjun_wei@...ndmicro.com.cn>,
Daniel Vetter <daniel.vetter@...el.com>,
Flora Cui <Flora.Cui@....com>,
Gustavo Padovan <gustavo.padovan@...labora.co.uk>,
Tom St Denis <tom.stdenis@....com>,
Chunming Zhou <David1.Zhou@....com>,
Thomas Hellstrom <thellstrom@...are.com>,
Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>,
Sinclair Yeh <syeh@...are.com>,
Xinliang Liu <z.liuxinliang@...ilicon.com>,
Xinwei Kong <kong.kongxinwei@...ilicon.com>,
VMware Graphics <linux-graphics-maintainer@...are.com>,
Vitaly Prosyak <vitaly.prosyak@....com>,
Alexandre Demers <alexandre.f.demers@...il.com>,
intel-gfx <intel-gfx@...ts.freedesktop.org>,
Emily Deng <Emily.Deng@....com>,
Colin Ian King <colin.king@...onical.com>,
Junwei Zhang <Jerry.Zhang@....com>,
Michel Dänzer <michel.daenzer@....com>,
Alex Deucher <alexander.deucher@....com>,
Christian König <christian.koenig@....com>
Subject: Re: [Intel-gfx] [PATCH v3] drm: move allocation out of drm_get_format_name()
On Thu, 10 Nov 2016, Laurent Pinchart <laurent.pinchart@...asonboard.com> wrote:
> Hi Jani,
>
> On Thursday 10 Nov 2016 12:30:09 Jani Nikula wrote:
>> On Thu, 10 Nov 2016, Laurent Pinchart wrote:
>> > The issue here is that printk can't format the fourcc as a string by
>> > itself. There's a bunch of places in the kernel where a similar
>> > formatting problem occurs. In a few occasions it has been solved by
>> > extending printk with additional format specifiers (such as for MAC/IP
>> > addresses, GUIDs, various kind of device names, ...). DRM fourccs are
>> > probably too DRM specific to be worth a format specifier, but I wonder
>> > whether we could introduce a new specifier that takes a function pointer
>> > as a formatting helper. Another similarly crazy option would be a format
>> > specifier for strings that would free the passed pointer after printing
>> > it.
>>
>> I think there are too many non-standard format specifiers already. I
>> can't review the non-standard format strings without looking at
>> Documentation/prink-formats.txt first. The formatting hook would be a
>> generic alternative, but that's more than a little scary from the
>> security standpoint. And what if the hook has to allocate memory? Can't
>> do that in atomic contexts.
>
> There are lots of details to sort out obviously and I don't have an answer to
> all questions yet. I think it would be worth researching this, as the problem
> isn't specific to DRM/KMS.
That's easy to agree to; as much as you didn't mean to shoot down the
patch, I didn't mean to shoot down your idea! :)
BR,
Jani.
--
Jani Nikula, Intel Open Source Technology Center
Powered by blists - more mailing lists